diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 18fad6681b50e..83715e9d6821e 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -174,6 +174,7 @@ com.azure.resourcemanager:azure-resourcemanager-storage;2.1.0;2.2.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.1.0;2.2.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-test;2.0.0-beta.1;2.0.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-mediaservices;1.0.0-beta.1;1.0.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-mysql;1.0.0-beta.1;1.0.0-beta.1
com.microsoft:microsoft-opentelemetry-exporter-azuremonitor;1.0.0-beta.1;1.0.0-beta.2
diff --git a/pom.xml b/pom.xml
index 85f448c1740a2..f24dd47343367 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,17 +9,17 @@
1.0.0
common/perf-test-core
- eng/jacoco-test-coverage
eng/code-quality-reports
+ eng/jacoco-test-coverage
sdk/anomalydetector
sdk/appconfiguration
sdk/authorization
sdk/batch
sdk/boms
- sdk/core
- sdk/cosmos
sdk/cognitiveservices
sdk/communication
+ sdk/core
+ sdk/cosmos
sdk/digitaltwins
sdk/eventgrid
sdk/eventhubs
@@ -28,17 +28,18 @@
sdk/keyvault
sdk/loganalytics
sdk/mediaservices
- sdk/monitor
sdk/metricsadvisor
+ sdk/monitor
+ sdk/mysql
sdk/resourcemanager
sdk/schemaregistry
sdk/search
sdk/servicebus
+ sdk/spring
sdk/storage
sdk/synapse
sdk/tables
sdk/template
sdk/textanalytics
- sdk/spring
diff --git a/sdk/mysql/azure-resourcemanager-mysql/CHANGELOG.md b/sdk/mysql/azure-resourcemanager-mysql/CHANGELOG.md
new file mode 100644
index 0000000000000..b64442c0d5e2d
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2020-12-16)
+
+- 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-2020-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
\ No newline at end of file
diff --git a/sdk/mysql/azure-resourcemanager-mysql/README.md b/sdk/mysql/azure-resourcemanager-mysql/README.md
new file mode 100644
index 0000000000000..88ebc9eb8e927
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/README.md
@@ -0,0 +1,84 @@
+# Azure Resource Manager MySql client library for Java
+
+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-2020-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+## Getting started
+
+### Prerequisites
+
+- [Java Development Kit (JDK)][jdk] with version 8 or above
+- [Azure Subscription][azure_subscription]
+
+### Adding the package to your product
+
+[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-mysql;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-mysql
+ 1.0.0-beta.1
+
+```
+[//]: # ({x-version-update-end})
+
+### Include the recommended packages
+
+Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
+
+[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+
+### Authentication
+
+By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+
+- `AZURE_CLIENT_ID` for Azure client ID.
+- `AZURE_TENANT_ID` for Azure tenant ID.
+- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+
+In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+
+With above configuration, `azure` client can be authenticated by following code:
+
+```java
+AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+TokenCredential credential = new DefaultAzureCredentialBuilder()
+ .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
+ .build();
+MySqlManager manager = MySqlManager
+ .authenticate(credential, profile);
+```
+
+The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+
+See [Authentication][authenticate] for more options.
+
+## Key concepts
+
+See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
+
+## Examples
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft
+Azure Projects Contribution Guidelines](http://azure.github.io/guidelines.html).
+
+1. Fork it
+1. Create your feature branch (`git checkout -b my-new-feature`)
+1. Commit your changes (`git commit -am 'Add some feature'`)
+1. Push to the branch (`git push origin my-new-feature`)
+1. Create new Pull Request
+
+
+[jdk]: https://docs.microsoft.com/java/azure/jdk/
+[azure_subscription]: https://azure.microsoft.com/free/
+[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity
+[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core-http-netty
+[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/AUTH.md
+[design]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/mysql/azure-resourcemanager-mysql/pom.xml b/sdk/mysql/azure-resourcemanager-mysql/pom.xml
new file mode 100644
index 0000000000000..ad77c85ebd647
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/pom.xml
@@ -0,0 +1,62 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-mysql
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for MySql Management
+ 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-2020-01-01. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+
+
+
+
+ com.azure
+ azure-core-management
+ 1.0.0
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.5
+
+ true
+
+
+
+
+
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/MySqlManager.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/MySqlManager.java
new file mode 100644
index 0000000000000..db534585121ab
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/MySqlManager.java
@@ -0,0 +1,514 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+import com.azure.core.http.policy.HttpPolicyProviders;
+import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryPolicy;
+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.logging.ClientLogger;
+import com.azure.resourcemanager.mysql.fluent.MySqlManagementClient;
+import com.azure.resourcemanager.mysql.implementation.AdvisorsImpl;
+import com.azure.resourcemanager.mysql.implementation.CheckNameAvailabilitiesImpl;
+import com.azure.resourcemanager.mysql.implementation.ConfigurationsImpl;
+import com.azure.resourcemanager.mysql.implementation.DatabasesImpl;
+import com.azure.resourcemanager.mysql.implementation.FirewallRulesImpl;
+import com.azure.resourcemanager.mysql.implementation.LocationBasedPerformanceTiersImpl;
+import com.azure.resourcemanager.mysql.implementation.LocationBasedRecommendedActionSessionsOperationStatusImpl;
+import com.azure.resourcemanager.mysql.implementation.LocationBasedRecommendedActionSessionsResultsImpl;
+import com.azure.resourcemanager.mysql.implementation.LogFilesImpl;
+import com.azure.resourcemanager.mysql.implementation.MySqlManagementClientBuilder;
+import com.azure.resourcemanager.mysql.implementation.OperationsImpl;
+import com.azure.resourcemanager.mysql.implementation.PrivateEndpointConnectionsImpl;
+import com.azure.resourcemanager.mysql.implementation.PrivateLinkResourcesImpl;
+import com.azure.resourcemanager.mysql.implementation.QueryTextsImpl;
+import com.azure.resourcemanager.mysql.implementation.RecommendedActionsImpl;
+import com.azure.resourcemanager.mysql.implementation.RecoverableServersImpl;
+import com.azure.resourcemanager.mysql.implementation.ReplicasImpl;
+import com.azure.resourcemanager.mysql.implementation.ResourceProvidersImpl;
+import com.azure.resourcemanager.mysql.implementation.ServerAdministratorsImpl;
+import com.azure.resourcemanager.mysql.implementation.ServerBasedPerformanceTiersImpl;
+import com.azure.resourcemanager.mysql.implementation.ServerKeysImpl;
+import com.azure.resourcemanager.mysql.implementation.ServerParametersImpl;
+import com.azure.resourcemanager.mysql.implementation.ServerSecurityAlertPoliciesImpl;
+import com.azure.resourcemanager.mysql.implementation.ServersImpl;
+import com.azure.resourcemanager.mysql.implementation.TopQueryStatisticsImpl;
+import com.azure.resourcemanager.mysql.implementation.VirtualNetworkRulesImpl;
+import com.azure.resourcemanager.mysql.implementation.WaitStatisticsImpl;
+import com.azure.resourcemanager.mysql.models.Advisors;
+import com.azure.resourcemanager.mysql.models.CheckNameAvailabilities;
+import com.azure.resourcemanager.mysql.models.Configurations;
+import com.azure.resourcemanager.mysql.models.Databases;
+import com.azure.resourcemanager.mysql.models.FirewallRules;
+import com.azure.resourcemanager.mysql.models.LocationBasedPerformanceTiers;
+import com.azure.resourcemanager.mysql.models.LocationBasedRecommendedActionSessionsOperationStatus;
+import com.azure.resourcemanager.mysql.models.LocationBasedRecommendedActionSessionsResults;
+import com.azure.resourcemanager.mysql.models.LogFiles;
+import com.azure.resourcemanager.mysql.models.Operations;
+import com.azure.resourcemanager.mysql.models.PrivateEndpointConnections;
+import com.azure.resourcemanager.mysql.models.PrivateLinkResources;
+import com.azure.resourcemanager.mysql.models.QueryTexts;
+import com.azure.resourcemanager.mysql.models.RecommendedActions;
+import com.azure.resourcemanager.mysql.models.RecoverableServers;
+import com.azure.resourcemanager.mysql.models.Replicas;
+import com.azure.resourcemanager.mysql.models.ResourceProviders;
+import com.azure.resourcemanager.mysql.models.ServerAdministrators;
+import com.azure.resourcemanager.mysql.models.ServerBasedPerformanceTiers;
+import com.azure.resourcemanager.mysql.models.ServerKeys;
+import com.azure.resourcemanager.mysql.models.ServerParameters;
+import com.azure.resourcemanager.mysql.models.ServerSecurityAlertPolicies;
+import com.azure.resourcemanager.mysql.models.Servers;
+import com.azure.resourcemanager.mysql.models.TopQueryStatistics;
+import com.azure.resourcemanager.mysql.models.VirtualNetworkRules;
+import com.azure.resourcemanager.mysql.models.WaitStatistics;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * Entry point to MySqlManager. 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.
+ */
+public final class MySqlManager {
+ private Servers servers;
+
+ private Replicas replicas;
+
+ private FirewallRules firewallRules;
+
+ private VirtualNetworkRules virtualNetworkRules;
+
+ private Databases databases;
+
+ private Configurations configurations;
+
+ private ServerParameters serverParameters;
+
+ private LogFiles logFiles;
+
+ private ServerAdministrators serverAdministrators;
+
+ private RecoverableServers recoverableServers;
+
+ private ServerBasedPerformanceTiers serverBasedPerformanceTiers;
+
+ private LocationBasedPerformanceTiers locationBasedPerformanceTiers;
+
+ private CheckNameAvailabilities checkNameAvailabilities;
+
+ private Operations operations;
+
+ private ServerSecurityAlertPolicies serverSecurityAlertPolicies;
+
+ private QueryTexts queryTexts;
+
+ private TopQueryStatistics topQueryStatistics;
+
+ private WaitStatistics waitStatistics;
+
+ private ResourceProviders resourceProviders;
+
+ private Advisors advisors;
+
+ private RecommendedActions recommendedActions;
+
+ private LocationBasedRecommendedActionSessionsOperationStatus locationBasedRecommendedActionSessionsOperationStatus;
+
+ private LocationBasedRecommendedActionSessionsResults locationBasedRecommendedActionSessionsResults;
+
+ private PrivateEndpointConnections privateEndpointConnections;
+
+ private PrivateLinkResources privateLinkResources;
+
+ private ServerKeys serverKeys;
+
+ private final MySqlManagementClient clientObject;
+
+ private MySqlManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new MySqlManagementClientBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of MySql service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the MySql service API instance.
+ */
+ public static MySqlManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return configure().authenticate(credential, profile);
+ }
+
+ /**
+ * Gets a Configurable instance that can be used to create MySqlManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new MySqlManager.Configurable();
+ }
+
+ /** The Configurable allowing configurations to be set. */
+ public static final class Configurable {
+ private final ClientLogger logger = new ClientLogger(Configurable.class);
+
+ private HttpClient httpClient;
+ private HttpLogOptions httpLogOptions;
+ private final List policies = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the default poll interval, used when service does not provide "Retry-After" header.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of MySql service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the MySql service API instance.
+ */
+ public MySqlManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ if (retryPolicy == null) {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ List policies = new ArrayList<>();
+ policies
+ .add(
+ new UserAgentPolicy(
+ null,
+ "com.azure.resourcemanager.mysql",
+ "1.0.0-beta.1",
+ Configuration.getGlobalConfiguration()));
+ policies.add(new RequestIdPolicy());
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies
+ .add(
+ new BearerTokenAuthenticationPolicy(
+ credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new MySqlManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /** @return Resource collection API of Servers. */
+ public Servers servers() {
+ if (this.servers == null) {
+ this.servers = new ServersImpl(clientObject.getServers(), this);
+ }
+ return servers;
+ }
+
+ /** @return Resource collection API of Replicas. */
+ public Replicas replicas() {
+ if (this.replicas == null) {
+ this.replicas = new ReplicasImpl(clientObject.getReplicas(), this);
+ }
+ return replicas;
+ }
+
+ /** @return Resource collection API of FirewallRules. */
+ public FirewallRules firewallRules() {
+ if (this.firewallRules == null) {
+ this.firewallRules = new FirewallRulesImpl(clientObject.getFirewallRules(), this);
+ }
+ return firewallRules;
+ }
+
+ /** @return Resource collection API of VirtualNetworkRules. */
+ public VirtualNetworkRules virtualNetworkRules() {
+ if (this.virtualNetworkRules == null) {
+ this.virtualNetworkRules = new VirtualNetworkRulesImpl(clientObject.getVirtualNetworkRules(), this);
+ }
+ return virtualNetworkRules;
+ }
+
+ /** @return Resource collection API of Databases. */
+ public Databases databases() {
+ if (this.databases == null) {
+ this.databases = new DatabasesImpl(clientObject.getDatabases(), this);
+ }
+ return databases;
+ }
+
+ /** @return Resource collection API of Configurations. */
+ public Configurations configurations() {
+ if (this.configurations == null) {
+ this.configurations = new ConfigurationsImpl(clientObject.getConfigurations(), this);
+ }
+ return configurations;
+ }
+
+ /** @return Resource collection API of ServerParameters. */
+ public ServerParameters serverParameters() {
+ if (this.serverParameters == null) {
+ this.serverParameters = new ServerParametersImpl(clientObject.getServerParameters(), this);
+ }
+ return serverParameters;
+ }
+
+ /** @return Resource collection API of LogFiles. */
+ public LogFiles logFiles() {
+ if (this.logFiles == null) {
+ this.logFiles = new LogFilesImpl(clientObject.getLogFiles(), this);
+ }
+ return logFiles;
+ }
+
+ /** @return Resource collection API of ServerAdministrators. */
+ public ServerAdministrators serverAdministrators() {
+ if (this.serverAdministrators == null) {
+ this.serverAdministrators = new ServerAdministratorsImpl(clientObject.getServerAdministrators(), this);
+ }
+ return serverAdministrators;
+ }
+
+ /** @return Resource collection API of RecoverableServers. */
+ public RecoverableServers recoverableServers() {
+ if (this.recoverableServers == null) {
+ this.recoverableServers = new RecoverableServersImpl(clientObject.getRecoverableServers(), this);
+ }
+ return recoverableServers;
+ }
+
+ /** @return Resource collection API of ServerBasedPerformanceTiers. */
+ public ServerBasedPerformanceTiers serverBasedPerformanceTiers() {
+ if (this.serverBasedPerformanceTiers == null) {
+ this.serverBasedPerformanceTiers =
+ new ServerBasedPerformanceTiersImpl(clientObject.getServerBasedPerformanceTiers(), this);
+ }
+ return serverBasedPerformanceTiers;
+ }
+
+ /** @return Resource collection API of LocationBasedPerformanceTiers. */
+ public LocationBasedPerformanceTiers locationBasedPerformanceTiers() {
+ if (this.locationBasedPerformanceTiers == null) {
+ this.locationBasedPerformanceTiers =
+ new LocationBasedPerformanceTiersImpl(clientObject.getLocationBasedPerformanceTiers(), this);
+ }
+ return locationBasedPerformanceTiers;
+ }
+
+ /** @return Resource collection API of CheckNameAvailabilities. */
+ public CheckNameAvailabilities checkNameAvailabilities() {
+ if (this.checkNameAvailabilities == null) {
+ this.checkNameAvailabilities =
+ new CheckNameAvailabilitiesImpl(clientObject.getCheckNameAvailabilities(), this);
+ }
+ return checkNameAvailabilities;
+ }
+
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /** @return Resource collection API of ServerSecurityAlertPolicies. */
+ public ServerSecurityAlertPolicies serverSecurityAlertPolicies() {
+ if (this.serverSecurityAlertPolicies == null) {
+ this.serverSecurityAlertPolicies =
+ new ServerSecurityAlertPoliciesImpl(clientObject.getServerSecurityAlertPolicies(), this);
+ }
+ return serverSecurityAlertPolicies;
+ }
+
+ /** @return Resource collection API of QueryTexts. */
+ public QueryTexts queryTexts() {
+ if (this.queryTexts == null) {
+ this.queryTexts = new QueryTextsImpl(clientObject.getQueryTexts(), this);
+ }
+ return queryTexts;
+ }
+
+ /** @return Resource collection API of TopQueryStatistics. */
+ public TopQueryStatistics topQueryStatistics() {
+ if (this.topQueryStatistics == null) {
+ this.topQueryStatistics = new TopQueryStatisticsImpl(clientObject.getTopQueryStatistics(), this);
+ }
+ return topQueryStatistics;
+ }
+
+ /** @return Resource collection API of WaitStatistics. */
+ public WaitStatistics waitStatistics() {
+ if (this.waitStatistics == null) {
+ this.waitStatistics = new WaitStatisticsImpl(clientObject.getWaitStatistics(), this);
+ }
+ return waitStatistics;
+ }
+
+ /** @return Resource collection API of ResourceProviders. */
+ public ResourceProviders resourceProviders() {
+ if (this.resourceProviders == null) {
+ this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this);
+ }
+ return resourceProviders;
+ }
+
+ /** @return Resource collection API of Advisors. */
+ public Advisors advisors() {
+ if (this.advisors == null) {
+ this.advisors = new AdvisorsImpl(clientObject.getAdvisors(), this);
+ }
+ return advisors;
+ }
+
+ /** @return Resource collection API of RecommendedActions. */
+ public RecommendedActions recommendedActions() {
+ if (this.recommendedActions == null) {
+ this.recommendedActions = new RecommendedActionsImpl(clientObject.getRecommendedActions(), this);
+ }
+ return recommendedActions;
+ }
+
+ /** @return Resource collection API of LocationBasedRecommendedActionSessionsOperationStatus. */
+ public LocationBasedRecommendedActionSessionsOperationStatus
+ locationBasedRecommendedActionSessionsOperationStatus() {
+ if (this.locationBasedRecommendedActionSessionsOperationStatus == null) {
+ this.locationBasedRecommendedActionSessionsOperationStatus =
+ new LocationBasedRecommendedActionSessionsOperationStatusImpl(
+ clientObject.getLocationBasedRecommendedActionSessionsOperationStatus(), this);
+ }
+ return locationBasedRecommendedActionSessionsOperationStatus;
+ }
+
+ /** @return Resource collection API of LocationBasedRecommendedActionSessionsResults. */
+ public LocationBasedRecommendedActionSessionsResults locationBasedRecommendedActionSessionsResults() {
+ if (this.locationBasedRecommendedActionSessionsResults == null) {
+ this.locationBasedRecommendedActionSessionsResults =
+ new LocationBasedRecommendedActionSessionsResultsImpl(
+ clientObject.getLocationBasedRecommendedActionSessionsResults(), this);
+ }
+ return locationBasedRecommendedActionSessionsResults;
+ }
+
+ /** @return Resource collection API of PrivateEndpointConnections. */
+ public PrivateEndpointConnections privateEndpointConnections() {
+ if (this.privateEndpointConnections == null) {
+ this.privateEndpointConnections =
+ new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
+ }
+ return privateEndpointConnections;
+ }
+
+ /** @return Resource collection API of PrivateLinkResources. */
+ public PrivateLinkResources privateLinkResources() {
+ if (this.privateLinkResources == null) {
+ this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
+ }
+ return privateLinkResources;
+ }
+
+ /** @return Resource collection API of ServerKeys. */
+ public ServerKeys serverKeys() {
+ if (this.serverKeys == null) {
+ this.serverKeys = new ServerKeysImpl(clientObject.getServerKeys(), this);
+ }
+ return serverKeys;
+ }
+
+ /**
+ * @return Wrapped service client MySqlManagementClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public MySqlManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/AdvisorsClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/AdvisorsClient.java
new file mode 100644
index 0000000000000..6d80e88c27b2f
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/AdvisorsClient.java
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.AdvisorInner;
+
+/** An instance of this class provides access to all the operations defined in AdvisorsClient. */
+public interface AdvisorsClient {
+ /**
+ * Get a recommendation action advisor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advisorName The advisor name for recommendation action.
+ * @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 recommendation action advisor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AdvisorInner get(String resourceGroupName, String serverName, String advisorName);
+
+ /**
+ * Get a recommendation action advisor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advisorName The advisor name for recommendation action.
+ * @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 recommendation action advisor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String advisorName, Context context);
+
+ /**
+ * List recommendation action advisors.
+ *
+ * @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 query statistics.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * List recommendation action advisors.
+ *
+ * @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 query statistics.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/CheckNameAvailabilitiesClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/CheckNameAvailabilitiesClient.java
new file mode 100644
index 0000000000000..1b033c5d23593
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/CheckNameAvailabilitiesClient.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.NameAvailabilityInner;
+import com.azure.resourcemanager.mysql.models.NameAvailabilityRequest;
+
+/** An instance of this class provides access to all the operations defined in CheckNameAvailabilitiesClient. */
+public interface CheckNameAvailabilitiesClient {
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @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 resource name availability.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NameAvailabilityInner execute(NameAvailabilityRequest nameAvailabilityRequest);
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @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 resource name availability.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response executeWithResponse(
+ NameAvailabilityRequest nameAvailabilityRequest, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ConfigurationsClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ConfigurationsClient.java
new file mode 100644
index 0000000000000..9dca74a4bf8c9
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ConfigurationsClient.java
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.ConfigurationInner;
+
+/** An instance of this class provides access to all the operations defined in ConfigurationsClient. */
+public interface ConfigurationsClient {
+ /**
+ * 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)
+ SyncPoller, ConfigurationInner> beginCreateOrUpdate(
+ 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 represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ConfigurationInner> beginCreateOrUpdate(
+ 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)
+ ConfigurationInner createOrUpdate(
+ 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 represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ 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);
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String configurationName, Context context);
+
+ /**
+ * 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.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/DatabasesClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/DatabasesClient.java
new file mode 100644
index 0000000000000..004f7abdaf572
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/DatabasesClient.java
@@ -0,0 +1,197 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.DatabaseInner;
+
+/** An instance of this class provides access to all the operations defined in DatabasesClient. */
+public interface DatabasesClient {
+ /**
+ * Creates a new database or updates an existing 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 parameters The required parameters for creating or updating a 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 represents a Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DatabaseInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters);
+
+ /**
+ * Creates a new database or updates an existing 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 parameters The required parameters for creating or updating a 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 represents a Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, DatabaseInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context);
+
+ /**
+ * Creates a new database or updates an existing 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 parameters The required parameters for creating or updating a 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 represents a Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner createOrUpdate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters);
+
+ /**
+ * Creates a new database or updates an existing 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 parameters The required parameters for creating or updating a 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 represents a Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner createOrUpdate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context);
+
+ /**
+ * Deletes 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 the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Deletes 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 the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Deletes 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Deletes 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.
+ */
+ @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.
+ * @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);
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * List all the databases 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 databases.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * List all the databases 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 databases.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/FirewallRulesClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/FirewallRulesClient.java
new file mode 100644
index 0000000000000..7795744f817fc
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/FirewallRulesClient.java
@@ -0,0 +1,206 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.FirewallRuleInner;
+
+/** An instance of this class provides access to all the operations defined in FirewallRulesClient. */
+public interface FirewallRulesClient {
+ /**
+ * Creates a new firewall rule or updates an existing 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 parameters The required parameters for creating or updating a 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 represents a server firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, FirewallRuleInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters);
+
+ /**
+ * Creates a new firewall rule or updates an existing 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 parameters The required parameters for creating or updating a 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 represents a server firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, FirewallRuleInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String firewallRuleName,
+ FirewallRuleInner parameters,
+ Context context);
+
+ /**
+ * Creates a new firewall rule or updates an existing 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 parameters The required parameters for creating or updating a 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 represents a server firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FirewallRuleInner createOrUpdate(
+ String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters);
+
+ /**
+ * Creates a new firewall rule or updates an existing 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 parameters The required parameters for creating or updating a 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 represents a server firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FirewallRuleInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String firewallRuleName,
+ FirewallRuleInner parameters,
+ Context context);
+
+ /**
+ * Deletes 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 the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String firewallRuleName);
+
+ /**
+ * Deletes 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 the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String firewallRuleName, Context context);
+
+ /**
+ * Deletes 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String firewallRuleName);
+
+ /**
+ * Deletes 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.
+ */
+ @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.
+ * @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);
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String firewallRuleName, Context context);
+
+ /**
+ * List all the firewall rules 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 firewall rules.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * List all the firewall rules 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 firewall rules.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/LocationBasedPerformanceTiersClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/LocationBasedPerformanceTiersClient.java
new file mode 100644
index 0000000000000..77676b1c58acb
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/LocationBasedPerformanceTiersClient.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.PerformanceTierPropertiesInner;
+
+/** An instance of this class provides access to all the operations defined in LocationBasedPerformanceTiersClient. */
+public interface LocationBasedPerformanceTiersClient {
+ /**
+ * List all the performance tiers 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 a list of performance tiers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String locationName);
+
+ /**
+ * List all the performance tiers 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 a list of performance tiers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String locationName, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/LocationBasedRecommendedActionSessionsOperationStatusClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/LocationBasedRecommendedActionSessionsOperationStatusClient.java
new file mode 100644
index 0000000000000..4eb7978020333
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/LocationBasedRecommendedActionSessionsOperationStatusClient.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.RecommendedActionSessionsOperationStatusInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * LocationBasedRecommendedActionSessionsOperationStatusClient.
+ */
+public interface LocationBasedRecommendedActionSessionsOperationStatusClient {
+ /**
+ * Recommendation action session operation status.
+ *
+ * @param locationName The name of the location.
+ * @param operationId The operation identifier.
+ * @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 recommendation action session operation status.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RecommendedActionSessionsOperationStatusInner get(String locationName, String operationId);
+
+ /**
+ * Recommendation action session operation status.
+ *
+ * @param locationName The name of the location.
+ * @param operationId The operation identifier.
+ * @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 recommendation action session operation status.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String locationName, String operationId, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/LocationBasedRecommendedActionSessionsResultsClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/LocationBasedRecommendedActionSessionsResultsClient.java
new file mode 100644
index 0000000000000..0950d36b9e9cf
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/LocationBasedRecommendedActionSessionsResultsClient.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.RecommendationActionInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * LocationBasedRecommendedActionSessionsResultsClient.
+ */
+public interface LocationBasedRecommendedActionSessionsResultsClient {
+ /**
+ * Recommendation action session operation result.
+ *
+ * @param locationName The name of the location.
+ * @param operationId The operation identifier.
+ * @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 recommendation actions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String locationName, String operationId);
+
+ /**
+ * Recommendation action session operation result.
+ *
+ * @param locationName The name of the location.
+ * @param operationId The operation identifier.
+ * @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 recommendation actions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String locationName, String operationId, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/LogFilesClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/LogFilesClient.java
new file mode 100644
index 0000000000000..3e642773d827f
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/LogFilesClient.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.LogFileInner;
+
+/** An instance of this class provides access to all the operations defined in LogFilesClient. */
+public interface LogFilesClient {
+ /**
+ * List all the 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 a list of log files.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * List all the 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 a list of log files.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/MySqlManagementClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/MySqlManagementClient.java
new file mode 100644
index 0000000000000..9fddcbbaa2e70
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/MySqlManagementClient.java
@@ -0,0 +1,222 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for MySqlManagementClient class. */
+public interface MySqlManagementClient {
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the ServersClient object to access its operations.
+ *
+ * @return the ServersClient object.
+ */
+ ServersClient getServers();
+
+ /**
+ * Gets the ReplicasClient object to access its operations.
+ *
+ * @return the ReplicasClient object.
+ */
+ ReplicasClient getReplicas();
+
+ /**
+ * Gets the FirewallRulesClient object to access its operations.
+ *
+ * @return the FirewallRulesClient object.
+ */
+ FirewallRulesClient getFirewallRules();
+
+ /**
+ * Gets the VirtualNetworkRulesClient object to access its operations.
+ *
+ * @return the VirtualNetworkRulesClient object.
+ */
+ VirtualNetworkRulesClient getVirtualNetworkRules();
+
+ /**
+ * Gets the DatabasesClient object to access its operations.
+ *
+ * @return the DatabasesClient object.
+ */
+ DatabasesClient getDatabases();
+
+ /**
+ * Gets the ConfigurationsClient object to access its operations.
+ *
+ * @return the ConfigurationsClient object.
+ */
+ ConfigurationsClient getConfigurations();
+
+ /**
+ * Gets the ServerParametersClient object to access its operations.
+ *
+ * @return the ServerParametersClient object.
+ */
+ ServerParametersClient getServerParameters();
+
+ /**
+ * Gets the LogFilesClient object to access its operations.
+ *
+ * @return the LogFilesClient object.
+ */
+ LogFilesClient getLogFiles();
+
+ /**
+ * Gets the ServerAdministratorsClient object to access its operations.
+ *
+ * @return the ServerAdministratorsClient object.
+ */
+ ServerAdministratorsClient getServerAdministrators();
+
+ /**
+ * Gets the RecoverableServersClient object to access its operations.
+ *
+ * @return the RecoverableServersClient object.
+ */
+ RecoverableServersClient getRecoverableServers();
+
+ /**
+ * Gets the ServerBasedPerformanceTiersClient object to access its operations.
+ *
+ * @return the ServerBasedPerformanceTiersClient object.
+ */
+ ServerBasedPerformanceTiersClient getServerBasedPerformanceTiers();
+
+ /**
+ * Gets the LocationBasedPerformanceTiersClient object to access its operations.
+ *
+ * @return the LocationBasedPerformanceTiersClient object.
+ */
+ LocationBasedPerformanceTiersClient getLocationBasedPerformanceTiers();
+
+ /**
+ * Gets the CheckNameAvailabilitiesClient object to access its operations.
+ *
+ * @return the CheckNameAvailabilitiesClient object.
+ */
+ CheckNameAvailabilitiesClient getCheckNameAvailabilities();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the ServerSecurityAlertPoliciesClient object to access its operations.
+ *
+ * @return the ServerSecurityAlertPoliciesClient object.
+ */
+ ServerSecurityAlertPoliciesClient getServerSecurityAlertPolicies();
+
+ /**
+ * Gets the QueryTextsClient object to access its operations.
+ *
+ * @return the QueryTextsClient object.
+ */
+ QueryTextsClient getQueryTexts();
+
+ /**
+ * Gets the TopQueryStatisticsClient object to access its operations.
+ *
+ * @return the TopQueryStatisticsClient object.
+ */
+ TopQueryStatisticsClient getTopQueryStatistics();
+
+ /**
+ * Gets the WaitStatisticsClient object to access its operations.
+ *
+ * @return the WaitStatisticsClient object.
+ */
+ WaitStatisticsClient getWaitStatistics();
+
+ /**
+ * Gets the ResourceProvidersClient object to access its operations.
+ *
+ * @return the ResourceProvidersClient object.
+ */
+ ResourceProvidersClient getResourceProviders();
+
+ /**
+ * Gets the AdvisorsClient object to access its operations.
+ *
+ * @return the AdvisorsClient object.
+ */
+ AdvisorsClient getAdvisors();
+
+ /**
+ * Gets the RecommendedActionsClient object to access its operations.
+ *
+ * @return the RecommendedActionsClient object.
+ */
+ RecommendedActionsClient getRecommendedActions();
+
+ /**
+ * Gets the LocationBasedRecommendedActionSessionsOperationStatusClient object to access its operations.
+ *
+ * @return the LocationBasedRecommendedActionSessionsOperationStatusClient object.
+ */
+ LocationBasedRecommendedActionSessionsOperationStatusClient
+ getLocationBasedRecommendedActionSessionsOperationStatus();
+
+ /**
+ * Gets the LocationBasedRecommendedActionSessionsResultsClient object to access its operations.
+ *
+ * @return the LocationBasedRecommendedActionSessionsResultsClient object.
+ */
+ LocationBasedRecommendedActionSessionsResultsClient getLocationBasedRecommendedActionSessionsResults();
+
+ /**
+ * 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 ServerKeysClient object to access its operations.
+ *
+ * @return the ServerKeysClient object.
+ */
+ ServerKeysClient getServerKeys();
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/OperationsClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/OperationsClient.java
new file mode 100644
index 0000000000000..0df9053cc2510
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/OperationsClient.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.OperationListResultInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Lists all of the available REST API operations.
+ *
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationListResultInner list();
+
+ /**
+ * Lists all of the available REST API operations.
+ *
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listWithResponse(Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/PrivateEndpointConnectionsClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/PrivateEndpointConnectionsClient.java
new file mode 100644
index 0000000000000..be336a7d81c85
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/PrivateEndpointConnectionsClient.java
@@ -0,0 +1,289 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.mysql.models.TagsObject;
+
+/** 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.
+ * @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);
+
+ /**
+ * 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.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String privateEndpointConnectionName, 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 privateEndpointConnectionName parameter.
+ * @param parameters A private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ 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 privateEndpointConnectionName parameter.
+ * @param parameters A private endpoint connection.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ 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 privateEndpointConnectionName parameter.
+ * @param parameters A private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection.
+ */
+ @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 privateEndpointConnectionName parameter.
+ * @param parameters A private endpoint connection.
+ * @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.
+ */
+ @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 privateEndpointConnectionName parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ 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 privateEndpointConnectionName parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ 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 privateEndpointConnectionName parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @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 privateEndpointConnectionName parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Updates private endpoint connection with the specified tags.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The privateEndpointConnectionName parameter.
+ * @param parameters Parameters supplied to the Update private endpoint connection Tags 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, PrivateEndpointConnectionInner> beginUpdateTags(
+ String resourceGroupName, String serverName, String privateEndpointConnectionName, TagsObject parameters);
+
+ /**
+ * Updates private endpoint connection with the specified tags.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The privateEndpointConnectionName parameter.
+ * @param parameters Parameters supplied to the Update private endpoint connection Tags 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 a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, PrivateEndpointConnectionInner> beginUpdateTags(
+ String resourceGroupName,
+ String serverName,
+ String privateEndpointConnectionName,
+ TagsObject parameters,
+ Context context);
+
+ /**
+ * Updates private endpoint connection with the specified tags.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The privateEndpointConnectionName parameter.
+ * @param parameters Parameters supplied to the Update private endpoint connection Tags 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner updateTags(
+ String resourceGroupName, String serverName, String privateEndpointConnectionName, TagsObject parameters);
+
+ /**
+ * Updates private endpoint connection with the specified tags.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The privateEndpointConnectionName parameter.
+ * @param parameters Parameters supplied to the Update private endpoint connection Tags 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 a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner updateTags(
+ String resourceGroupName,
+ String serverName,
+ String privateEndpointConnectionName,
+ TagsObject parameters,
+ 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.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(
+ String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/PrivateLinkResourcesClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/PrivateLinkResourcesClient.java
new file mode 100644
index 0000000000000..f55392062e82b
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/PrivateLinkResourcesClient.java
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.PrivateLinkResourceInner;
+
+/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */
+public interface PrivateLinkResourcesClient {
+ /**
+ * Gets 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 the private link resources for MySQL server.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * Gets 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 the private link resources for MySQL server.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, 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);
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String groupName, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/QueryTextsClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/QueryTextsClient.java
new file mode 100644
index 0000000000000..23a120a169f1b
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/QueryTextsClient.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.QueryTextInner;
+import java.util.List;
+
+/** An instance of this class provides access to all the operations defined in QueryTextsClient. */
+public interface QueryTextsClient {
+ /**
+ * Retrieve the Query-Store query texts for the queryId.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param queryId The Query-Store query identifier.
+ * @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 Query Text.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ QueryTextInner get(String resourceGroupName, String serverName, String queryId);
+
+ /**
+ * Retrieve the Query-Store query texts for the queryId.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param queryId The Query-Store query identifier.
+ * @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 Query Text.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String queryId, Context context);
+
+ /**
+ * Retrieve the Query-Store query texts for specified queryIds.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param queryIds The query identifiers.
+ * @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 query texts.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, List queryIds);
+
+ /**
+ * Retrieve the Query-Store query texts for specified queryIds.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param queryIds The query identifiers.
+ * @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 query texts.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(
+ String resourceGroupName, String serverName, List queryIds, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/RecommendedActionsClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/RecommendedActionsClient.java
new file mode 100644
index 0000000000000..90af63b89d0c4
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/RecommendedActionsClient.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.RecommendationActionInner;
+
+/** An instance of this class provides access to all the operations defined in RecommendedActionsClient. */
+public interface RecommendedActionsClient {
+ /**
+ * Retrieve recommended actions from the advisor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advisorName The advisor name for recommendation action.
+ * @param recommendedActionName The recommended action name.
+ * @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 Recommendation Action.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RecommendationActionInner get(
+ String resourceGroupName, String serverName, String advisorName, String recommendedActionName);
+
+ /**
+ * Retrieve recommended actions from the advisor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advisorName The advisor name for recommendation action.
+ * @param recommendedActionName The recommended action name.
+ * @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 Recommendation Action.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String advisorName, String recommendedActionName, Context context);
+
+ /**
+ * Retrieve recommended actions from the advisor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advisorName The advisor name for recommendation action.
+ * @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 recommendation actions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(
+ String resourceGroupName, String serverName, String advisorName);
+
+ /**
+ * Retrieve recommended actions from the advisor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advisorName The advisor name for recommendation action.
+ * @param sessionId The recommendation action session identifier.
+ * @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 recommendation actions.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(
+ String resourceGroupName, String serverName, String advisorName, String sessionId, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/RecoverableServersClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/RecoverableServersClient.java
new file mode 100644
index 0000000000000..5b01504ebfd8c
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/RecoverableServersClient.java
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.RecoverableServerResourceInner;
+
+/** An instance of this class provides access to all the operations defined in RecoverableServersClient. */
+public interface RecoverableServersClient {
+ /**
+ * Gets a recoverable 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 recoverable MySQL Server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RecoverableServerResourceInner get(String resourceGroupName, String serverName);
+
+ /**
+ * Gets a recoverable 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 recoverable MySQL Server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ReplicasClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ReplicasClient.java
new file mode 100644
index 0000000000000..bcf9c6c79f852
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ReplicasClient.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.ServerInner;
+
+/** An instance of this class provides access to all the operations defined in ReplicasClient. */
+public interface ReplicasClient {
+ /**
+ * List all the replicas 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 a list of servers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * List all the replicas 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 a list of servers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ResourceProvidersClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ResourceProvidersClient.java
new file mode 100644
index 0000000000000..743c73af558eb
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ResourceProvidersClient.java
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.QueryPerformanceInsightResetDataResultInner;
+
+/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */
+public interface ResourceProvidersClient {
+ /**
+ * Reset data for Query Performance Insight.
+ *
+ * @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 result of Query Performance Insight data reset.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ QueryPerformanceInsightResetDataResultInner resetQueryPerformanceInsightData(
+ String resourceGroupName, String serverName);
+
+ /**
+ * Reset data for Query Performance Insight.
+ *
+ * @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 result of Query Performance Insight data reset.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response resetQueryPerformanceInsightDataWithResponse(
+ String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Create recommendation action session for the advisor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advisorName The advisor name for recommendation action.
+ * @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 the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginCreateRecommendedActionSession(
+ String resourceGroupName, String serverName, String advisorName, String databaseName);
+
+ /**
+ * Create recommendation action session for the advisor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advisorName The advisor name for recommendation action.
+ * @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 the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginCreateRecommendedActionSession(
+ String resourceGroupName, String serverName, String advisorName, String databaseName, Context context);
+
+ /**
+ * Create recommendation action session for the advisor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advisorName The advisor name for recommendation action.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void createRecommendedActionSession(
+ String resourceGroupName, String serverName, String advisorName, String databaseName);
+
+ /**
+ * Create recommendation action session for the advisor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advisorName The advisor name for recommendation action.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void createRecommendedActionSession(
+ String resourceGroupName, String serverName, String advisorName, String databaseName, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServerAdministratorsClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServerAdministratorsClient.java
new file mode 100644
index 0000000000000..8d53f0ace51d0
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServerAdministratorsClient.java
@@ -0,0 +1,190 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.ServerAdministratorResourceInner;
+
+/** An instance of this class provides access to all the operations defined in ServerAdministratorsClient. */
+public interface ServerAdministratorsClient {
+ /**
+ * Gets information about a AAD server administrator.
+ *
+ * @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 AAD server administrator.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerAdministratorResourceInner get(String resourceGroupName, String serverName);
+
+ /**
+ * Gets information about a AAD server administrator.
+ *
+ * @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 AAD server administrator.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the
+ * existing administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server 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 and external administrator to be created.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ServerAdministratorResourceInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, ServerAdministratorResourceInner properties);
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the
+ * existing administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server 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 and external administrator to be created.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ServerAdministratorResourceInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, ServerAdministratorResourceInner properties, Context context);
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the
+ * existing administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server 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 and external administrator to be created.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerAdministratorResourceInner createOrUpdate(
+ String resourceGroupName, String serverName, ServerAdministratorResourceInner properties);
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the
+ * existing administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server 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 and external administrator to be created.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerAdministratorResourceInner createOrUpdate(
+ String resourceGroupName, String serverName, ServerAdministratorResourceInner properties, Context context);
+
+ /**
+ * Deletes server active directory administrator.
+ *
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName);
+
+ /**
+ * Deletes server active directory administrator.
+ *
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Deletes server active directory administrator.
+ *
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName);
+
+ /**
+ * Deletes server active directory administrator.
+ *
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Returns a list of server Administrators.
+ *
+ * @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 to a list Active Directory Administrators request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName);
+
+ /**
+ * Returns a list of server Administrators.
+ *
+ * @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 to a list Active Directory Administrators request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServerBasedPerformanceTiersClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServerBasedPerformanceTiersClient.java
new file mode 100644
index 0000000000000..055f6bcbb1070
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServerBasedPerformanceTiersClient.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.PerformanceTierPropertiesInner;
+
+/** An instance of this class provides access to all the operations defined in ServerBasedPerformanceTiersClient. */
+public interface ServerBasedPerformanceTiersClient {
+ /**
+ * List all the performance tiers for a 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 performance tiers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName);
+
+ /**
+ * List all the performance tiers for a 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 performance tiers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServerKeysClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServerKeysClient.java
new file mode 100644
index 0000000000000..28e0b455d3556
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServerKeysClient.java
@@ -0,0 +1,197 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.ServerKeyInner;
+
+/** An instance of this class provides access to all the operations defined in ServerKeysClient. */
+public interface ServerKeysClient {
+ /**
+ * Gets a list of Server keys.
+ *
+ * @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 keys.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName);
+
+ /**
+ * Gets a list of Server keys.
+ *
+ * @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 keys.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Gets a MySQL Server key.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param keyName The name of the MySQL Server key to be retrieved.
+ * @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 MySQL Server key.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerKeyInner get(String resourceGroupName, String serverName, String keyName);
+
+ /**
+ * Gets a MySQL Server key.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param keyName The name of the MySQL Server key to be retrieved.
+ * @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 MySQL Server key.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String keyName, Context context);
+
+ /**
+ * Creates or updates a MySQL Server key.
+ *
+ * @param serverName The name of the server.
+ * @param keyName The name of the MySQL Server key to be operated on (updated or created).
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters The requested MySQL Server key resource 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 MySQL Server key.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ServerKeyInner> beginCreateOrUpdate(
+ String serverName, String keyName, String resourceGroupName, ServerKeyInner parameters);
+
+ /**
+ * Creates or updates a MySQL Server key.
+ *
+ * @param serverName The name of the server.
+ * @param keyName The name of the MySQL Server key to be operated on (updated or created).
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters The requested MySQL Server key resource 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 MySQL Server key.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ServerKeyInner> beginCreateOrUpdate(
+ String serverName, String keyName, String resourceGroupName, ServerKeyInner parameters, Context context);
+
+ /**
+ * Creates or updates a MySQL Server key.
+ *
+ * @param serverName The name of the server.
+ * @param keyName The name of the MySQL Server key to be operated on (updated or created).
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters The requested MySQL Server key resource 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 MySQL Server key.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerKeyInner createOrUpdate(
+ String serverName, String keyName, String resourceGroupName, ServerKeyInner parameters);
+
+ /**
+ * Creates or updates a MySQL Server key.
+ *
+ * @param serverName The name of the server.
+ * @param keyName The name of the MySQL Server key to be operated on (updated or created).
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters The requested MySQL Server key resource 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 MySQL Server key.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerKeyInner createOrUpdate(
+ String serverName, String keyName, String resourceGroupName, ServerKeyInner parameters, Context context);
+
+ /**
+ * Deletes the MySQL Server key with the given name.
+ *
+ * @param serverName The name of the server.
+ * @param keyName The name of the MySQL Server key to be deleted.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String serverName, String keyName, String resourceGroupName);
+
+ /**
+ * Deletes the MySQL Server key with the given name.
+ *
+ * @param serverName The name of the server.
+ * @param keyName The name of the MySQL Server key to be deleted.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String serverName, String keyName, String resourceGroupName, Context context);
+
+ /**
+ * Deletes the MySQL Server key with the given name.
+ *
+ * @param serverName The name of the server.
+ * @param keyName The name of the MySQL Server key to be deleted.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String serverName, String keyName, String resourceGroupName);
+
+ /**
+ * Deletes the MySQL Server key with the given name.
+ *
+ * @param serverName The name of the server.
+ * @param keyName The name of the MySQL Server key to be deleted.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String serverName, String keyName, String resourceGroupName, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServerParametersClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServerParametersClient.java
new file mode 100644
index 0000000000000..5077b79309da9
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServerParametersClient.java
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.ConfigurationListResultInner;
+
+/** An instance of this class provides access to all the operations defined in ServerParametersClient. */
+public interface ServerParametersClient {
+ /**
+ * 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 value 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ConfigurationListResultInner> beginListUpdateConfigurations(
+ String resourceGroupName, String serverName, ConfigurationListResultInner value);
+
+ /**
+ * 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 value 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ConfigurationListResultInner> beginListUpdateConfigurations(
+ String resourceGroupName, String serverName, ConfigurationListResultInner value, Context context);
+
+ /**
+ * 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 value 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationListResultInner listUpdateConfigurations(
+ String resourceGroupName, String serverName, ConfigurationListResultInner value);
+
+ /**
+ * 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 value 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationListResultInner listUpdateConfigurations(
+ String resourceGroupName, String serverName, ConfigurationListResultInner value, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServerSecurityAlertPoliciesClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServerSecurityAlertPoliciesClient.java
new file mode 100644
index 0000000000000..243818bf8ba46
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServerSecurityAlertPoliciesClient.java
@@ -0,0 +1,128 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.ServerSecurityAlertPolicyInner;
+import com.azure.resourcemanager.mysql.models.SecurityAlertPolicyName;
+
+/** An instance of this class provides access to all the operations defined in ServerSecurityAlertPoliciesClient. */
+public interface ServerSecurityAlertPoliciesClient {
+ /**
+ * Get a server's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param securityAlertPolicyName The name of the security alert policy.
+ * @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 security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerSecurityAlertPolicyInner get(
+ String resourceGroupName, String serverName, SecurityAlertPolicyName securityAlertPolicyName);
+
+ /**
+ * Get a server's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param securityAlertPolicyName The name of the security alert policy.
+ * @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 security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, SecurityAlertPolicyName securityAlertPolicyName, Context context);
+
+ /**
+ * Creates or updates a threat detection policy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param securityAlertPolicyName The name of the threat detection policy.
+ * @param parameters The server security alert policy.
+ * @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 security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ SecurityAlertPolicyName securityAlertPolicyName,
+ ServerSecurityAlertPolicyInner parameters);
+
+ /**
+ * Creates or updates a threat detection policy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param securityAlertPolicyName The name of the threat detection policy.
+ * @param parameters The server security alert policy.
+ * @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 security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ SecurityAlertPolicyName securityAlertPolicyName,
+ ServerSecurityAlertPolicyInner parameters,
+ Context context);
+
+ /**
+ * Creates or updates a threat detection policy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param securityAlertPolicyName The name of the threat detection policy.
+ * @param parameters The server security alert policy.
+ * @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 security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerSecurityAlertPolicyInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ SecurityAlertPolicyName securityAlertPolicyName,
+ ServerSecurityAlertPolicyInner parameters);
+
+ /**
+ * Creates or updates a threat detection policy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param securityAlertPolicyName The name of the threat detection policy.
+ * @param parameters The server security alert policy.
+ * @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 security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerSecurityAlertPolicyInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ SecurityAlertPolicyName securityAlertPolicyName,
+ ServerSecurityAlertPolicyInner parameters,
+ Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServersClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServersClient.java
new file mode 100644
index 0000000000000..6bfa7fae74ff5
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/ServersClient.java
@@ -0,0 +1,484 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.ServerInner;
+import com.azure.resourcemanager.mysql.models.ServerForCreate;
+import com.azure.resourcemanager.mysql.models.ServerUpdateParameters;
+import com.azure.resourcemanager.mysql.models.ServerUpgradeParameters;
+
+/** An instance of this class provides access to all the operations defined in ServersClient. */
+public interface ServersClient {
+ /**
+ * Creates a new server or updates an existing server. The update action will overwrite the existing 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 creating or updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ServerInner> beginCreate(
+ String resourceGroupName, String serverName, ServerForCreate parameters);
+
+ /**
+ * Creates a new server or updates an existing server. The update action will overwrite the existing 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 creating or updating a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ServerInner> beginCreate(
+ String resourceGroupName, String serverName, ServerForCreate parameters, Context context);
+
+ /**
+ * Creates a new server or updates an existing server. The update action will overwrite the existing 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 creating or updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerInner create(String resourceGroupName, String serverName, ServerForCreate parameters);
+
+ /**
+ * Creates a new server or updates an existing server. The update action will overwrite the existing 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 creating or updating a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerInner create(String resourceGroupName, String serverName, ServerForCreate parameters, Context context);
+
+ /**
+ * Updates an existing server. The request body can contain one to many of the properties present in the normal
+ * server definition.
+ *
+ * @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 updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ServerInner> beginUpdate(
+ String resourceGroupName, String serverName, ServerUpdateParameters parameters);
+
+ /**
+ * Updates an existing server. The request body can contain one to many of the properties present in the normal
+ * server definition.
+ *
+ * @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 updating a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ServerInner> beginUpdate(
+ String resourceGroupName, String serverName, ServerUpdateParameters parameters, Context context);
+
+ /**
+ * Updates an existing server. The request body can contain one to many of the properties present in the normal
+ * server definition.
+ *
+ * @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 updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerInner update(String resourceGroupName, String serverName, ServerUpdateParameters parameters);
+
+ /**
+ * Updates an existing server. The request body can contain one to many of the properties present in the normal
+ * server definition.
+ *
+ * @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 updating a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerInner update(String resourceGroupName, String serverName, ServerUpdateParameters parameters, Context context);
+
+ /**
+ * Deletes 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 the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName);
+
+ /**
+ * Deletes 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 the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Deletes 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName);
+
+ /**
+ * Deletes 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.
+ */
+ @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.
+ * @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);
+
+ /**
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * List all the servers in a given resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of servers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List all the servers in a given resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of servers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * List all the servers in a given subscription.
+ *
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List all the servers in a given subscription.
+ *
+ * @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 servers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Restarts 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 the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginRestart(String resourceGroupName, String serverName);
+
+ /**
+ * Restarts 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 the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginRestart(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Restarts 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void restart(String resourceGroupName, String serverName);
+
+ /**
+ * Restarts 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void restart(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Starts a stopped 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginStart(String resourceGroupName, String serverName);
+
+ /**
+ * Starts a stopped 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginStart(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Starts a stopped 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void start(String resourceGroupName, String serverName);
+
+ /**
+ * Starts a stopped 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void start(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Stops a running 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginStop(String resourceGroupName, String serverName);
+
+ /**
+ * Stops a running 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginStop(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Stops a running 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void stop(String resourceGroupName, String serverName);
+
+ /**
+ * Stops a running 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void stop(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Upgrade server version.
+ *
+ * @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 updating 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginUpgrade(
+ String resourceGroupName, String serverName, ServerUpgradeParameters parameters);
+
+ /**
+ * Upgrade server version.
+ *
+ * @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 updating 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginUpgrade(
+ String resourceGroupName, String serverName, ServerUpgradeParameters parameters, Context context);
+
+ /**
+ * Upgrade server version.
+ *
+ * @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 updating 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 upgrade(String resourceGroupName, String serverName, ServerUpgradeParameters parameters);
+
+ /**
+ * Upgrade server version.
+ *
+ * @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 updating 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 upgrade(String resourceGroupName, String serverName, ServerUpgradeParameters parameters, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/TopQueryStatisticsClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/TopQueryStatisticsClient.java
new file mode 100644
index 0000000000000..fae7069081486
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/TopQueryStatisticsClient.java
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.QueryStatisticInner;
+import com.azure.resourcemanager.mysql.models.TopQueryStatisticsInput;
+
+/** An instance of this class provides access to all the operations defined in TopQueryStatisticsClient. */
+public interface TopQueryStatisticsClient {
+ /**
+ * Retrieve the query statistic for specified identifier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param queryStatisticId The Query Statistic identifier.
+ * @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 Query Statistic.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ QueryStatisticInner get(String resourceGroupName, String serverName, String queryStatisticId);
+
+ /**
+ * Retrieve the query statistic for specified identifier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param queryStatisticId The Query Statistic identifier.
+ * @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 Query Statistic.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String queryStatisticId, Context context);
+
+ /**
+ * Retrieve the Query-Store top queries for specified metric and aggregation.
+ *
+ * @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 retrieving top query statistics.
+ * @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 query statistics.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(
+ String resourceGroupName, String serverName, TopQueryStatisticsInput parameters);
+
+ /**
+ * Retrieve the Query-Store top queries for specified metric and aggregation.
+ *
+ * @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 retrieving top query statistics.
+ * @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 query statistics.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(
+ String resourceGroupName, String serverName, TopQueryStatisticsInput parameters, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/VirtualNetworkRulesClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/VirtualNetworkRulesClient.java
new file mode 100644
index 0000000000000..a4b5f5428aa29
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/VirtualNetworkRulesClient.java
@@ -0,0 +1,206 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.VirtualNetworkRuleInner;
+
+/** An instance of this class provides access to all the operations defined in VirtualNetworkRulesClient. */
+public interface VirtualNetworkRulesClient {
+ /**
+ * Gets a virtual network rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network 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 a virtual network rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualNetworkRuleInner get(String resourceGroupName, String serverName, String virtualNetworkRuleName);
+
+ /**
+ * Gets a virtual network rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network 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 a virtual network rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context);
+
+ /**
+ * Creates or updates an existing virtual network rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network rule.
+ * @param parameters The requested virtual Network Rule Resource 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 virtual network rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, VirtualNetworkRuleInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters);
+
+ /**
+ * Creates or updates an existing virtual network rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network rule.
+ * @param parameters The requested virtual Network Rule Resource 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 virtual network rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, VirtualNetworkRuleInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String virtualNetworkRuleName,
+ VirtualNetworkRuleInner parameters,
+ Context context);
+
+ /**
+ * Creates or updates an existing virtual network rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network rule.
+ * @param parameters The requested virtual Network Rule Resource 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 virtual network rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualNetworkRuleInner createOrUpdate(
+ String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters);
+
+ /**
+ * Creates or updates an existing virtual network rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network rule.
+ * @param parameters The requested virtual Network Rule Resource 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 virtual network rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualNetworkRuleInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String virtualNetworkRuleName,
+ VirtualNetworkRuleInner parameters,
+ Context context);
+
+ /**
+ * Deletes the virtual network rule with the given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network 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 the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String virtualNetworkRuleName);
+
+ /**
+ * Deletes the virtual network rule with the given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network 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 the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context);
+
+ /**
+ * Deletes the virtual network rule with the given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String virtualNetworkRuleName);
+
+ /**
+ * Deletes the virtual network rule with the given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context);
+
+ /**
+ * Gets a list of virtual network rules in 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 a list of virtual network rules in a server.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * Gets a list of virtual network rules in 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 a list of virtual network rules in a server.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/WaitStatisticsClient.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/WaitStatisticsClient.java
new file mode 100644
index 0000000000000..786c730ba84e7
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/WaitStatisticsClient.java
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.fluent.models.WaitStatisticInner;
+import com.azure.resourcemanager.mysql.models.WaitStatisticsInput;
+
+/** An instance of this class provides access to all the operations defined in WaitStatisticsClient. */
+public interface WaitStatisticsClient {
+ /**
+ * Retrieve wait statistics for specified identifier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param waitStatisticsId The Wait Statistic identifier.
+ * @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 Wait Statistic.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WaitStatisticInner get(String resourceGroupName, String serverName, String waitStatisticsId);
+
+ /**
+ * Retrieve wait statistics for specified identifier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param waitStatisticsId The Wait Statistic identifier.
+ * @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 Wait Statistic.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String waitStatisticsId, Context context);
+
+ /**
+ * Retrieve wait statistics for specified aggregation window.
+ *
+ * @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 retrieving wait statistics.
+ * @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 wait statistics.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(
+ String resourceGroupName, String serverName, WaitStatisticsInput parameters);
+
+ /**
+ * Retrieve wait statistics for specified aggregation window.
+ *
+ * @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 retrieving wait statistics.
+ * @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 wait statistics.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(
+ String resourceGroupName, String serverName, WaitStatisticsInput parameters, Context context);
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/AdvisorInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/AdvisorInner.java
new file mode 100644
index 0000000000000..13008b6c6a8d2
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/AdvisorInner.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents a recommendation action advisor. */
+@Fluent
+public final class AdvisorInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AdvisorInner.class);
+
+ /*
+ * The properties of a recommendation action advisor.
+ */
+ @JsonProperty(value = "properties")
+ private Object properties;
+
+ /**
+ * Get the properties property: The properties of a recommendation action advisor.
+ *
+ * @return the properties value.
+ */
+ public Object properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The properties of a recommendation action advisor.
+ *
+ * @param properties the properties value to set.
+ * @return the AdvisorInner object itself.
+ */
+ public AdvisorInner withProperties(Object properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ConfigurationInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ConfigurationInner.java
new file mode 100644
index 0000000000000..2cc948fb08185
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ConfigurationInner.java
@@ -0,0 +1,139 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents a Configuration. */
+@JsonFlatten
+@Fluent
+public class ConfigurationInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationInner.class);
+
+ /*
+ * Value of the configuration.
+ */
+ @JsonProperty(value = "properties.value")
+ private String value;
+
+ /*
+ * Description of the configuration.
+ */
+ @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY)
+ private String description;
+
+ /*
+ * Default value of the configuration.
+ */
+ @JsonProperty(value = "properties.defaultValue", access = JsonProperty.Access.WRITE_ONLY)
+ private String defaultValue;
+
+ /*
+ * Data type of the configuration.
+ */
+ @JsonProperty(value = "properties.dataType", access = JsonProperty.Access.WRITE_ONLY)
+ private String dataType;
+
+ /*
+ * Allowed values of the configuration.
+ */
+ @JsonProperty(value = "properties.allowedValues", access = JsonProperty.Access.WRITE_ONLY)
+ private String allowedValues;
+
+ /*
+ * Source of the configuration.
+ */
+ @JsonProperty(value = "properties.source")
+ private String source;
+
+ /**
+ * Get the value property: Value of the configuration.
+ *
+ * @return the value value.
+ */
+ public String value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Value of the configuration.
+ *
+ * @param value the value value to set.
+ * @return the ConfigurationInner object itself.
+ */
+ public ConfigurationInner withValue(String value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the description property: Description of the configuration.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Get the defaultValue property: Default value of the configuration.
+ *
+ * @return the defaultValue value.
+ */
+ public String defaultValue() {
+ return this.defaultValue;
+ }
+
+ /**
+ * Get the dataType property: Data type of the configuration.
+ *
+ * @return the dataType value.
+ */
+ public String dataType() {
+ return this.dataType;
+ }
+
+ /**
+ * Get the allowedValues property: Allowed values of the configuration.
+ *
+ * @return the allowedValues value.
+ */
+ public String allowedValues() {
+ return this.allowedValues;
+ }
+
+ /**
+ * Get the source property: Source of the configuration.
+ *
+ * @return the source value.
+ */
+ public String source() {
+ return this.source;
+ }
+
+ /**
+ * Set the source property: Source of the configuration.
+ *
+ * @param source the source value to set.
+ * @return the ConfigurationInner object itself.
+ */
+ public ConfigurationInner withSource(String source) {
+ this.source = source;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ConfigurationListResultInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ConfigurationListResultInner.java
new file mode 100644
index 0000000000000..547bfd1bb541d
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ConfigurationListResultInner.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A list of server configurations. */
+@Fluent
+public final class ConfigurationListResultInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationListResultInner.class);
+
+ /*
+ * The list of server configurations.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /**
+ * Get the value property: The list of server configurations.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.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;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/DatabaseInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/DatabaseInner.java
new file mode 100644
index 0000000000000..9af969ea77715
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/DatabaseInner.java
@@ -0,0 +1,79 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents a Database. */
+@JsonFlatten
+@Fluent
+public class DatabaseInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseInner.class);
+
+ /*
+ * The charset of the database.
+ */
+ @JsonProperty(value = "properties.charset")
+ private String charset;
+
+ /*
+ * The collation of the database.
+ */
+ @JsonProperty(value = "properties.collation")
+ private String collation;
+
+ /**
+ * Get the charset property: The charset of the database.
+ *
+ * @return the charset value.
+ */
+ public String charset() {
+ return this.charset;
+ }
+
+ /**
+ * Set the charset property: The charset of the database.
+ *
+ * @param charset the charset value to set.
+ * @return the DatabaseInner object itself.
+ */
+ public DatabaseInner withCharset(String charset) {
+ this.charset = charset;
+ return this;
+ }
+
+ /**
+ * Get the collation property: The collation of the database.
+ *
+ * @return the collation value.
+ */
+ public String collation() {
+ return this.collation;
+ }
+
+ /**
+ * Set the collation property: The collation of the database.
+ *
+ * @param collation the collation value to set.
+ * @return the DatabaseInner object itself.
+ */
+ public DatabaseInner withCollation(String collation) {
+ this.collation = collation;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/FirewallRuleInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/FirewallRuleInner.java
new file mode 100644
index 0000000000000..1f9144d3123b1
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/FirewallRuleInner.java
@@ -0,0 +1,90 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents a server firewall rule. */
+@JsonFlatten
+@Fluent
+public class FirewallRuleInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(FirewallRuleInner.class);
+
+ /*
+ * The start IP address of the server firewall rule. Must be IPv4 format.
+ */
+ @JsonProperty(value = "properties.startIpAddress", required = true)
+ private String startIpAddress;
+
+ /*
+ * The end IP address of the server firewall rule. Must be IPv4 format.
+ */
+ @JsonProperty(value = "properties.endIpAddress", required = true)
+ private String endIpAddress;
+
+ /**
+ * Get the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format.
+ *
+ * @return the startIpAddress value.
+ */
+ public String startIpAddress() {
+ return this.startIpAddress;
+ }
+
+ /**
+ * Set the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format.
+ *
+ * @param startIpAddress the startIpAddress value to set.
+ * @return the FirewallRuleInner object itself.
+ */
+ public FirewallRuleInner withStartIpAddress(String startIpAddress) {
+ this.startIpAddress = startIpAddress;
+ return this;
+ }
+
+ /**
+ * Get the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format.
+ *
+ * @return the endIpAddress value.
+ */
+ public String endIpAddress() {
+ return this.endIpAddress;
+ }
+
+ /**
+ * Set the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format.
+ *
+ * @param endIpAddress the endIpAddress value to set.
+ * @return the FirewallRuleInner object itself.
+ */
+ public FirewallRuleInner withEndIpAddress(String endIpAddress) {
+ this.endIpAddress = endIpAddress;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (startIpAddress() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property startIpAddress in model FirewallRuleInner"));
+ }
+ if (endIpAddress() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property endIpAddress in model FirewallRuleInner"));
+ }
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/LogFileInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/LogFileInner.java
new file mode 100644
index 0000000000000..e1649d3f0d037
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/LogFileInner.java
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Represents a log file. */
+@JsonFlatten
+@Fluent
+public class LogFileInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LogFileInner.class);
+
+ /*
+ * Size of the log file.
+ */
+ @JsonProperty(value = "properties.sizeInKB")
+ private Long sizeInKB;
+
+ /*
+ * Creation timestamp of the log file.
+ */
+ @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime createdTime;
+
+ /*
+ * Last modified timestamp of the log file.
+ */
+ @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime lastModifiedTime;
+
+ /*
+ * Type of the log file.
+ */
+ @JsonProperty(value = "properties.type")
+ private String typePropertiesType;
+
+ /*
+ * The url to download the log file from.
+ */
+ @JsonProperty(value = "properties.url")
+ private String url;
+
+ /**
+ * Get the sizeInKB property: Size of the log file.
+ *
+ * @return the sizeInKB value.
+ */
+ public Long sizeInKB() {
+ return this.sizeInKB;
+ }
+
+ /**
+ * Set the sizeInKB property: Size of the log file.
+ *
+ * @param sizeInKB the sizeInKB value to set.
+ * @return the LogFileInner object itself.
+ */
+ public LogFileInner withSizeInKB(Long sizeInKB) {
+ this.sizeInKB = sizeInKB;
+ return this;
+ }
+
+ /**
+ * Get the createdTime property: Creation timestamp of the log file.
+ *
+ * @return the createdTime value.
+ */
+ public OffsetDateTime createdTime() {
+ return this.createdTime;
+ }
+
+ /**
+ * Get the lastModifiedTime property: Last modified timestamp of the log file.
+ *
+ * @return the lastModifiedTime value.
+ */
+ public OffsetDateTime lastModifiedTime() {
+ return this.lastModifiedTime;
+ }
+
+ /**
+ * Get the typePropertiesType property: Type of the log file.
+ *
+ * @return the typePropertiesType value.
+ */
+ public String typePropertiesType() {
+ return this.typePropertiesType;
+ }
+
+ /**
+ * Set the typePropertiesType property: Type of the log file.
+ *
+ * @param typePropertiesType the typePropertiesType value to set.
+ * @return the LogFileInner object itself.
+ */
+ public LogFileInner withTypePropertiesType(String typePropertiesType) {
+ this.typePropertiesType = typePropertiesType;
+ return this;
+ }
+
+ /**
+ * Get the url property: The url to download the log file from.
+ *
+ * @return the url value.
+ */
+ public String url() {
+ return this.url;
+ }
+
+ /**
+ * Set the url property: The url to download the log file from.
+ *
+ * @param url the url value to set.
+ * @return the LogFileInner object itself.
+ */
+ public LogFileInner withUrl(String url) {
+ this.url = url;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/NameAvailabilityInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/NameAvailabilityInner.java
new file mode 100644
index 0000000000000..89e8f76505a12
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/NameAvailabilityInner.java
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents a resource name availability. */
+@Fluent
+public final class NameAvailabilityInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(NameAvailabilityInner.class);
+
+ /*
+ * Error Message.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /*
+ * Indicates whether the resource name is available.
+ */
+ @JsonProperty(value = "nameAvailable")
+ private Boolean nameAvailable;
+
+ /*
+ * Reason for name being unavailable.
+ */
+ @JsonProperty(value = "reason")
+ private String reason;
+
+ /**
+ * Get the message property: Error Message.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set the message property: Error Message.
+ *
+ * @param message the message value to set.
+ * @return the NameAvailabilityInner object itself.
+ */
+ public NameAvailabilityInner withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get the nameAvailable property: Indicates whether the resource name is available.
+ *
+ * @return the nameAvailable value.
+ */
+ public Boolean nameAvailable() {
+ return this.nameAvailable;
+ }
+
+ /**
+ * Set the nameAvailable property: Indicates whether the resource name is available.
+ *
+ * @param nameAvailable the nameAvailable value to set.
+ * @return the NameAvailabilityInner object itself.
+ */
+ public NameAvailabilityInner withNameAvailable(Boolean nameAvailable) {
+ this.nameAvailable = nameAvailable;
+ return this;
+ }
+
+ /**
+ * Get the reason property: Reason for name being unavailable.
+ *
+ * @return the reason value.
+ */
+ public String reason() {
+ return this.reason;
+ }
+
+ /**
+ * Set the reason property: Reason for name being unavailable.
+ *
+ * @param reason the reason value to set.
+ * @return the NameAvailabilityInner object itself.
+ */
+ public NameAvailabilityInner withReason(String reason) {
+ this.reason = reason;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/OperationListResultInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/OperationListResultInner.java
new file mode 100644
index 0000000000000..acd37ddf8268f
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/OperationListResultInner.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysql.models.Operation;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A list of resource provider operations. */
+@Fluent
+public final class OperationListResultInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResultInner.class);
+
+ /*
+ * The list of resource provider operations.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /**
+ * Get the value property: The list of resource provider operations.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: The list of resource provider operations.
+ *
+ * @param value the value value to set.
+ * @return the OperationListResultInner object itself.
+ */
+ public OperationListResultInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/PerformanceTierPropertiesInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/PerformanceTierPropertiesInner.java
new file mode 100644
index 0000000000000..4cb28266097c1
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/PerformanceTierPropertiesInner.java
@@ -0,0 +1,238 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysql.models.PerformanceTierServiceLevelObjectives;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Performance tier properties. */
+@Fluent
+public final class PerformanceTierPropertiesInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PerformanceTierPropertiesInner.class);
+
+ /*
+ * ID of the performance tier.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Maximum Backup retention in days for the performance tier edition
+ */
+ @JsonProperty(value = "maxBackupRetentionDays")
+ private Integer maxBackupRetentionDays;
+
+ /*
+ * Minimum Backup retention in days for the performance tier edition
+ */
+ @JsonProperty(value = "minBackupRetentionDays")
+ private Integer minBackupRetentionDays;
+
+ /*
+ * Max storage allowed for a server.
+ */
+ @JsonProperty(value = "maxStorageMB")
+ private Integer maxStorageMB;
+
+ /*
+ * Max storage allowed for a server.
+ */
+ @JsonProperty(value = "minLargeStorageMB")
+ private Integer minLargeStorageMB;
+
+ /*
+ * Max storage allowed for a server.
+ */
+ @JsonProperty(value = "maxLargeStorageMB")
+ private Integer maxLargeStorageMB;
+
+ /*
+ * Max storage allowed for a server.
+ */
+ @JsonProperty(value = "minStorageMB")
+ private Integer minStorageMB;
+
+ /*
+ * Service level objectives associated with the performance tier
+ */
+ @JsonProperty(value = "serviceLevelObjectives")
+ private List serviceLevelObjectives;
+
+ /**
+ * Get the id property: ID of the performance tier.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: ID of the performance tier.
+ *
+ * @param id the id value to set.
+ * @return the PerformanceTierPropertiesInner object itself.
+ */
+ public PerformanceTierPropertiesInner withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the maxBackupRetentionDays property: Maximum Backup retention in days for the performance tier edition.
+ *
+ * @return the maxBackupRetentionDays value.
+ */
+ public Integer maxBackupRetentionDays() {
+ return this.maxBackupRetentionDays;
+ }
+
+ /**
+ * Set the maxBackupRetentionDays property: Maximum Backup retention in days for the performance tier edition.
+ *
+ * @param maxBackupRetentionDays the maxBackupRetentionDays value to set.
+ * @return the PerformanceTierPropertiesInner object itself.
+ */
+ public PerformanceTierPropertiesInner withMaxBackupRetentionDays(Integer maxBackupRetentionDays) {
+ this.maxBackupRetentionDays = maxBackupRetentionDays;
+ return this;
+ }
+
+ /**
+ * Get the minBackupRetentionDays property: Minimum Backup retention in days for the performance tier edition.
+ *
+ * @return the minBackupRetentionDays value.
+ */
+ public Integer minBackupRetentionDays() {
+ return this.minBackupRetentionDays;
+ }
+
+ /**
+ * Set the minBackupRetentionDays property: Minimum Backup retention in days for the performance tier edition.
+ *
+ * @param minBackupRetentionDays the minBackupRetentionDays value to set.
+ * @return the PerformanceTierPropertiesInner object itself.
+ */
+ public PerformanceTierPropertiesInner withMinBackupRetentionDays(Integer minBackupRetentionDays) {
+ this.minBackupRetentionDays = minBackupRetentionDays;
+ return this;
+ }
+
+ /**
+ * Get the maxStorageMB property: Max storage allowed for a server.
+ *
+ * @return the maxStorageMB value.
+ */
+ public Integer maxStorageMB() {
+ return this.maxStorageMB;
+ }
+
+ /**
+ * Set the maxStorageMB property: Max storage allowed for a server.
+ *
+ * @param maxStorageMB the maxStorageMB value to set.
+ * @return the PerformanceTierPropertiesInner object itself.
+ */
+ public PerformanceTierPropertiesInner withMaxStorageMB(Integer maxStorageMB) {
+ this.maxStorageMB = maxStorageMB;
+ return this;
+ }
+
+ /**
+ * Get the minLargeStorageMB property: Max storage allowed for a server.
+ *
+ * @return the minLargeStorageMB value.
+ */
+ public Integer minLargeStorageMB() {
+ return this.minLargeStorageMB;
+ }
+
+ /**
+ * Set the minLargeStorageMB property: Max storage allowed for a server.
+ *
+ * @param minLargeStorageMB the minLargeStorageMB value to set.
+ * @return the PerformanceTierPropertiesInner object itself.
+ */
+ public PerformanceTierPropertiesInner withMinLargeStorageMB(Integer minLargeStorageMB) {
+ this.minLargeStorageMB = minLargeStorageMB;
+ return this;
+ }
+
+ /**
+ * Get the maxLargeStorageMB property: Max storage allowed for a server.
+ *
+ * @return the maxLargeStorageMB value.
+ */
+ public Integer maxLargeStorageMB() {
+ return this.maxLargeStorageMB;
+ }
+
+ /**
+ * Set the maxLargeStorageMB property: Max storage allowed for a server.
+ *
+ * @param maxLargeStorageMB the maxLargeStorageMB value to set.
+ * @return the PerformanceTierPropertiesInner object itself.
+ */
+ public PerformanceTierPropertiesInner withMaxLargeStorageMB(Integer maxLargeStorageMB) {
+ this.maxLargeStorageMB = maxLargeStorageMB;
+ return this;
+ }
+
+ /**
+ * Get the minStorageMB property: Max storage allowed for a server.
+ *
+ * @return the minStorageMB value.
+ */
+ public Integer minStorageMB() {
+ return this.minStorageMB;
+ }
+
+ /**
+ * Set the minStorageMB property: Max storage allowed for a server.
+ *
+ * @param minStorageMB the minStorageMB value to set.
+ * @return the PerformanceTierPropertiesInner object itself.
+ */
+ public PerformanceTierPropertiesInner withMinStorageMB(Integer minStorageMB) {
+ this.minStorageMB = minStorageMB;
+ return this;
+ }
+
+ /**
+ * Get the serviceLevelObjectives property: Service level objectives associated with the performance tier.
+ *
+ * @return the serviceLevelObjectives value.
+ */
+ public List serviceLevelObjectives() {
+ return this.serviceLevelObjectives;
+ }
+
+ /**
+ * Set the serviceLevelObjectives property: Service level objectives associated with the performance tier.
+ *
+ * @param serviceLevelObjectives the serviceLevelObjectives value to set.
+ * @return the PerformanceTierPropertiesInner object itself.
+ */
+ public PerformanceTierPropertiesInner withServiceLevelObjectives(
+ List serviceLevelObjectives) {
+ this.serviceLevelObjectives = serviceLevelObjectives;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (serviceLevelObjectives() != null) {
+ serviceLevelObjectives().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/PrivateEndpointConnectionInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/PrivateEndpointConnectionInner.java
new file mode 100644
index 0000000000000..c01df05c22ae4
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/PrivateEndpointConnectionInner.java
@@ -0,0 +1,103 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysql.models.PrivateEndpointProperty;
+import com.azure.resourcemanager.mysql.models.PrivateLinkServiceConnectionStateProperty;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A private endpoint connection. */
+@JsonFlatten
+@Fluent
+public class PrivateEndpointConnectionInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class);
+
+ /*
+ * Private endpoint which the connection belongs to.
+ */
+ @JsonProperty(value = "properties.privateEndpoint")
+ private PrivateEndpointProperty privateEndpoint;
+
+ /*
+ * Connection state of the private endpoint connection.
+ */
+ @JsonProperty(value = "properties.privateLinkServiceConnectionState")
+ private PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState;
+
+ /*
+ * State of the private endpoint connection.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private String provisioningState;
+
+ /**
+ * Get the privateEndpoint property: Private endpoint which the connection belongs to.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpointProperty privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint property: Private endpoint which the connection belongs to.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpointProperty privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: Connection state of the private endpoint connection.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: Connection state of the private endpoint connection.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: State of the private endpoint connection.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpoint() != null) {
+ privateEndpoint().validate();
+ }
+ if (privateLinkServiceConnectionState() != null) {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/PrivateLinkResourceInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/PrivateLinkResourceInner.java
new file mode 100644
index 0000000000000..ce1dff85ddfc2
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/PrivateLinkResourceInner.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysql.models.PrivateLinkResourceProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A private link resource. */
+@Immutable
+public final class PrivateLinkResourceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class);
+
+ /*
+ * The private link resource group id.
+ */
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private PrivateLinkResourceProperties properties;
+
+ /**
+ * Get the properties property: The private link resource group id.
+ *
+ * @return the properties value.
+ */
+ public PrivateLinkResourceProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/QueryPerformanceInsightResetDataResultInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/QueryPerformanceInsightResetDataResultInner.java
new file mode 100644
index 0000000000000..e1c68acd3df96
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/QueryPerformanceInsightResetDataResultInner.java
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysql.models.QueryPerformanceInsightResetDataResultState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Result of Query Performance Insight data reset. */
+@Fluent
+public final class QueryPerformanceInsightResetDataResultInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryPerformanceInsightResetDataResultInner.class);
+
+ /*
+ * Indicates result of the operation.
+ */
+ @JsonProperty(value = "status")
+ private QueryPerformanceInsightResetDataResultState status;
+
+ /*
+ * operation message.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /**
+ * Get the status property: Indicates result of the operation.
+ *
+ * @return the status value.
+ */
+ public QueryPerformanceInsightResetDataResultState status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Indicates result of the operation.
+ *
+ * @param status the status value to set.
+ * @return the QueryPerformanceInsightResetDataResultInner object itself.
+ */
+ public QueryPerformanceInsightResetDataResultInner withStatus(QueryPerformanceInsightResetDataResultState status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the message property: operation message.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set the message property: operation message.
+ *
+ * @param message the message value to set.
+ * @return the QueryPerformanceInsightResetDataResultInner object itself.
+ */
+ public QueryPerformanceInsightResetDataResultInner withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/QueryStatisticInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/QueryStatisticInner.java
new file mode 100644
index 0000000000000..eccd0a3a5b8fa
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/QueryStatisticInner.java
@@ -0,0 +1,289 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+
+/** Represents a Query Statistic. */
+@JsonFlatten
+@Fluent
+public class QueryStatisticInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryStatisticInner.class);
+
+ /*
+ * Database query identifier.
+ */
+ @JsonProperty(value = "properties.queryId")
+ private String queryId;
+
+ /*
+ * Observation start time.
+ */
+ @JsonProperty(value = "properties.startTime")
+ private OffsetDateTime startTime;
+
+ /*
+ * Observation end time.
+ */
+ @JsonProperty(value = "properties.endTime")
+ private OffsetDateTime endTime;
+
+ /*
+ * Aggregation function name.
+ */
+ @JsonProperty(value = "properties.aggregationFunction")
+ private String aggregationFunction;
+
+ /*
+ * The list of database names.
+ */
+ @JsonProperty(value = "properties.databaseNames")
+ private List databaseNames;
+
+ /*
+ * Number of query executions in this time interval.
+ */
+ @JsonProperty(value = "properties.queryExecutionCount")
+ private Long queryExecutionCount;
+
+ /*
+ * Metric name.
+ */
+ @JsonProperty(value = "properties.metricName")
+ private String metricName;
+
+ /*
+ * Metric display name.
+ */
+ @JsonProperty(value = "properties.metricDisplayName")
+ private String metricDisplayName;
+
+ /*
+ * Metric value.
+ */
+ @JsonProperty(value = "properties.metricValue")
+ private Double metricValue;
+
+ /*
+ * Metric value unit.
+ */
+ @JsonProperty(value = "properties.metricValueUnit")
+ private String metricValueUnit;
+
+ /**
+ * Get the queryId property: Database query identifier.
+ *
+ * @return the queryId value.
+ */
+ public String queryId() {
+ return this.queryId;
+ }
+
+ /**
+ * Set the queryId property: Database query identifier.
+ *
+ * @param queryId the queryId value to set.
+ * @return the QueryStatisticInner object itself.
+ */
+ public QueryStatisticInner withQueryId(String queryId) {
+ this.queryId = queryId;
+ return this;
+ }
+
+ /**
+ * Get the startTime property: Observation start time.
+ *
+ * @return the startTime value.
+ */
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Set the startTime property: Observation start time.
+ *
+ * @param startTime the startTime value to set.
+ * @return the QueryStatisticInner object itself.
+ */
+ public QueryStatisticInner withStartTime(OffsetDateTime startTime) {
+ this.startTime = startTime;
+ return this;
+ }
+
+ /**
+ * Get the endTime property: Observation end time.
+ *
+ * @return the endTime value.
+ */
+ public OffsetDateTime endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Set the endTime property: Observation end time.
+ *
+ * @param endTime the endTime value to set.
+ * @return the QueryStatisticInner object itself.
+ */
+ public QueryStatisticInner withEndTime(OffsetDateTime endTime) {
+ this.endTime = endTime;
+ return this;
+ }
+
+ /**
+ * Get the aggregationFunction property: Aggregation function name.
+ *
+ * @return the aggregationFunction value.
+ */
+ public String aggregationFunction() {
+ return this.aggregationFunction;
+ }
+
+ /**
+ * Set the aggregationFunction property: Aggregation function name.
+ *
+ * @param aggregationFunction the aggregationFunction value to set.
+ * @return the QueryStatisticInner object itself.
+ */
+ public QueryStatisticInner withAggregationFunction(String aggregationFunction) {
+ this.aggregationFunction = aggregationFunction;
+ return this;
+ }
+
+ /**
+ * Get the databaseNames property: The list of database names.
+ *
+ * @return the databaseNames value.
+ */
+ public List databaseNames() {
+ return this.databaseNames;
+ }
+
+ /**
+ * Set the databaseNames property: The list of database names.
+ *
+ * @param databaseNames the databaseNames value to set.
+ * @return the QueryStatisticInner object itself.
+ */
+ public QueryStatisticInner withDatabaseNames(List databaseNames) {
+ this.databaseNames = databaseNames;
+ return this;
+ }
+
+ /**
+ * Get the queryExecutionCount property: Number of query executions in this time interval.
+ *
+ * @return the queryExecutionCount value.
+ */
+ public Long queryExecutionCount() {
+ return this.queryExecutionCount;
+ }
+
+ /**
+ * Set the queryExecutionCount property: Number of query executions in this time interval.
+ *
+ * @param queryExecutionCount the queryExecutionCount value to set.
+ * @return the QueryStatisticInner object itself.
+ */
+ public QueryStatisticInner withQueryExecutionCount(Long queryExecutionCount) {
+ this.queryExecutionCount = queryExecutionCount;
+ return this;
+ }
+
+ /**
+ * Get the metricName property: Metric name.
+ *
+ * @return the metricName value.
+ */
+ public String metricName() {
+ return this.metricName;
+ }
+
+ /**
+ * Set the metricName property: Metric name.
+ *
+ * @param metricName the metricName value to set.
+ * @return the QueryStatisticInner object itself.
+ */
+ public QueryStatisticInner withMetricName(String metricName) {
+ this.metricName = metricName;
+ return this;
+ }
+
+ /**
+ * Get the metricDisplayName property: Metric display name.
+ *
+ * @return the metricDisplayName value.
+ */
+ public String metricDisplayName() {
+ return this.metricDisplayName;
+ }
+
+ /**
+ * Set the metricDisplayName property: Metric display name.
+ *
+ * @param metricDisplayName the metricDisplayName value to set.
+ * @return the QueryStatisticInner object itself.
+ */
+ public QueryStatisticInner withMetricDisplayName(String metricDisplayName) {
+ this.metricDisplayName = metricDisplayName;
+ return this;
+ }
+
+ /**
+ * Get the metricValue property: Metric value.
+ *
+ * @return the metricValue value.
+ */
+ public Double metricValue() {
+ return this.metricValue;
+ }
+
+ /**
+ * Set the metricValue property: Metric value.
+ *
+ * @param metricValue the metricValue value to set.
+ * @return the QueryStatisticInner object itself.
+ */
+ public QueryStatisticInner withMetricValue(Double metricValue) {
+ this.metricValue = metricValue;
+ return this;
+ }
+
+ /**
+ * Get the metricValueUnit property: Metric value unit.
+ *
+ * @return the metricValueUnit value.
+ */
+ public String metricValueUnit() {
+ return this.metricValueUnit;
+ }
+
+ /**
+ * Set the metricValueUnit property: Metric value unit.
+ *
+ * @param metricValueUnit the metricValueUnit value to set.
+ * @return the QueryStatisticInner object itself.
+ */
+ public QueryStatisticInner withMetricValueUnit(String metricValueUnit) {
+ this.metricValueUnit = metricValueUnit;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/QueryTextInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/QueryTextInner.java
new file mode 100644
index 0000000000000..c88402037470b
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/QueryTextInner.java
@@ -0,0 +1,79 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents a Query Text. */
+@JsonFlatten
+@Fluent
+public class QueryTextInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryTextInner.class);
+
+ /*
+ * Query identifier unique to the server.
+ */
+ @JsonProperty(value = "properties.queryId")
+ private String queryId;
+
+ /*
+ * Query text.
+ */
+ @JsonProperty(value = "properties.queryText")
+ private String queryText;
+
+ /**
+ * Get the queryId property: Query identifier unique to the server.
+ *
+ * @return the queryId value.
+ */
+ public String queryId() {
+ return this.queryId;
+ }
+
+ /**
+ * Set the queryId property: Query identifier unique to the server.
+ *
+ * @param queryId the queryId value to set.
+ * @return the QueryTextInner object itself.
+ */
+ public QueryTextInner withQueryId(String queryId) {
+ this.queryId = queryId;
+ return this;
+ }
+
+ /**
+ * Get the queryText property: Query text.
+ *
+ * @return the queryText value.
+ */
+ public String queryText() {
+ return this.queryText;
+ }
+
+ /**
+ * Set the queryText property: Query text.
+ *
+ * @param queryText the queryText value to set.
+ * @return the QueryTextInner object itself.
+ */
+ public QueryTextInner withQueryText(String queryText) {
+ this.queryText = queryText;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/RecommendationActionInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/RecommendationActionInner.java
new file mode 100644
index 0000000000000..2f532ce7da6e0
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/RecommendationActionInner.java
@@ -0,0 +1,237 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** Represents a Recommendation Action. */
+@JsonFlatten
+@Fluent
+public class RecommendationActionInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendationActionInner.class);
+
+ /*
+ * Advisor name.
+ */
+ @JsonProperty(value = "properties.advisorName")
+ private String advisorName;
+
+ /*
+ * Recommendation action session identifier.
+ */
+ @JsonProperty(value = "properties.sessionId")
+ private String sessionId;
+
+ /*
+ * Recommendation action identifier.
+ */
+ @JsonProperty(value = "properties.actionId")
+ private Integer actionId;
+
+ /*
+ * Recommendation action creation time.
+ */
+ @JsonProperty(value = "properties.createdTime")
+ private OffsetDateTime createdTime;
+
+ /*
+ * Recommendation action expiration time.
+ */
+ @JsonProperty(value = "properties.expirationTime")
+ private OffsetDateTime expirationTime;
+
+ /*
+ * Recommendation action reason.
+ */
+ @JsonProperty(value = "properties.reason")
+ private String reason;
+
+ /*
+ * Recommendation action type.
+ */
+ @JsonProperty(value = "properties.recommendationType")
+ private String recommendationType;
+
+ /*
+ * Recommendation action details.
+ */
+ @JsonProperty(value = "properties.details")
+ private Map details;
+
+ /**
+ * Get the advisorName property: Advisor name.
+ *
+ * @return the advisorName value.
+ */
+ public String advisorName() {
+ return this.advisorName;
+ }
+
+ /**
+ * Set the advisorName property: Advisor name.
+ *
+ * @param advisorName the advisorName value to set.
+ * @return the RecommendationActionInner object itself.
+ */
+ public RecommendationActionInner withAdvisorName(String advisorName) {
+ this.advisorName = advisorName;
+ return this;
+ }
+
+ /**
+ * Get the sessionId property: Recommendation action session identifier.
+ *
+ * @return the sessionId value.
+ */
+ public String sessionId() {
+ return this.sessionId;
+ }
+
+ /**
+ * Set the sessionId property: Recommendation action session identifier.
+ *
+ * @param sessionId the sessionId value to set.
+ * @return the RecommendationActionInner object itself.
+ */
+ public RecommendationActionInner withSessionId(String sessionId) {
+ this.sessionId = sessionId;
+ return this;
+ }
+
+ /**
+ * Get the actionId property: Recommendation action identifier.
+ *
+ * @return the actionId value.
+ */
+ public Integer actionId() {
+ return this.actionId;
+ }
+
+ /**
+ * Set the actionId property: Recommendation action identifier.
+ *
+ * @param actionId the actionId value to set.
+ * @return the RecommendationActionInner object itself.
+ */
+ public RecommendationActionInner withActionId(Integer actionId) {
+ this.actionId = actionId;
+ return this;
+ }
+
+ /**
+ * Get the createdTime property: Recommendation action creation time.
+ *
+ * @return the createdTime value.
+ */
+ public OffsetDateTime createdTime() {
+ return this.createdTime;
+ }
+
+ /**
+ * Set the createdTime property: Recommendation action creation time.
+ *
+ * @param createdTime the createdTime value to set.
+ * @return the RecommendationActionInner object itself.
+ */
+ public RecommendationActionInner withCreatedTime(OffsetDateTime createdTime) {
+ this.createdTime = createdTime;
+ return this;
+ }
+
+ /**
+ * Get the expirationTime property: Recommendation action expiration time.
+ *
+ * @return the expirationTime value.
+ */
+ public OffsetDateTime expirationTime() {
+ return this.expirationTime;
+ }
+
+ /**
+ * Set the expirationTime property: Recommendation action expiration time.
+ *
+ * @param expirationTime the expirationTime value to set.
+ * @return the RecommendationActionInner object itself.
+ */
+ public RecommendationActionInner withExpirationTime(OffsetDateTime expirationTime) {
+ this.expirationTime = expirationTime;
+ return this;
+ }
+
+ /**
+ * Get the reason property: Recommendation action reason.
+ *
+ * @return the reason value.
+ */
+ public String reason() {
+ return this.reason;
+ }
+
+ /**
+ * Set the reason property: Recommendation action reason.
+ *
+ * @param reason the reason value to set.
+ * @return the RecommendationActionInner object itself.
+ */
+ public RecommendationActionInner withReason(String reason) {
+ this.reason = reason;
+ return this;
+ }
+
+ /**
+ * Get the recommendationType property: Recommendation action type.
+ *
+ * @return the recommendationType value.
+ */
+ public String recommendationType() {
+ return this.recommendationType;
+ }
+
+ /**
+ * Set the recommendationType property: Recommendation action type.
+ *
+ * @param recommendationType the recommendationType value to set.
+ * @return the RecommendationActionInner object itself.
+ */
+ public RecommendationActionInner withRecommendationType(String recommendationType) {
+ this.recommendationType = recommendationType;
+ return this;
+ }
+
+ /**
+ * Get the details property: Recommendation action details.
+ *
+ * @return the details value.
+ */
+ public Map details() {
+ return this.details;
+ }
+
+ /**
+ * Set the details property: Recommendation action details.
+ *
+ * @param details the details value to set.
+ * @return the RecommendationActionInner object itself.
+ */
+ public RecommendationActionInner withDetails(Map details) {
+ this.details = details;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/RecommendedActionSessionsOperationStatusInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/RecommendedActionSessionsOperationStatusInner.java
new file mode 100644
index 0000000000000..8494cb3e79b9c
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/RecommendedActionSessionsOperationStatusInner.java
@@ -0,0 +1,104 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Recommendation action session operation status. */
+@Fluent
+public final class RecommendedActionSessionsOperationStatusInner {
+ @JsonIgnore
+ private final ClientLogger logger = new ClientLogger(RecommendedActionSessionsOperationStatusInner.class);
+
+ /*
+ * Operation identifier.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Operation start time.
+ */
+ @JsonProperty(value = "startTime")
+ private OffsetDateTime startTime;
+
+ /*
+ * Operation status.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /**
+ * Get the name property: Operation identifier.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Operation identifier.
+ *
+ * @param name the name value to set.
+ * @return the RecommendedActionSessionsOperationStatusInner object itself.
+ */
+ public RecommendedActionSessionsOperationStatusInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the startTime property: Operation start time.
+ *
+ * @return the startTime value.
+ */
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Set the startTime property: Operation start time.
+ *
+ * @param startTime the startTime value to set.
+ * @return the RecommendedActionSessionsOperationStatusInner object itself.
+ */
+ public RecommendedActionSessionsOperationStatusInner withStartTime(OffsetDateTime startTime) {
+ this.startTime = startTime;
+ return this;
+ }
+
+ /**
+ * Get the status property: Operation status.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Operation status.
+ *
+ * @param status the status value to set.
+ * @return the RecommendedActionSessionsOperationStatusInner object itself.
+ */
+ public RecommendedActionSessionsOperationStatusInner withStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/RecoverableServerResourceInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/RecoverableServerResourceInner.java
new file mode 100644
index 0000000000000..01cbfbd83a642
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/RecoverableServerResourceInner.java
@@ -0,0 +1,117 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A recoverable server resource. */
+@JsonFlatten
+@Immutable
+public class RecoverableServerResourceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RecoverableServerResourceInner.class);
+
+ /*
+ * The last available backup date time.
+ */
+ @JsonProperty(value = "properties.lastAvailableBackupDateTime", access = JsonProperty.Access.WRITE_ONLY)
+ private String lastAvailableBackupDateTime;
+
+ /*
+ * The service level objective
+ */
+ @JsonProperty(value = "properties.serviceLevelObjective", access = JsonProperty.Access.WRITE_ONLY)
+ private String serviceLevelObjective;
+
+ /*
+ * Edition of the performance tier.
+ */
+ @JsonProperty(value = "properties.edition", access = JsonProperty.Access.WRITE_ONLY)
+ private String edition;
+
+ /*
+ * vCore associated with the service level objective
+ */
+ @JsonProperty(value = "properties.vCore", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer vCore;
+
+ /*
+ * Hardware generation associated with the service level objective
+ */
+ @JsonProperty(value = "properties.hardwareGeneration", access = JsonProperty.Access.WRITE_ONLY)
+ private String hardwareGeneration;
+
+ /*
+ * The MySQL version
+ */
+ @JsonProperty(value = "properties.version", access = JsonProperty.Access.WRITE_ONLY)
+ private String version;
+
+ /**
+ * Get the lastAvailableBackupDateTime property: The last available backup date time.
+ *
+ * @return the lastAvailableBackupDateTime value.
+ */
+ public String lastAvailableBackupDateTime() {
+ return this.lastAvailableBackupDateTime;
+ }
+
+ /**
+ * Get the serviceLevelObjective property: The service level objective.
+ *
+ * @return the serviceLevelObjective value.
+ */
+ public String serviceLevelObjective() {
+ return this.serviceLevelObjective;
+ }
+
+ /**
+ * Get the edition property: Edition of the performance tier.
+ *
+ * @return the edition value.
+ */
+ public String edition() {
+ return this.edition;
+ }
+
+ /**
+ * Get the vCore property: vCore associated with the service level objective.
+ *
+ * @return the vCore value.
+ */
+ public Integer vCore() {
+ return this.vCore;
+ }
+
+ /**
+ * Get the hardwareGeneration property: Hardware generation associated with the service level objective.
+ *
+ * @return the hardwareGeneration value.
+ */
+ public String hardwareGeneration() {
+ return this.hardwareGeneration;
+ }
+
+ /**
+ * Get the version property: The MySQL version.
+ *
+ * @return the version value.
+ */
+ public String version() {
+ return this.version;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ServerAdministratorResourceInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ServerAdministratorResourceInner.java
new file mode 100644
index 0000000000000..d66c3990eca34
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ServerAdministratorResourceInner.java
@@ -0,0 +1,133 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysql.models.AdministratorType;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.UUID;
+
+/** Represents a and external administrator to be created. */
+@JsonFlatten
+@Fluent
+public class ServerAdministratorResourceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerAdministratorResourceInner.class);
+
+ /*
+ * The type of administrator.
+ */
+ @JsonProperty(value = "properties.administratorType")
+ private AdministratorType administratorType;
+
+ /*
+ * The server administrator login account name.
+ */
+ @JsonProperty(value = "properties.login")
+ private String login;
+
+ /*
+ * The server administrator Sid (Secure ID).
+ */
+ @JsonProperty(value = "properties.sid")
+ private UUID sid;
+
+ /*
+ * The server Active Directory Administrator tenant id.
+ */
+ @JsonProperty(value = "properties.tenantId")
+ private UUID tenantId;
+
+ /**
+ * Get the administratorType property: The type of administrator.
+ *
+ * @return the administratorType value.
+ */
+ public AdministratorType administratorType() {
+ return this.administratorType;
+ }
+
+ /**
+ * Set the administratorType property: The type of administrator.
+ *
+ * @param administratorType the administratorType value to set.
+ * @return the ServerAdministratorResourceInner object itself.
+ */
+ public ServerAdministratorResourceInner withAdministratorType(AdministratorType administratorType) {
+ this.administratorType = administratorType;
+ return this;
+ }
+
+ /**
+ * Get the login property: The server administrator login account name.
+ *
+ * @return the login value.
+ */
+ public String login() {
+ return this.login;
+ }
+
+ /**
+ * Set the login property: The server administrator login account name.
+ *
+ * @param login the login value to set.
+ * @return the ServerAdministratorResourceInner object itself.
+ */
+ public ServerAdministratorResourceInner withLogin(String login) {
+ this.login = login;
+ return this;
+ }
+
+ /**
+ * Get the sid property: The server administrator Sid (Secure ID).
+ *
+ * @return the sid value.
+ */
+ public UUID sid() {
+ return this.sid;
+ }
+
+ /**
+ * Set the sid property: The server administrator Sid (Secure ID).
+ *
+ * @param sid the sid value to set.
+ * @return the ServerAdministratorResourceInner object itself.
+ */
+ public ServerAdministratorResourceInner withSid(UUID sid) {
+ this.sid = sid;
+ return this;
+ }
+
+ /**
+ * Get the tenantId property: The server Active Directory Administrator tenant id.
+ *
+ * @return the tenantId value.
+ */
+ public UUID tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Set the tenantId property: The server Active Directory Administrator tenant id.
+ *
+ * @param tenantId the tenantId value to set.
+ * @return the ServerAdministratorResourceInner object itself.
+ */
+ public ServerAdministratorResourceInner withTenantId(UUID tenantId) {
+ this.tenantId = tenantId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ServerInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ServerInner.java
new file mode 100644
index 0000000000000..eed8699ce553e
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ServerInner.java
@@ -0,0 +1,494 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.Resource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysql.models.InfrastructureEncryption;
+import com.azure.resourcemanager.mysql.models.MinimalTlsVersionEnum;
+import com.azure.resourcemanager.mysql.models.PublicNetworkAccessEnum;
+import com.azure.resourcemanager.mysql.models.ResourceIdentity;
+import com.azure.resourcemanager.mysql.models.ServerPrivateEndpointConnection;
+import com.azure.resourcemanager.mysql.models.ServerState;
+import com.azure.resourcemanager.mysql.models.ServerVersion;
+import com.azure.resourcemanager.mysql.models.Sku;
+import com.azure.resourcemanager.mysql.models.SslEnforcementEnum;
+import com.azure.resourcemanager.mysql.models.StorageProfile;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+import java.util.Map;
+
+/** Represents a server. */
+@JsonFlatten
+@Fluent
+public class ServerInner extends Resource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerInner.class);
+
+ /*
+ * The Azure Active Directory identity of the server.
+ */
+ @JsonProperty(value = "identity")
+ private ResourceIdentity identity;
+
+ /*
+ * The SKU (pricing tier) of the server.
+ */
+ @JsonProperty(value = "sku")
+ private Sku sku;
+
+ /*
+ * The administrator's login name of a server. Can only be specified when
+ * the server is being created (and is required for creation).
+ */
+ @JsonProperty(value = "properties.administratorLogin")
+ private String administratorLogin;
+
+ /*
+ * Server version.
+ */
+ @JsonProperty(value = "properties.version")
+ private ServerVersion version;
+
+ /*
+ * Enable ssl enforcement or not when connect to server.
+ */
+ @JsonProperty(value = "properties.sslEnforcement")
+ private SslEnforcementEnum sslEnforcement;
+
+ /*
+ * Enforce a minimal Tls version for the server.
+ */
+ @JsonProperty(value = "properties.minimalTlsVersion")
+ private MinimalTlsVersionEnum minimalTlsVersion;
+
+ /*
+ * Status showing whether the server data encryption is enabled with
+ * customer-managed keys.
+ */
+ @JsonProperty(value = "properties.byokEnforcement", access = JsonProperty.Access.WRITE_ONLY)
+ private String byokEnforcement;
+
+ /*
+ * Status showing whether the server enabled infrastructure encryption.
+ */
+ @JsonProperty(value = "properties.infrastructureEncryption")
+ private InfrastructureEncryption infrastructureEncryption;
+
+ /*
+ * A state of a server that is visible to user.
+ */
+ @JsonProperty(value = "properties.userVisibleState")
+ private ServerState userVisibleState;
+
+ /*
+ * The fully qualified domain name of a server.
+ */
+ @JsonProperty(value = "properties.fullyQualifiedDomainName")
+ private String fullyQualifiedDomainName;
+
+ /*
+ * Earliest restore point creation time (ISO8601 format)
+ */
+ @JsonProperty(value = "properties.earliestRestoreDate")
+ private OffsetDateTime earliestRestoreDate;
+
+ /*
+ * Storage profile of a server.
+ */
+ @JsonProperty(value = "properties.storageProfile")
+ private StorageProfile storageProfile;
+
+ /*
+ * The replication role of the server.
+ */
+ @JsonProperty(value = "properties.replicationRole")
+ private String replicationRole;
+
+ /*
+ * The master server id of a replica server.
+ */
+ @JsonProperty(value = "properties.masterServerId")
+ private String masterServerId;
+
+ /*
+ * The maximum number of replicas that a master server can have.
+ */
+ @JsonProperty(value = "properties.replicaCapacity")
+ private Integer replicaCapacity;
+
+ /*
+ * Whether or not public network access is allowed for this server. Value
+ * is optional but if passed in, must be 'Enabled' or 'Disabled'
+ */
+ @JsonProperty(value = "properties.publicNetworkAccess")
+ private PublicNetworkAccessEnum publicNetworkAccess;
+
+ /*
+ * List of private endpoint connections on a server
+ */
+ @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
+ private List privateEndpointConnections;
+
+ /**
+ * Get the identity property: The Azure Active Directory identity of the server.
+ *
+ * @return the identity value.
+ */
+ public ResourceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The Azure Active Directory identity of the server.
+ *
+ * @param identity the identity value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withIdentity(ResourceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the sku property: The SKU (pricing tier) of the server.
+ *
+ * @return the sku value.
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The SKU (pricing tier) of the server.
+ *
+ * @param sku the sku value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the administratorLogin property: The administrator's login name of a server. Can only be specified when the
+ * server is being created (and is required for creation).
+ *
+ * @return the administratorLogin value.
+ */
+ public String administratorLogin() {
+ return this.administratorLogin;
+ }
+
+ /**
+ * Set the administratorLogin property: The administrator's login name of a server. Can only be specified when the
+ * server is being created (and is required for creation).
+ *
+ * @param administratorLogin the administratorLogin value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withAdministratorLogin(String administratorLogin) {
+ this.administratorLogin = administratorLogin;
+ return this;
+ }
+
+ /**
+ * Get the version property: Server version.
+ *
+ * @return the version value.
+ */
+ public ServerVersion version() {
+ return this.version;
+ }
+
+ /**
+ * Set the version property: Server version.
+ *
+ * @param version the version value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withVersion(ServerVersion version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Get the sslEnforcement property: Enable ssl enforcement or not when connect to server.
+ *
+ * @return the sslEnforcement value.
+ */
+ public SslEnforcementEnum sslEnforcement() {
+ return this.sslEnforcement;
+ }
+
+ /**
+ * Set the sslEnforcement property: Enable ssl enforcement or not when connect to server.
+ *
+ * @param sslEnforcement the sslEnforcement value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withSslEnforcement(SslEnforcementEnum sslEnforcement) {
+ this.sslEnforcement = sslEnforcement;
+ return this;
+ }
+
+ /**
+ * Get the minimalTlsVersion property: Enforce a minimal Tls version for the server.
+ *
+ * @return the minimalTlsVersion value.
+ */
+ public MinimalTlsVersionEnum minimalTlsVersion() {
+ return this.minimalTlsVersion;
+ }
+
+ /**
+ * Set the minimalTlsVersion property: Enforce a minimal Tls version for the server.
+ *
+ * @param minimalTlsVersion the minimalTlsVersion value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withMinimalTlsVersion(MinimalTlsVersionEnum minimalTlsVersion) {
+ this.minimalTlsVersion = minimalTlsVersion;
+ return this;
+ }
+
+ /**
+ * Get the byokEnforcement property: Status showing whether the server data encryption is enabled with
+ * customer-managed keys.
+ *
+ * @return the byokEnforcement value.
+ */
+ public String byokEnforcement() {
+ return this.byokEnforcement;
+ }
+
+ /**
+ * Get the infrastructureEncryption property: Status showing whether the server enabled infrastructure encryption.
+ *
+ * @return the infrastructureEncryption value.
+ */
+ public InfrastructureEncryption infrastructureEncryption() {
+ return this.infrastructureEncryption;
+ }
+
+ /**
+ * Set the infrastructureEncryption property: Status showing whether the server enabled infrastructure encryption.
+ *
+ * @param infrastructureEncryption the infrastructureEncryption value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withInfrastructureEncryption(InfrastructureEncryption infrastructureEncryption) {
+ this.infrastructureEncryption = infrastructureEncryption;
+ return this;
+ }
+
+ /**
+ * Get the userVisibleState property: A state of a server that is visible to user.
+ *
+ * @return the userVisibleState value.
+ */
+ public ServerState userVisibleState() {
+ return this.userVisibleState;
+ }
+
+ /**
+ * Set the userVisibleState property: A state of a server that is visible to user.
+ *
+ * @param userVisibleState the userVisibleState value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withUserVisibleState(ServerState userVisibleState) {
+ this.userVisibleState = userVisibleState;
+ return this;
+ }
+
+ /**
+ * Get the fullyQualifiedDomainName property: The fully qualified domain name of a server.
+ *
+ * @return the fullyQualifiedDomainName value.
+ */
+ public String fullyQualifiedDomainName() {
+ return this.fullyQualifiedDomainName;
+ }
+
+ /**
+ * Set the fullyQualifiedDomainName property: The fully qualified domain name of a server.
+ *
+ * @param fullyQualifiedDomainName the fullyQualifiedDomainName value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withFullyQualifiedDomainName(String fullyQualifiedDomainName) {
+ this.fullyQualifiedDomainName = fullyQualifiedDomainName;
+ return this;
+ }
+
+ /**
+ * Get the earliestRestoreDate property: Earliest restore point creation time (ISO8601 format).
+ *
+ * @return the earliestRestoreDate value.
+ */
+ public OffsetDateTime earliestRestoreDate() {
+ return this.earliestRestoreDate;
+ }
+
+ /**
+ * Set the earliestRestoreDate property: Earliest restore point creation time (ISO8601 format).
+ *
+ * @param earliestRestoreDate the earliestRestoreDate value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withEarliestRestoreDate(OffsetDateTime earliestRestoreDate) {
+ this.earliestRestoreDate = earliestRestoreDate;
+ return this;
+ }
+
+ /**
+ * Get the storageProfile property: Storage profile of a server.
+ *
+ * @return the storageProfile value.
+ */
+ public StorageProfile storageProfile() {
+ return this.storageProfile;
+ }
+
+ /**
+ * Set the storageProfile property: Storage profile of a server.
+ *
+ * @param storageProfile the storageProfile value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withStorageProfile(StorageProfile storageProfile) {
+ this.storageProfile = storageProfile;
+ return this;
+ }
+
+ /**
+ * Get the replicationRole property: The replication role of the server.
+ *
+ * @return the replicationRole value.
+ */
+ public String replicationRole() {
+ return this.replicationRole;
+ }
+
+ /**
+ * Set the replicationRole property: The replication role of the server.
+ *
+ * @param replicationRole the replicationRole value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withReplicationRole(String replicationRole) {
+ this.replicationRole = replicationRole;
+ return this;
+ }
+
+ /**
+ * Get the masterServerId property: The master server id of a replica server.
+ *
+ * @return the masterServerId value.
+ */
+ public String masterServerId() {
+ return this.masterServerId;
+ }
+
+ /**
+ * Set the masterServerId property: The master server id of a replica server.
+ *
+ * @param masterServerId the masterServerId value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withMasterServerId(String masterServerId) {
+ this.masterServerId = masterServerId;
+ return this;
+ }
+
+ /**
+ * Get the replicaCapacity property: The maximum number of replicas that a master server can have.
+ *
+ * @return the replicaCapacity value.
+ */
+ public Integer replicaCapacity() {
+ return this.replicaCapacity;
+ }
+
+ /**
+ * Set the replicaCapacity property: The maximum number of replicas that a master server can have.
+ *
+ * @param replicaCapacity the replicaCapacity value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withReplicaCapacity(Integer replicaCapacity) {
+ this.replicaCapacity = replicaCapacity;
+ return this;
+ }
+
+ /**
+ * Get the publicNetworkAccess property: Whether or not public network access is allowed for this server. Value is
+ * optional but if passed in, must be 'Enabled' or 'Disabled'.
+ *
+ * @return the publicNetworkAccess value.
+ */
+ public PublicNetworkAccessEnum publicNetworkAccess() {
+ return this.publicNetworkAccess;
+ }
+
+ /**
+ * Set the publicNetworkAccess property: Whether or not public network access is allowed for this server. Value is
+ * optional but if passed in, must be 'Enabled' or 'Disabled'.
+ *
+ * @param publicNetworkAccess the publicNetworkAccess value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withPublicNetworkAccess(PublicNetworkAccessEnum publicNetworkAccess) {
+ this.publicNetworkAccess = publicNetworkAccess;
+ return this;
+ }
+
+ /**
+ * Get the privateEndpointConnections property: List of private endpoint connections on a server.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ServerInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ServerInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
+ if (sku() != null) {
+ sku().validate();
+ }
+ if (storageProfile() != null) {
+ storageProfile().validate();
+ }
+ if (privateEndpointConnections() != null) {
+ privateEndpointConnections().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ServerKeyInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ServerKeyInner.java
new file mode 100644
index 0000000000000..1c17e567a4dd3
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ServerKeyInner.java
@@ -0,0 +1,111 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysql.models.ServerKeyType;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** A MySQL Server key. */
+@JsonFlatten
+@Fluent
+public class ServerKeyInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerKeyInner.class);
+
+ /*
+ * Kind of encryption protector used to protect the key.
+ */
+ @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY)
+ private String kind;
+
+ /*
+ * The key type like 'AzureKeyVault'.
+ */
+ @JsonProperty(value = "properties.serverKeyType")
+ private ServerKeyType serverKeyType;
+
+ /*
+ * The URI of the key.
+ */
+ @JsonProperty(value = "properties.uri")
+ private String uri;
+
+ /*
+ * The key creation date.
+ */
+ @JsonProperty(value = "properties.creationDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime creationDate;
+
+ /**
+ * Get the kind property: Kind of encryption protector used to protect the key.
+ *
+ * @return the kind value.
+ */
+ public String kind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the serverKeyType property: The key type like 'AzureKeyVault'.
+ *
+ * @return the serverKeyType value.
+ */
+ public ServerKeyType serverKeyType() {
+ return this.serverKeyType;
+ }
+
+ /**
+ * Set the serverKeyType property: The key type like 'AzureKeyVault'.
+ *
+ * @param serverKeyType the serverKeyType value to set.
+ * @return the ServerKeyInner object itself.
+ */
+ public ServerKeyInner withServerKeyType(ServerKeyType serverKeyType) {
+ this.serverKeyType = serverKeyType;
+ return this;
+ }
+
+ /**
+ * Get the uri property: The URI of the key.
+ *
+ * @return the uri value.
+ */
+ public String uri() {
+ return this.uri;
+ }
+
+ /**
+ * Set the uri property: The URI of the key.
+ *
+ * @param uri the uri value to set.
+ * @return the ServerKeyInner object itself.
+ */
+ public ServerKeyInner withUri(String uri) {
+ this.uri = uri;
+ return this;
+ }
+
+ /**
+ * Get the creationDate property: The key creation date.
+ *
+ * @return the creationDate value.
+ */
+ public OffsetDateTime creationDate() {
+ return this.creationDate;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ServerSecurityAlertPolicyInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ServerSecurityAlertPolicyInner.java
new file mode 100644
index 0000000000000..7910f0bd7f2b4
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/ServerSecurityAlertPolicyInner.java
@@ -0,0 +1,221 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysql.models.ServerSecurityAlertPolicyState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A server security alert policy. */
+@JsonFlatten
+@Fluent
+public class ServerSecurityAlertPolicyInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerSecurityAlertPolicyInner.class);
+
+ /*
+ * Specifies the state of the policy, whether it is enabled or disabled.
+ */
+ @JsonProperty(value = "properties.state")
+ private ServerSecurityAlertPolicyState state;
+
+ /*
+ * Specifies an array of alerts that are disabled. Allowed values are:
+ * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly
+ */
+ @JsonProperty(value = "properties.disabledAlerts")
+ private List disabledAlerts;
+
+ /*
+ * Specifies an array of e-mail addresses to which the alert is sent.
+ */
+ @JsonProperty(value = "properties.emailAddresses")
+ private List emailAddresses;
+
+ /*
+ * Specifies that the alert is sent to the account administrators.
+ */
+ @JsonProperty(value = "properties.emailAccountAdmins")
+ private Boolean emailAccountAdmins;
+
+ /*
+ * Specifies the blob storage endpoint (e.g.
+ * https://MyAccount.blob.core.windows.net). This blob storage will hold
+ * all Threat Detection audit logs.
+ */
+ @JsonProperty(value = "properties.storageEndpoint")
+ private String storageEndpoint;
+
+ /*
+ * Specifies the identifier key of the Threat Detection audit storage
+ * account.
+ */
+ @JsonProperty(value = "properties.storageAccountAccessKey")
+ private String storageAccountAccessKey;
+
+ /*
+ * Specifies the number of days to keep in the Threat Detection audit logs.
+ */
+ @JsonProperty(value = "properties.retentionDays")
+ private Integer retentionDays;
+
+ /**
+ * Get the state property: Specifies the state of the policy, whether it is enabled or disabled.
+ *
+ * @return the state value.
+ */
+ public ServerSecurityAlertPolicyState state() {
+ return this.state;
+ }
+
+ /**
+ * Set the state property: Specifies the state of the policy, whether it is enabled or disabled.
+ *
+ * @param state the state value to set.
+ * @return the ServerSecurityAlertPolicyInner object itself.
+ */
+ public ServerSecurityAlertPolicyInner withState(ServerSecurityAlertPolicyState state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are:
+ * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly.
+ *
+ * @return the disabledAlerts value.
+ */
+ public List disabledAlerts() {
+ return this.disabledAlerts;
+ }
+
+ /**
+ * Set the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are:
+ * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly.
+ *
+ * @param disabledAlerts the disabledAlerts value to set.
+ * @return the ServerSecurityAlertPolicyInner object itself.
+ */
+ public ServerSecurityAlertPolicyInner withDisabledAlerts(List disabledAlerts) {
+ this.disabledAlerts = disabledAlerts;
+ return this;
+ }
+
+ /**
+ * Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent.
+ *
+ * @return the emailAddresses value.
+ */
+ public List emailAddresses() {
+ return this.emailAddresses;
+ }
+
+ /**
+ * Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent.
+ *
+ * @param emailAddresses the emailAddresses value to set.
+ * @return the ServerSecurityAlertPolicyInner object itself.
+ */
+ public ServerSecurityAlertPolicyInner withEmailAddresses(List emailAddresses) {
+ this.emailAddresses = emailAddresses;
+ return this;
+ }
+
+ /**
+ * Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators.
+ *
+ * @return the emailAccountAdmins value.
+ */
+ public Boolean emailAccountAdmins() {
+ return this.emailAccountAdmins;
+ }
+
+ /**
+ * Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators.
+ *
+ * @param emailAccountAdmins the emailAccountAdmins value to set.
+ * @return the ServerSecurityAlertPolicyInner object itself.
+ */
+ public ServerSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccountAdmins) {
+ this.emailAccountAdmins = emailAccountAdmins;
+ return this;
+ }
+
+ /**
+ * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g.
+ * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
+ *
+ * @return the storageEndpoint value.
+ */
+ public String storageEndpoint() {
+ return this.storageEndpoint;
+ }
+
+ /**
+ * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g.
+ * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
+ *
+ * @param storageEndpoint the storageEndpoint value to set.
+ * @return the ServerSecurityAlertPolicyInner object itself.
+ */
+ public ServerSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoint) {
+ this.storageEndpoint = storageEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage
+ * account.
+ *
+ * @return the storageAccountAccessKey value.
+ */
+ public String storageAccountAccessKey() {
+ return this.storageAccountAccessKey;
+ }
+
+ /**
+ * Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage
+ * account.
+ *
+ * @param storageAccountAccessKey the storageAccountAccessKey value to set.
+ * @return the ServerSecurityAlertPolicyInner object itself.
+ */
+ public ServerSecurityAlertPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) {
+ this.storageAccountAccessKey = storageAccountAccessKey;
+ return this;
+ }
+
+ /**
+ * Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs.
+ *
+ * @return the retentionDays value.
+ */
+ public Integer retentionDays() {
+ return this.retentionDays;
+ }
+
+ /**
+ * Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs.
+ *
+ * @param retentionDays the retentionDays value to set.
+ * @return the ServerSecurityAlertPolicyInner object itself.
+ */
+ public ServerSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) {
+ this.retentionDays = retentionDays;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/VirtualNetworkRuleInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/VirtualNetworkRuleInner.java
new file mode 100644
index 0000000000000..4f65288e3846e
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/VirtualNetworkRuleInner.java
@@ -0,0 +1,98 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysql.models.VirtualNetworkRuleState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A virtual network rule. */
+@JsonFlatten
+@Fluent
+public class VirtualNetworkRuleInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkRuleInner.class);
+
+ /*
+ * The ARM resource id of the virtual network subnet.
+ */
+ @JsonProperty(value = "properties.virtualNetworkSubnetId")
+ private String virtualNetworkSubnetId;
+
+ /*
+ * Create firewall rule before the virtual network has vnet service
+ * endpoint enabled.
+ */
+ @JsonProperty(value = "properties.ignoreMissingVnetServiceEndpoint")
+ private Boolean ignoreMissingVnetServiceEndpoint;
+
+ /*
+ * Virtual Network Rule State
+ */
+ @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY)
+ private VirtualNetworkRuleState state;
+
+ /**
+ * Get the virtualNetworkSubnetId property: The ARM resource id of the virtual network subnet.
+ *
+ * @return the virtualNetworkSubnetId value.
+ */
+ public String virtualNetworkSubnetId() {
+ return this.virtualNetworkSubnetId;
+ }
+
+ /**
+ * Set the virtualNetworkSubnetId property: The ARM resource id of the virtual network subnet.
+ *
+ * @param virtualNetworkSubnetId the virtualNetworkSubnetId value to set.
+ * @return the VirtualNetworkRuleInner object itself.
+ */
+ public VirtualNetworkRuleInner withVirtualNetworkSubnetId(String virtualNetworkSubnetId) {
+ this.virtualNetworkSubnetId = virtualNetworkSubnetId;
+ return this;
+ }
+
+ /**
+ * Get the ignoreMissingVnetServiceEndpoint property: Create firewall rule before the virtual network has vnet
+ * service endpoint enabled.
+ *
+ * @return the ignoreMissingVnetServiceEndpoint value.
+ */
+ public Boolean ignoreMissingVnetServiceEndpoint() {
+ return this.ignoreMissingVnetServiceEndpoint;
+ }
+
+ /**
+ * Set the ignoreMissingVnetServiceEndpoint property: Create firewall rule before the virtual network has vnet
+ * service endpoint enabled.
+ *
+ * @param ignoreMissingVnetServiceEndpoint the ignoreMissingVnetServiceEndpoint value to set.
+ * @return the VirtualNetworkRuleInner object itself.
+ */
+ public VirtualNetworkRuleInner withIgnoreMissingVnetServiceEndpoint(Boolean ignoreMissingVnetServiceEndpoint) {
+ this.ignoreMissingVnetServiceEndpoint = ignoreMissingVnetServiceEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the state property: Virtual Network Rule State.
+ *
+ * @return the state value.
+ */
+ public VirtualNetworkRuleState state() {
+ return this.state;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/WaitStatisticInner.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/WaitStatisticInner.java
new file mode 100644
index 0000000000000..da7cd2c89050d
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/WaitStatisticInner.java
@@ -0,0 +1,262 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Represents a Wait Statistic. */
+@JsonFlatten
+@Fluent
+public class WaitStatisticInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(WaitStatisticInner.class);
+
+ /*
+ * Observation start time.
+ */
+ @JsonProperty(value = "properties.startTime")
+ private OffsetDateTime startTime;
+
+ /*
+ * Observation end time.
+ */
+ @JsonProperty(value = "properties.endTime")
+ private OffsetDateTime endTime;
+
+ /*
+ * Wait event name.
+ */
+ @JsonProperty(value = "properties.eventName")
+ private String eventName;
+
+ /*
+ * Wait event type name.
+ */
+ @JsonProperty(value = "properties.eventTypeName")
+ private String eventTypeName;
+
+ /*
+ * Database query identifier.
+ */
+ @JsonProperty(value = "properties.queryId")
+ private Long queryId;
+
+ /*
+ * Database Name.
+ */
+ @JsonProperty(value = "properties.databaseName")
+ private String databaseName;
+
+ /*
+ * Database user identifier.
+ */
+ @JsonProperty(value = "properties.userId")
+ private Long userId;
+
+ /*
+ * Wait event count observed in this time interval.
+ */
+ @JsonProperty(value = "properties.count")
+ private Long count;
+
+ /*
+ * Total time of wait in milliseconds in this time interval.
+ */
+ @JsonProperty(value = "properties.totalTimeInMs")
+ private Double totalTimeInMs;
+
+ /**
+ * Get the startTime property: Observation start time.
+ *
+ * @return the startTime value.
+ */
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Set the startTime property: Observation start time.
+ *
+ * @param startTime the startTime value to set.
+ * @return the WaitStatisticInner object itself.
+ */
+ public WaitStatisticInner withStartTime(OffsetDateTime startTime) {
+ this.startTime = startTime;
+ return this;
+ }
+
+ /**
+ * Get the endTime property: Observation end time.
+ *
+ * @return the endTime value.
+ */
+ public OffsetDateTime endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Set the endTime property: Observation end time.
+ *
+ * @param endTime the endTime value to set.
+ * @return the WaitStatisticInner object itself.
+ */
+ public WaitStatisticInner withEndTime(OffsetDateTime endTime) {
+ this.endTime = endTime;
+ return this;
+ }
+
+ /**
+ * Get the eventName property: Wait event name.
+ *
+ * @return the eventName value.
+ */
+ public String eventName() {
+ return this.eventName;
+ }
+
+ /**
+ * Set the eventName property: Wait event name.
+ *
+ * @param eventName the eventName value to set.
+ * @return the WaitStatisticInner object itself.
+ */
+ public WaitStatisticInner withEventName(String eventName) {
+ this.eventName = eventName;
+ return this;
+ }
+
+ /**
+ * Get the eventTypeName property: Wait event type name.
+ *
+ * @return the eventTypeName value.
+ */
+ public String eventTypeName() {
+ return this.eventTypeName;
+ }
+
+ /**
+ * Set the eventTypeName property: Wait event type name.
+ *
+ * @param eventTypeName the eventTypeName value to set.
+ * @return the WaitStatisticInner object itself.
+ */
+ public WaitStatisticInner withEventTypeName(String eventTypeName) {
+ this.eventTypeName = eventTypeName;
+ return this;
+ }
+
+ /**
+ * Get the queryId property: Database query identifier.
+ *
+ * @return the queryId value.
+ */
+ public Long queryId() {
+ return this.queryId;
+ }
+
+ /**
+ * Set the queryId property: Database query identifier.
+ *
+ * @param queryId the queryId value to set.
+ * @return the WaitStatisticInner object itself.
+ */
+ public WaitStatisticInner withQueryId(Long queryId) {
+ this.queryId = queryId;
+ return this;
+ }
+
+ /**
+ * Get the databaseName property: Database Name.
+ *
+ * @return the databaseName value.
+ */
+ public String databaseName() {
+ return this.databaseName;
+ }
+
+ /**
+ * Set the databaseName property: Database Name.
+ *
+ * @param databaseName the databaseName value to set.
+ * @return the WaitStatisticInner object itself.
+ */
+ public WaitStatisticInner withDatabaseName(String databaseName) {
+ this.databaseName = databaseName;
+ return this;
+ }
+
+ /**
+ * Get the userId property: Database user identifier.
+ *
+ * @return the userId value.
+ */
+ public Long userId() {
+ return this.userId;
+ }
+
+ /**
+ * Set the userId property: Database user identifier.
+ *
+ * @param userId the userId value to set.
+ * @return the WaitStatisticInner object itself.
+ */
+ public WaitStatisticInner withUserId(Long userId) {
+ this.userId = userId;
+ return this;
+ }
+
+ /**
+ * Get the count property: Wait event count observed in this time interval.
+ *
+ * @return the count value.
+ */
+ public Long count() {
+ return this.count;
+ }
+
+ /**
+ * Set the count property: Wait event count observed in this time interval.
+ *
+ * @param count the count value to set.
+ * @return the WaitStatisticInner object itself.
+ */
+ public WaitStatisticInner withCount(Long count) {
+ this.count = count;
+ return this;
+ }
+
+ /**
+ * Get the totalTimeInMs property: Total time of wait in milliseconds in this time interval.
+ *
+ * @return the totalTimeInMs value.
+ */
+ public Double totalTimeInMs() {
+ return this.totalTimeInMs;
+ }
+
+ /**
+ * Set the totalTimeInMs property: Total time of wait in milliseconds in this time interval.
+ *
+ * @param totalTimeInMs the totalTimeInMs value to set.
+ * @return the WaitStatisticInner object itself.
+ */
+ public WaitStatisticInner withTotalTimeInMs(Double totalTimeInMs) {
+ this.totalTimeInMs = totalTimeInMs;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/package-info.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/package-info.java
new file mode 100644
index 0000000000000..887120d83f0e9
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/models/package-info.java
@@ -0,0 +1,10 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for MySqlManagementClient. 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 com.azure.resourcemanager.mysql.fluent.models;
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/package-info.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/package-info.java
new file mode 100644
index 0000000000000..7e9578a2b531b
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/package-info.java
@@ -0,0 +1,10 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for MySqlManagementClient. 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 com.azure.resourcemanager.mysql.fluent;
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/AdvisorImpl.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/AdvisorImpl.java
new file mode 100644
index 0000000000000..857775ec316ac
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/AdvisorImpl.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.implementation;
+
+import com.azure.resourcemanager.mysql.MySqlManager;
+import com.azure.resourcemanager.mysql.fluent.models.AdvisorInner;
+import com.azure.resourcemanager.mysql.models.Advisor;
+
+public final class AdvisorImpl implements Advisor {
+ private AdvisorInner innerObject;
+
+ private final MySqlManager serviceManager;
+
+ AdvisorImpl(AdvisorInner innerObject, 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 Object properties() {
+ return this.innerModel().properties();
+ }
+
+ public AdvisorInner innerModel() {
+ return this.innerObject;
+ }
+
+ private MySqlManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/AdvisorsClientImpl.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/AdvisorsClientImpl.java
new file mode 100644
index 0000000000000..a7fe778ba9efd
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/AdvisorsClientImpl.java
@@ -0,0 +1,516 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysql.fluent.AdvisorsClient;
+import com.azure.resourcemanager.mysql.fluent.models.AdvisorInner;
+import com.azure.resourcemanager.mysql.models.AdvisorsResultList;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in AdvisorsClient. */
+public final class AdvisorsClientImpl implements AdvisorsClient {
+ private final ClientLogger logger = new ClientLogger(AdvisorsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final AdvisorsService service;
+
+ /** The service client containing this operation class. */
+ private final MySqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of AdvisorsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AdvisorsClientImpl(MySqlManagementClientImpl client) {
+ this.service = RestProxy.create(AdvisorsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MySqlManagementClientAdvisors to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MySqlManagementClien")
+ private interface AdvisorsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers"
+ + "/{serverName}/advisors/{advisorName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("advisorName") String advisorName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers"
+ + "/{serverName}/advisors")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByServer(
+ @HostParam("$host") 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("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get a recommendation action advisor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advisorName The advisor name for recommendation action.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 recommendation action advisor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String serverName, String advisorName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (advisorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter advisorName is required and cannot be null."));
+ }
+ final String apiVersion = "2018-06-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ advisorName,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get a recommendation action advisor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advisorName The advisor name for recommendation action.
+ * @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 recommendation action advisor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String serverName, String advisorName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (advisorName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter advisorName is required and cannot be null."));
+ }
+ final String apiVersion = "2018-06-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ advisorName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get a recommendation action advisor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advisorName The advisor name for recommendation action.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 recommendation action advisor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String serverName, String advisorName) {
+ return getWithResponseAsync(resourceGroupName, serverName, advisorName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Get a recommendation action advisor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advisorName The advisor name for recommendation action.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 recommendation action advisor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AdvisorInner get(String resourceGroupName, String serverName, String advisorName) {
+ return getAsync(resourceGroupName, serverName, advisorName).block();
+ }
+
+ /**
+ * Get a recommendation action advisor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advisorName The advisor name for recommendation action.
+ * @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 recommendation action advisor.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String serverName, String advisorName, Context context) {
+ return getWithResponseAsync(resourceGroupName, serverName, advisorName, context).block();
+ }
+
+ /**
+ * List recommendation action advisors.
+ *
+ * @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 query statistics.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ final String apiVersion = "2018-06-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByServer(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * List recommendation action advisors.
+ *
+ * @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 query statistics.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServerSinglePageAsync(
+ String resourceGroupName, String serverName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ final String apiVersion = "2018-06-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByServer(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List recommendation action advisors.
+ *
+ * @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 query statistics.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByServerAsync(String resourceGroupName, String serverName) {
+ return new PagedFlux<>(
+ () -> listByServerSinglePageAsync(resourceGroupName, serverName),
+ nextLink -> listByServerNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List recommendation action advisors.
+ *
+ * @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 query statistics.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Context context) {
+ return new PagedFlux<>(
+ () -> listByServerSinglePageAsync(resourceGroupName, serverName, context),
+ nextLink -> listByServerNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List recommendation action advisors.
+ *
+ * @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 query statistics.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByServer(String resourceGroupName, String serverName) {
+ return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName));
+ }
+
+ /**
+ * List recommendation action advisors.
+ *
+ * @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 query statistics.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) {
+ return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of query statistics.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServerNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of query statistics.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServerNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByServerNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/AdvisorsImpl.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/AdvisorsImpl.java
new file mode 100644
index 0000000000000..e482b0664a0f8
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/AdvisorsImpl.java
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.MySqlManager;
+import com.azure.resourcemanager.mysql.fluent.AdvisorsClient;
+import com.azure.resourcemanager.mysql.fluent.models.AdvisorInner;
+import com.azure.resourcemanager.mysql.models.Advisor;
+import com.azure.resourcemanager.mysql.models.Advisors;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class AdvisorsImpl implements Advisors {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AdvisorsImpl.class);
+
+ private final AdvisorsClient innerClient;
+
+ private final MySqlManager serviceManager;
+
+ public AdvisorsImpl(AdvisorsClient innerClient, MySqlManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Advisor get(String resourceGroupName, String serverName, String advisorName) {
+ AdvisorInner inner = this.serviceClient().get(resourceGroupName, serverName, advisorName);
+ if (inner != null) {
+ return new AdvisorImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String serverName, String advisorName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, serverName, advisorName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AdvisorImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listByServer(String resourceGroupName, String serverName) {
+ PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName);
+ return inner.mapPage(inner1 -> new AdvisorImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) {
+ PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName, context);
+ return inner.mapPage(inner1 -> new AdvisorImpl(inner1, this.manager()));
+ }
+
+ private AdvisorsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private MySqlManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/CheckNameAvailabilitiesClientImpl.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/CheckNameAvailabilitiesClientImpl.java
new file mode 100644
index 0000000000000..28489af79a5a7
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/CheckNameAvailabilitiesClientImpl.java
@@ -0,0 +1,216 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+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.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysql.fluent.CheckNameAvailabilitiesClient;
+import com.azure.resourcemanager.mysql.fluent.models.NameAvailabilityInner;
+import com.azure.resourcemanager.mysql.models.NameAvailabilityRequest;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in CheckNameAvailabilitiesClient. */
+public final class CheckNameAvailabilitiesClientImpl implements CheckNameAvailabilitiesClient {
+ private final ClientLogger logger = new ClientLogger(CheckNameAvailabilitiesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final CheckNameAvailabilitiesService service;
+
+ /** The service client containing this operation class. */
+ private final MySqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of CheckNameAvailabilitiesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CheckNameAvailabilitiesClientImpl(MySqlManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(CheckNameAvailabilitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MySqlManagementClientCheckNameAvailabilities to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MySqlManagementClien")
+ private interface CheckNameAvailabilitiesService {
+ @Headers({"Content-Type: application/json"})
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBForMySQL/checkNameAvailability")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> execute(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") NameAvailabilityRequest nameAvailabilityRequest,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 resource name availability.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> executeWithResponseAsync(
+ NameAvailabilityRequest nameAvailabilityRequest) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (nameAvailabilityRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null."));
+ } else {
+ nameAvailabilityRequest.validate();
+ }
+ final String apiVersion = "2017-12-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .execute(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ nameAvailabilityRequest,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @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 resource name availability.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> executeWithResponseAsync(
+ NameAvailabilityRequest nameAvailabilityRequest, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (nameAvailabilityRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null."));
+ } else {
+ nameAvailabilityRequest.validate();
+ }
+ final String apiVersion = "2017-12-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .execute(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ nameAvailabilityRequest,
+ accept,
+ context);
+ }
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 resource name availability.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono executeAsync(NameAvailabilityRequest nameAvailabilityRequest) {
+ return executeWithResponseAsync(nameAvailabilityRequest)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 resource name availability.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NameAvailabilityInner execute(NameAvailabilityRequest nameAvailabilityRequest) {
+ return executeAsync(nameAvailabilityRequest).block();
+ }
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @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 resource name availability.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response executeWithResponse(
+ NameAvailabilityRequest nameAvailabilityRequest, Context context) {
+ return executeWithResponseAsync(nameAvailabilityRequest, context).block();
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/CheckNameAvailabilitiesImpl.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/CheckNameAvailabilitiesImpl.java
new file mode 100644
index 0000000000000..1592ed2cd5a3d
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/CheckNameAvailabilitiesImpl.java
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.implementation;
+
+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.mysql.MySqlManager;
+import com.azure.resourcemanager.mysql.fluent.CheckNameAvailabilitiesClient;
+import com.azure.resourcemanager.mysql.fluent.models.NameAvailabilityInner;
+import com.azure.resourcemanager.mysql.models.CheckNameAvailabilities;
+import com.azure.resourcemanager.mysql.models.NameAvailability;
+import com.azure.resourcemanager.mysql.models.NameAvailabilityRequest;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class CheckNameAvailabilitiesImpl implements CheckNameAvailabilities {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilitiesImpl.class);
+
+ private final CheckNameAvailabilitiesClient innerClient;
+
+ private final MySqlManager serviceManager;
+
+ public CheckNameAvailabilitiesImpl(CheckNameAvailabilitiesClient innerClient, MySqlManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public NameAvailability execute(NameAvailabilityRequest nameAvailabilityRequest) {
+ NameAvailabilityInner inner = this.serviceClient().execute(nameAvailabilityRequest);
+ if (inner != null) {
+ return new NameAvailabilityImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response executeWithResponse(
+ NameAvailabilityRequest nameAvailabilityRequest, Context context) {
+ Response inner =
+ this.serviceClient().executeWithResponse(nameAvailabilityRequest, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new NameAvailabilityImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private CheckNameAvailabilitiesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private MySqlManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/ConfigurationImpl.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/ConfigurationImpl.java
new file mode 100644
index 0000000000000..a4f779f824f6c
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/ConfigurationImpl.java
@@ -0,0 +1,156 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mysql.MySqlManager;
+import com.azure.resourcemanager.mysql.fluent.models.ConfigurationInner;
+import com.azure.resourcemanager.mysql.models.Configuration;
+
+public final class ConfigurationImpl implements Configuration, Configuration.Definition, Configuration.Update {
+ private ConfigurationInner innerObject;
+
+ private final MySqlManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String value() {
+ return this.innerModel().value();
+ }
+
+ public String description() {
+ return this.innerModel().description();
+ }
+
+ public String defaultValue() {
+ return this.innerModel().defaultValue();
+ }
+
+ public String dataType() {
+ return this.innerModel().dataType();
+ }
+
+ public String allowedValues() {
+ return this.innerModel().allowedValues();
+ }
+
+ public String source() {
+ return this.innerModel().source();
+ }
+
+ public ConfigurationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private MySqlManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String serverName;
+
+ private String configurationName;
+
+ public ConfigurationImpl withExistingServer(String resourceGroupName, String serverName) {
+ this.resourceGroupName = resourceGroupName;
+ this.serverName = serverName;
+ return this;
+ }
+
+ public Configuration create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .createOrUpdate(resourceGroupName, serverName, configurationName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Configuration create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .createOrUpdate(resourceGroupName, serverName, configurationName, this.innerModel(), context);
+ return this;
+ }
+
+ ConfigurationImpl(String name, MySqlManager serviceManager) {
+ this.innerObject = new ConfigurationInner();
+ this.serviceManager = serviceManager;
+ this.configurationName = name;
+ }
+
+ public ConfigurationImpl update() {
+ return this;
+ }
+
+ public Configuration apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .createOrUpdate(resourceGroupName, serverName, configurationName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Configuration apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .createOrUpdate(resourceGroupName, serverName, configurationName, this.innerModel(), context);
+ return this;
+ }
+
+ ConfigurationImpl(ConfigurationInner innerObject, MySqlManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.serverName = Utils.getValueFromIdByName(innerObject.id(), "servers");
+ this.configurationName = Utils.getValueFromIdByName(innerObject.id(), "configurations");
+ }
+
+ public Configuration refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .getWithResponse(resourceGroupName, serverName, configurationName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Configuration refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getConfigurations()
+ .getWithResponse(resourceGroupName, serverName, configurationName, context)
+ .getValue();
+ return this;
+ }
+
+ public ConfigurationImpl withValue(String value) {
+ this.innerModel().withValue(value);
+ return this;
+ }
+
+ public ConfigurationImpl withSource(String source) {
+ this.innerModel().withSource(source);
+ return this;
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/ConfigurationListResultImpl.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/ConfigurationListResultImpl.java
new file mode 100644
index 0000000000000..60febe925187a
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/ConfigurationListResultImpl.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.implementation;
+
+import com.azure.resourcemanager.mysql.MySqlManager;
+import com.azure.resourcemanager.mysql.fluent.models.ConfigurationInner;
+import com.azure.resourcemanager.mysql.fluent.models.ConfigurationListResultInner;
+import com.azure.resourcemanager.mysql.models.Configuration;
+import com.azure.resourcemanager.mysql.models.ConfigurationListResult;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public final class ConfigurationListResultImpl implements ConfigurationListResult {
+ private ConfigurationListResultInner innerObject;
+
+ private final MySqlManager serviceManager;
+
+ ConfigurationListResultImpl(ConfigurationListResultInner innerObject, MySqlManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List value() {
+ List inner = this.innerModel().value();
+ if (inner != null) {
+ return Collections
+ .unmodifiableList(
+ inner
+ .stream()
+ .map(inner1 -> new ConfigurationImpl(inner1, this.manager()))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public ConfigurationListResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private MySqlManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/ConfigurationsClientImpl.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/ConfigurationsClientImpl.java
new file mode 100644
index 0000000000000..7a20b5e59a025
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/ConfigurationsClientImpl.java
@@ -0,0 +1,757 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.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.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.mysql.fluent.ConfigurationsClient;
+import com.azure.resourcemanager.mysql.fluent.models.ConfigurationInner;
+import com.azure.resourcemanager.mysql.fluent.models.ConfigurationListResultInner;
+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 ConfigurationsClient. */
+public final class ConfigurationsClientImpl implements ConfigurationsClient {
+ private final ClientLogger logger = new ClientLogger(ConfigurationsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final ConfigurationsService service;
+
+ /** The service client containing this operation class. */
+ private final MySqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ConfigurationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ConfigurationsClientImpl(MySqlManagementClientImpl client) {
+ this.service =
+ RestProxy.create(ConfigurationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MySqlManagementClientConfigurations to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MySqlManagementClien")
+ private interface ConfigurationsService {
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers"
+ + "/{serverName}/configurations/{configurationName}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("configurationName") String configurationName,
+ @BodyParam("application/json") ConfigurationInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers"
+ + "/{serverName}/configurations/{configurationName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("configurationName") String configurationName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers"
+ + "/{serverName}/configurations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByServer(
+ @HostParam("$host") 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);
+ }
+
+ /**
+ * 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 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)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (configurationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2017-12-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ configurationName,
+ parameters,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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 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)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (configurationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2017-12-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ configurationName,
+ parameters,
+ accept,
+ 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 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)
+ private PollerFlux, ConfigurationInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, serverName, configurationName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ConfigurationInner.class, ConfigurationInner.class, Context.NONE);
+ }
+
+ /**
+ * 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 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)
+ private PollerFlux, ConfigurationInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, serverName, configurationName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ConfigurationInner.class, ConfigurationInner.class, 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 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)
+ public SyncPoller, ConfigurationInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters).getSyncPoller();
+ }
+
+ /**
+ * 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 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)
+ public SyncPoller, ConfigurationInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * 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 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)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 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)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 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)
+ public ConfigurationInner createOrUpdate(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters).block();
+ }
+
+ /**
+ * 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 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)
+ public ConfigurationInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters, context).block();
+ }
+
+ /**
+ * 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 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)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String serverName, String configurationName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (configurationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ final String apiVersion = "2017-12-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ configurationName,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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 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)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String serverName, String configurationName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (configurationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ final String apiVersion = "2017-12-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ configurationName,
+ accept,
+ 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 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)
+ private Mono getAsync(String resourceGroupName, String serverName, String configurationName) {
+ return getWithResponseAsync(resourceGroupName, serverName, configurationName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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 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)
+ public ConfigurationInner get(String resourceGroupName, String serverName, String configurationName) {
+ return getAsync(resourceGroupName, serverName, configurationName).block();
+ }
+
+ /**
+ * 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 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)
+ public Response getWithResponse(
+ String resourceGroupName, String serverName, String configurationName, Context context) {
+ return getWithResponseAsync(resourceGroupName, serverName, configurationName, context).block();
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServerSinglePageAsync(
+ String resourceGroupName, String serverName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ final String apiVersion = "2017-12-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByServer(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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 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 configurations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServerSinglePageAsync(
+ String resourceGroupName, String serverName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ final String apiVersion = "2017-12-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByServer(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null));
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByServerAsync(String resourceGroupName, String serverName) {
+ return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName));
+ }
+
+ /**
+ * 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 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 configurations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByServerAsync(
+ String resourceGroupName, String serverName, Context context) {
+ return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context));
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByServer(String resourceGroupName, String serverName) {
+ return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName));
+ }
+
+ /**
+ * 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 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 configurations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByServer(
+ String resourceGroupName, String serverName, Context context) {
+ return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context));
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/ConfigurationsImpl.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/ConfigurationsImpl.java
new file mode 100644
index 0000000000000..fe0001cf4ff24
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/ConfigurationsImpl.java
@@ -0,0 +1,131 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.MySqlManager;
+import com.azure.resourcemanager.mysql.fluent.ConfigurationsClient;
+import com.azure.resourcemanager.mysql.fluent.models.ConfigurationInner;
+import com.azure.resourcemanager.mysql.models.Configuration;
+import com.azure.resourcemanager.mysql.models.Configurations;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class ConfigurationsImpl implements Configurations {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationsImpl.class);
+
+ private final ConfigurationsClient innerClient;
+
+ private final MySqlManager serviceManager;
+
+ public ConfigurationsImpl(ConfigurationsClient innerClient, MySqlManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Configuration get(String resourceGroupName, String serverName, String configurationName) {
+ ConfigurationInner inner = this.serviceClient().get(resourceGroupName, serverName, configurationName);
+ if (inner != null) {
+ return new ConfigurationImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String serverName, String configurationName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, serverName, configurationName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ConfigurationImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listByServer(String resourceGroupName, String serverName) {
+ PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName);
+ return inner.mapPage(inner1 -> new ConfigurationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByServer(resourceGroupName, serverName, context);
+ return inner.mapPage(inner1 -> new ConfigurationImpl(inner1, this.manager()));
+ }
+
+ public Configuration getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String serverName = Utils.getValueFromIdByName(id, "servers");
+ if (serverName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id)));
+ }
+ String configurationName = Utils.getValueFromIdByName(id, "configurations");
+ if (configurationName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'configurations'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, serverName, configurationName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String serverName = Utils.getValueFromIdByName(id, "servers");
+ if (serverName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id)));
+ }
+ String configurationName = Utils.getValueFromIdByName(id, "configurations");
+ if (configurationName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'configurations'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, serverName, configurationName, context);
+ }
+
+ private ConfigurationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private MySqlManager manager() {
+ return this.serviceManager;
+ }
+
+ public ConfigurationImpl define(String name) {
+ return new ConfigurationImpl(name, this.manager());
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/DatabaseImpl.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/DatabaseImpl.java
new file mode 100644
index 0000000000000..1ada6056b1db9
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/DatabaseImpl.java
@@ -0,0 +1,140 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mysql.MySqlManager;
+import com.azure.resourcemanager.mysql.fluent.models.DatabaseInner;
+import com.azure.resourcemanager.mysql.models.Database;
+
+public final class DatabaseImpl implements Database, Database.Definition, Database.Update {
+ private DatabaseInner innerObject;
+
+ private final MySqlManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String charset() {
+ return this.innerModel().charset();
+ }
+
+ public String collation() {
+ return this.innerModel().collation();
+ }
+
+ public DatabaseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private MySqlManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String serverName;
+
+ private String databaseName;
+
+ public DatabaseImpl withExistingServer(String resourceGroupName, String serverName) {
+ this.resourceGroupName = resourceGroupName;
+ this.serverName = serverName;
+ return this;
+ }
+
+ public Database create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabases()
+ .createOrUpdate(resourceGroupName, serverName, databaseName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Database create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabases()
+ .createOrUpdate(resourceGroupName, serverName, databaseName, this.innerModel(), context);
+ return this;
+ }
+
+ DatabaseImpl(String name, MySqlManager serviceManager) {
+ this.innerObject = new DatabaseInner();
+ this.serviceManager = serviceManager;
+ this.databaseName = name;
+ }
+
+ public DatabaseImpl update() {
+ return this;
+ }
+
+ public Database apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabases()
+ .createOrUpdate(resourceGroupName, serverName, databaseName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Database apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabases()
+ .createOrUpdate(resourceGroupName, serverName, databaseName, this.innerModel(), context);
+ return this;
+ }
+
+ DatabaseImpl(DatabaseInner innerObject, MySqlManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.serverName = Utils.getValueFromIdByName(innerObject.id(), "servers");
+ this.databaseName = Utils.getValueFromIdByName(innerObject.id(), "databases");
+ }
+
+ public Database refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabases()
+ .getWithResponse(resourceGroupName, serverName, databaseName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Database refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabases()
+ .getWithResponse(resourceGroupName, serverName, databaseName, context)
+ .getValue();
+ return this;
+ }
+
+ public DatabaseImpl withCharset(String charset) {
+ this.innerModel().withCharset(charset);
+ return this;
+ }
+
+ public DatabaseImpl withCollation(String collation) {
+ this.innerModel().withCollation(collation);
+ return this;
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/DatabasesClientImpl.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/DatabasesClientImpl.java
new file mode 100644
index 0000000000000..6df45fd5166e8
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/DatabasesClientImpl.java
@@ -0,0 +1,995 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.mysql.fluent.DatabasesClient;
+import com.azure.resourcemanager.mysql.fluent.models.DatabaseInner;
+import com.azure.resourcemanager.mysql.models.DatabaseListResult;
+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 DatabasesClient. */
+public final class DatabasesClientImpl implements DatabasesClient {
+ private final ClientLogger logger = new ClientLogger(DatabasesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final DatabasesService service;
+
+ /** The service client containing this operation class. */
+ private final MySqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DatabasesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DatabasesClientImpl(MySqlManagementClientImpl client) {
+ this.service =
+ RestProxy.create(DatabasesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MySqlManagementClientDatabases to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MySqlManagementClien")
+ private interface DatabasesService {
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers"
+ + "/{serverName}/databases/{databaseName}")
+ @ExpectedResponses({200, 201, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("databaseName") String databaseName,
+ @BodyParam("application/json") DatabaseInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers"
+ + "/{serverName}/databases/{databaseName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("databaseName") String databaseName,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers"
+ + "/{serverName}/databases/{databaseName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("databaseName") String databaseName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers"
+ + "/{serverName}/databases")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByServer(
+ @HostParam("$host") 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);
+ }
+
+ /**
+ * Creates a new database or updates an existing 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 parameters The required parameters for creating or updating a database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2017-12-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ databaseName,
+ parameters,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Creates a new database or updates an existing 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 parameters The required parameters for creating or updating a database.
+ * @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 Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2017-12-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ databaseName,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates a new database or updates an existing 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 parameters The required parameters for creating or updating a database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, DatabaseInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, Context.NONE);
+ }
+
+ /**
+ * Creates a new database or updates an existing 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 parameters The required parameters for creating or updating a database.
+ * @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 Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, DatabaseInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, context);
+ }
+
+ /**
+ * Creates a new database or updates an existing 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 parameters The required parameters for creating or updating a database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, DatabaseInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Creates a new database or updates an existing 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 parameters The required parameters for creating or updating a database.
+ * @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 Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, DatabaseInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Creates a new database or updates an existing 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 parameters The required parameters for creating or updating a database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a new database or updates an existing 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 parameters The required parameters for creating or updating a database.
+ * @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 Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a new database or updates an existing 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 parameters The required parameters for creating or updating a database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DatabaseInner createOrUpdate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).block();
+ }
+
+ /**
+ * Creates a new database or updates an existing 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 parameters The required parameters for creating or updating a database.
+ * @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 Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DatabaseInner createOrUpdate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context) {
+ return createOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters, context).block();
+ }
+
+ /**
+ * Deletes 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 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String serverName, String databaseName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ final String apiVersion = "2017-12-01";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ databaseName,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Deletes 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 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String serverName, String databaseName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ final String apiVersion = "2017-12-01";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ databaseName,
+ context);
+ }
+
+ /**
+ * Deletes 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 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String serverName, String databaseName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, databaseName);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Deletes 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 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String serverName, String databaseName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, serverName, databaseName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes 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 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String databaseName) {
+ return beginDeleteAsync(resourceGroupName, serverName, databaseName).getSyncPoller();
+ }
+
+ /**
+ * Deletes 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 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String databaseName, Context context) {
+ return beginDeleteAsync(resourceGroupName, serverName, databaseName, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes 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 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String serverName, String databaseName) {
+ return beginDeleteAsync(resourceGroupName, serverName, databaseName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes 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 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, Context context) {
+ return beginDeleteAsync(resourceGroupName, serverName, databaseName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes 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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String serverName, String databaseName) {
+ deleteAsync(resourceGroupName, serverName, databaseName).block();
+ }
+
+ /**
+ * Deletes 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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String serverName, String databaseName, Context context) {
+ deleteAsync(resourceGroupName, serverName, databaseName, context).block();
+ }
+
+ /**
+ * 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 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)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String serverName, String databaseName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ final String apiVersion = "2017-12-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ databaseName,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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 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)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String serverName, String databaseName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ final String apiVersion = "2017-12-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ databaseName,
+ accept,
+ 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 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)
+ private Mono getAsync(String resourceGroupName, String serverName, String databaseName) {
+ return getWithResponseAsync(resourceGroupName, serverName, databaseName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * 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 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)
+ public DatabaseInner get(String resourceGroupName, String serverName, String databaseName) {
+ return getAsync(resourceGroupName, serverName, databaseName).block();
+ }
+
+ /**
+ * 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 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)
+ public Response getWithResponse(
+ String resourceGroupName, String serverName, String databaseName, Context context) {
+ return getWithResponseAsync(resourceGroupName, serverName, databaseName, context).block();
+ }
+
+ /**
+ * List all the databases 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServerSinglePageAsync(
+ String resourceGroupName, String serverName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ final String apiVersion = "2017-12-01";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByServer(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * List all the databases 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServerSinglePageAsync(
+ String resourceGroupName, String serverName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ final String apiVersion = "2017-12-01";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByServer(
+ this.client.getEndpoint(),
+ apiVersion,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null));
+ }
+
+ /**
+ * List all the databases 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByServerAsync(String resourceGroupName, String serverName) {
+ return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName));
+ }
+
+ /**
+ * List all the databases 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Context context) {
+ return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context));
+ }
+
+ /**
+ * List all the databases 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByServer(String resourceGroupName, String serverName) {
+ return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName));
+ }
+
+ /**
+ * List all the databases 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 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) {
+ return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context));
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/DatabasesImpl.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/DatabasesImpl.java
new file mode 100644
index 0000000000000..f47c755ddc1b1
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/DatabasesImpl.java
@@ -0,0 +1,188 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.mysql.MySqlManager;
+import com.azure.resourcemanager.mysql.fluent.DatabasesClient;
+import com.azure.resourcemanager.mysql.fluent.models.DatabaseInner;
+import com.azure.resourcemanager.mysql.models.Database;
+import com.azure.resourcemanager.mysql.models.Databases;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class DatabasesImpl implements Databases {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabasesImpl.class);
+
+ private final DatabasesClient innerClient;
+
+ private final MySqlManager serviceManager;
+
+ public DatabasesImpl(DatabasesClient innerClient, MySqlManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public void delete(String resourceGroupName, String serverName, String databaseName) {
+ this.serviceClient().delete(resourceGroupName, serverName, databaseName);
+ }
+
+ public void delete(String resourceGroupName, String serverName, String databaseName, Context context) {
+ this.serviceClient().delete(resourceGroupName, serverName, databaseName, context);
+ }
+
+ public Database get(String resourceGroupName, String serverName, String databaseName) {
+ DatabaseInner inner = this.serviceClient().get(resourceGroupName, serverName, databaseName);
+ if (inner != null) {
+ return new DatabaseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String serverName, String databaseName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, serverName, databaseName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new DatabaseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listByServer(String resourceGroupName, String serverName) {
+ PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName);
+ return inner.mapPage(inner1 -> new DatabaseImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) {
+ PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName, context);
+ return inner.mapPage(inner1 -> new DatabaseImpl(inner1, this.manager()));
+ }
+
+ public Database getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String serverName = Utils.getValueFromIdByName(id, "servers");
+ if (serverName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id)));
+ }
+ String databaseName = Utils.getValueFromIdByName(id, "databases");
+ if (databaseName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, serverName, databaseName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String serverName = Utils.getValueFromIdByName(id, "servers");
+ if (serverName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id)));
+ }
+ String databaseName = Utils.getValueFromIdByName(id, "databases");
+ if (databaseName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, serverName, databaseName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String serverName = Utils.getValueFromIdByName(id, "servers");
+ if (serverName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id)));
+ }
+ String databaseName = Utils.getValueFromIdByName(id, "databases");
+ if (databaseName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id)));
+ }
+ this.delete(resourceGroupName, serverName, databaseName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String serverName = Utils.getValueFromIdByName(id, "servers");
+ if (serverName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id)));
+ }
+ String databaseName = Utils.getValueFromIdByName(id, "databases");
+ if (databaseName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id)));
+ }
+ this.delete(resourceGroupName, serverName, databaseName, context);
+ }
+
+ private DatabasesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private MySqlManager manager() {
+ return this.serviceManager;
+ }
+
+ public DatabaseImpl define(String name) {
+ return new DatabaseImpl(name, this.manager());
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/FirewallRuleImpl.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/FirewallRuleImpl.java
new file mode 100644
index 0000000000000..73c1528b15c74
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/FirewallRuleImpl.java
@@ -0,0 +1,140 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mysql.MySqlManager;
+import com.azure.resourcemanager.mysql.fluent.models.FirewallRuleInner;
+import com.azure.resourcemanager.mysql.models.FirewallRule;
+
+public final class FirewallRuleImpl implements FirewallRule, FirewallRule.Definition, FirewallRule.Update {
+ private FirewallRuleInner innerObject;
+
+ private final MySqlManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String startIpAddress() {
+ return this.innerModel().startIpAddress();
+ }
+
+ public String endIpAddress() {
+ return this.innerModel().endIpAddress();
+ }
+
+ public FirewallRuleInner innerModel() {
+ return this.innerObject;
+ }
+
+ private MySqlManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String serverName;
+
+ private String firewallRuleName;
+
+ public FirewallRuleImpl withExistingServer(String resourceGroupName, String serverName) {
+ this.resourceGroupName = resourceGroupName;
+ this.serverName = serverName;
+ return this;
+ }
+
+ public FirewallRule create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFirewallRules()
+ .createOrUpdate(resourceGroupName, serverName, firewallRuleName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public FirewallRule create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFirewallRules()
+ .createOrUpdate(resourceGroupName, serverName, firewallRuleName, this.innerModel(), context);
+ return this;
+ }
+
+ FirewallRuleImpl(String name, MySqlManager serviceManager) {
+ this.innerObject = new FirewallRuleInner();
+ this.serviceManager = serviceManager;
+ this.firewallRuleName = name;
+ }
+
+ public FirewallRuleImpl update() {
+ return this;
+ }
+
+ public FirewallRule apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFirewallRules()
+ .createOrUpdate(resourceGroupName, serverName, firewallRuleName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public FirewallRule apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFirewallRules()
+ .createOrUpdate(resourceGroupName, serverName, firewallRuleName, this.innerModel(), context);
+ return this;
+ }
+
+ FirewallRuleImpl(FirewallRuleInner innerObject, MySqlManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.serverName = Utils.getValueFromIdByName(innerObject.id(), "servers");
+ this.firewallRuleName = Utils.getValueFromIdByName(innerObject.id(), "firewallRules");
+ }
+
+ public FirewallRule refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFirewallRules()
+ .getWithResponse(resourceGroupName, serverName, firewallRuleName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public FirewallRule refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFirewallRules()
+ .getWithResponse(resourceGroupName, serverName, firewallRuleName, context)
+ .getValue();
+ return this;
+ }
+
+ public FirewallRuleImpl withStartIpAddress(String startIpAddress) {
+ this.innerModel().withStartIpAddress(startIpAddress);
+ return this;
+ }
+
+ public FirewallRuleImpl withEndIpAddress(String endIpAddress) {
+ this.innerModel().withEndIpAddress(endIpAddress);
+ return this;
+ }
+}
diff --git a/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/FirewallRulesClientImpl.java b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/FirewallRulesClientImpl.java
new file mode 100644
index 0000000000000..c0c8c286cad0b
--- /dev/null
+++ b/sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/FirewallRulesClientImpl.java
@@ -0,0 +1,1024 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mysql.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.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.mysql.fluent.FirewallRulesClient;
+import com.azure.resourcemanager.mysql.fluent.models.FirewallRuleInner;
+import com.azure.resourcemanager.mysql.models.FirewallRuleListResult;
+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 FirewallRulesClient. */
+public final class FirewallRulesClientImpl implements FirewallRulesClient {
+ private final ClientLogger logger = new ClientLogger(FirewallRulesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final FirewallRulesService service;
+
+ /** The service client containing this operation class. */
+ private final MySqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of FirewallRulesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ FirewallRulesClientImpl(MySqlManagementClientImpl client) {
+ this.service =
+ RestProxy.create(FirewallRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MySqlManagementClientFirewallRules to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MySqlManagementClien")
+ private interface FirewallRulesService {
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers"
+ + "/{serverName}/firewallRules/{firewallRuleName}")
+ @ExpectedResponses({200, 201, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("firewallRuleName") String firewallRuleName,
+ @BodyParam("application/json") FirewallRuleInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers"
+ + "/{serverName}/firewallRules/{firewallRuleName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("firewallRuleName") String firewallRuleName,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers"
+ + "/{serverName}/firewallRules/{firewallRuleName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("firewallRuleName") String firewallRuleName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers"
+ + "/{serverName}/firewallRules")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono