scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
+ 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;
+ }
+
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' 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 retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' 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, "'defaultPollInterval' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of databasefleetmanager service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the databasefleetmanager service API instance.
+ */
+ public DatabasefleetmanagerManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder.append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.databasefleetmanager")
+ .append("/")
+ .append(clientVersion);
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder.append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
+ policies.add(new RequestIdPolicy());
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new DatabasefleetmanagerManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of FleetDatabases. It manages FleetDatabase.
+ *
+ * @return Resource collection API of FleetDatabases.
+ */
+ public FleetDatabases fleetDatabases() {
+ if (this.fleetDatabases == null) {
+ this.fleetDatabases = new FleetDatabasesImpl(clientObject.getFleetDatabases(), this);
+ }
+ return fleetDatabases;
+ }
+
+ /**
+ * Gets the resource collection API of Fleetspaces. It manages Fleetspace.
+ *
+ * @return Resource collection API of Fleetspaces.
+ */
+ public Fleetspaces fleetspaces() {
+ if (this.fleetspaces == null) {
+ this.fleetspaces = new FleetspacesImpl(clientObject.getFleetspaces(), this);
+ }
+ return fleetspaces;
+ }
+
+ /**
+ * Gets the resource collection API of Fleets. It manages Fleet.
+ *
+ * @return Resource collection API of Fleets.
+ */
+ public Fleets fleets() {
+ if (this.fleets == null) {
+ this.fleets = new FleetsImpl(clientObject.getFleets(), this);
+ }
+ return fleets;
+ }
+
+ /**
+ * Gets the resource collection API of FirewallRules. It manages FirewallRule.
+ *
+ * @return Resource collection API of FirewallRules.
+ */
+ public FirewallRules firewallRules() {
+ if (this.firewallRules == null) {
+ this.firewallRules = new FirewallRulesImpl(clientObject.getFirewallRules(), this);
+ }
+ return firewallRules;
+ }
+
+ /**
+ * Gets the resource collection API of FleetTiers. It manages FleetTier.
+ *
+ * @return Resource collection API of FleetTiers.
+ */
+ public FleetTiers fleetTiers() {
+ if (this.fleetTiers == null) {
+ this.fleetTiers = new FleetTiersImpl(clientObject.getFleetTiers(), this);
+ }
+ return fleetTiers;
+ }
+
+ /**
+ * Gets wrapped service client DatabaseFleetManagerClient providing direct access to the underlying auto-generated
+ * API implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client DatabaseFleetManagerClient.
+ */
+ public DatabaseFleetManagerClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/DatabaseFleetManagerClient.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/DatabaseFleetManagerClient.java
new file mode 100644
index 000000000000..d053f3bbf905
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/DatabaseFleetManagerClient.java
@@ -0,0 +1,90 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for DatabaseFleetManagerClient class.
+ */
+public interface DatabaseFleetManagerClient {
+ /**
+ * Gets Service host.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Version parameter.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the FleetDatabasesClient object to access its operations.
+ *
+ * @return the FleetDatabasesClient object.
+ */
+ FleetDatabasesClient getFleetDatabases();
+
+ /**
+ * Gets the FleetspacesClient object to access its operations.
+ *
+ * @return the FleetspacesClient object.
+ */
+ FleetspacesClient getFleetspaces();
+
+ /**
+ * Gets the FleetsClient object to access its operations.
+ *
+ * @return the FleetsClient object.
+ */
+ FleetsClient getFleets();
+
+ /**
+ * Gets the FirewallRulesClient object to access its operations.
+ *
+ * @return the FirewallRulesClient object.
+ */
+ FirewallRulesClient getFirewallRules();
+
+ /**
+ * Gets the FleetTiersClient object to access its operations.
+ *
+ * @return the FleetTiersClient object.
+ */
+ FleetTiersClient getFleetTiers();
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/FirewallRulesClient.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/FirewallRulesClient.java
new file mode 100644
index 000000000000..5eb74d5f64b1
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/FirewallRulesClient.java
@@ -0,0 +1,218 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.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.databasefleetmanager.fluent.models.FirewallRuleInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in FirewallRulesClient.
+ */
+public interface FirewallRulesClient {
+ /**
+ * Gets a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the 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 a firewall rule along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String fleetName, String fleetspaceName,
+ String firewallRuleName, Context context);
+
+ /**
+ * Gets a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the 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 a firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FirewallRuleInner get(String resourceGroupName, String fleetName, String fleetspaceName, String firewallRuleName);
+
+ /**
+ * Creates or updates a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param resource The firewall rule object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName,
+ String fleetName, String fleetspaceName, String firewallRuleName, FirewallRuleInner resource);
+
+ /**
+ * Creates or updates a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param resource The firewall rule object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName,
+ String fleetName, String fleetspaceName, String firewallRuleName, FirewallRuleInner resource, Context context);
+
+ /**
+ * Creates or updates a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param resource The firewall rule object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FirewallRuleInner createOrUpdate(String resourceGroupName, String fleetName, String fleetspaceName,
+ String firewallRuleName, FirewallRuleInner resource);
+
+ /**
+ * Creates or updates a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param resource The firewall rule object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FirewallRuleInner createOrUpdate(String resourceGroupName, String fleetName, String fleetspaceName,
+ String firewallRuleName, FirewallRuleInner resource, Context context);
+
+ /**
+ * Deletes a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, String fleetspaceName,
+ String firewallRuleName);
+
+ /**
+ * Deletes a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, String fleetspaceName,
+ String firewallRuleName, Context context);
+
+ /**
+ * Deletes a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the 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 fleetName, String fleetspaceName, String firewallRuleName);
+
+ /**
+ * Deletes a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the 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 fleetName, String fleetspaceName, String firewallRuleName,
+ Context context);
+
+ /**
+ * Gets all firewall rules in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 firewall rules in a fleetspace as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByFleetspace(String resourceGroupName, String fleetName,
+ String fleetspaceName);
+
+ /**
+ * Gets all firewall rules in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the collection.
+ * @param skiptoken An opaque token that identifies a starting point in the collection.
+ * @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 firewall rules in a fleetspace as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByFleetspace(String resourceGroupName, String fleetName, String fleetspaceName,
+ Long skip, Long top, String skiptoken, Context context);
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/FleetDatabasesClient.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/FleetDatabasesClient.java
new file mode 100644
index 000000000000..3b15fc593563
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/FleetDatabasesClient.java
@@ -0,0 +1,490 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.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.databasefleetmanager.fluent.models.FleetDatabaseInner;
+import com.azure.resourcemanager.databasefleetmanager.models.DatabaseChangeTierProperties;
+import com.azure.resourcemanager.databasefleetmanager.models.DatabaseRenameProperties;
+
+/**
+ * An instance of this class provides access to all the operations defined in FleetDatabasesClient.
+ */
+public interface FleetDatabasesClient {
+ /**
+ * Gets a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 a fleet database along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, Context context);
+
+ /**
+ * Gets a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetDatabaseInner get(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName);
+
+ /**
+ * Creates or updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param resource The database object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetDatabaseInner> beginCreateOrUpdate(String resourceGroupName,
+ String fleetName, String fleetspaceName, String databaseName, FleetDatabaseInner resource);
+
+ /**
+ * Creates or updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param resource The database object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetDatabaseInner> beginCreateOrUpdate(String resourceGroupName,
+ String fleetName, String fleetspaceName, String databaseName, FleetDatabaseInner resource, Context context);
+
+ /**
+ * Creates or updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param resource The database object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetDatabaseInner createOrUpdate(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, FleetDatabaseInner resource);
+
+ /**
+ * Creates or updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param resource The database object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetDatabaseInner createOrUpdate(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, FleetDatabaseInner resource, Context context);
+
+ /**
+ * Updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param properties The database object to patch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetDatabaseInner> beginUpdate(String resourceGroupName,
+ String fleetName, String fleetspaceName, String databaseName, FleetDatabaseInner properties);
+
+ /**
+ * Updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param properties The database object to patch.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetDatabaseInner> beginUpdate(String resourceGroupName,
+ String fleetName, String fleetspaceName, String databaseName, FleetDatabaseInner properties, Context context);
+
+ /**
+ * Updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param properties The database object to patch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetDatabaseInner update(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ FleetDatabaseInner properties);
+
+ /**
+ * Updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param properties The database object to patch.
+ * @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 fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetDatabaseInner update(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ FleetDatabaseInner properties, Context context);
+
+ /**
+ * Deletes a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName);
+
+ /**
+ * Deletes a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, Context context);
+
+ /**
+ * Deletes a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 fleetName, String fleetspaceName, String databaseName);
+
+ /**
+ * Deletes a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 fleetName, String fleetspaceName, String databaseName,
+ Context context);
+
+ /**
+ * Gets all fleet databases in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 fleet databases in a fleetspace as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByFleetspace(String resourceGroupName, String fleetName,
+ String fleetspaceName);
+
+ /**
+ * Gets all fleet databases in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the collection.
+ * @param filter An OData filter expression that filters elements in the collection.
+ * @param skiptoken An opaque token that identifies a starting point in the collection.
+ * @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 fleet databases in a fleetspace as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByFleetspace(String resourceGroupName, String fleetName,
+ String fleetspaceName, Long skip, Long top, String filter, String skiptoken, Context context);
+
+ /**
+ * Moves database to a different tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the change tier operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginChangeTier(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, DatabaseChangeTierProperties body);
+
+ /**
+ * Moves database to a different tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the change tier operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginChangeTier(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, DatabaseChangeTierProperties body, Context context);
+
+ /**
+ * Moves database to a different tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the change tier 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 changeTier(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ DatabaseChangeTierProperties body);
+
+ /**
+ * Moves database to a different tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the change tier 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void changeTier(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ DatabaseChangeTierProperties body, Context context);
+
+ /**
+ * Renames a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the rename operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRename(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, DatabaseRenameProperties body);
+
+ /**
+ * Renames a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the rename operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRename(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, DatabaseRenameProperties body, Context context);
+
+ /**
+ * Renames a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the rename 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 rename(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ DatabaseRenameProperties body);
+
+ /**
+ * Renames a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the rename 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void rename(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ DatabaseRenameProperties body, Context context);
+
+ /**
+ * Revert a database transparent data encryption (TDE).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRevert(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName);
+
+ /**
+ * Revert a database transparent data encryption (TDE).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRevert(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, Context context);
+
+ /**
+ * Revert a database transparent data encryption (TDE).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 revert(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName);
+
+ /**
+ * Revert a database transparent data encryption (TDE).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 revert(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ Context context);
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/FleetTiersClient.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/FleetTiersClient.java
new file mode 100644
index 000000000000..6273415cedb8
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/FleetTiersClient.java
@@ -0,0 +1,297 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.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.databasefleetmanager.fluent.models.FleetTierInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in FleetTiersClient.
+ */
+public interface FleetTiersClient {
+ /**
+ * Gets a tier resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param tierName Name of the tier.
+ * @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 tier resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String fleetName, String tierName,
+ Context context);
+
+ /**
+ * Gets a tier resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param tierName Name of the tier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 tier resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetTierInner get(String resourceGroupName, String fleetName, String tierName);
+
+ /**
+ * Creates or updates a tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param tierName Name of the tier.
+ * @param resource The tier object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a SQL Database Fleet tier.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetTierInner> beginCreateOrUpdate(String resourceGroupName,
+ String fleetName, String tierName, FleetTierInner resource);
+
+ /**
+ * Creates or updates a tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param tierName Name of the tier.
+ * @param resource The tier object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a SQL Database Fleet tier.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetTierInner> beginCreateOrUpdate(String resourceGroupName,
+ String fleetName, String tierName, FleetTierInner resource, Context context);
+
+ /**
+ * Creates or updates a tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param tierName Name of the tier.
+ * @param resource The tier object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a SQL Database Fleet tier.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetTierInner createOrUpdate(String resourceGroupName, String fleetName, String tierName, FleetTierInner resource);
+
+ /**
+ * Creates or updates a tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param tierName Name of the tier.
+ * @param resource The tier object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a SQL Database Fleet tier.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetTierInner createOrUpdate(String resourceGroupName, String fleetName, String tierName, FleetTierInner resource,
+ Context context);
+
+ /**
+ * Updates a tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param tierName Name of the tier.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a SQL Database Fleet tier.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetTierInner> beginUpdate(String resourceGroupName, String fleetName,
+ String tierName, FleetTierInner properties);
+
+ /**
+ * Updates a tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param tierName Name of the tier.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a SQL Database Fleet tier.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetTierInner> beginUpdate(String resourceGroupName, String fleetName,
+ String tierName, FleetTierInner properties, Context context);
+
+ /**
+ * Updates a tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param tierName Name of the tier.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 SQL Database Fleet tier.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetTierInner update(String resourceGroupName, String fleetName, String tierName, FleetTierInner properties);
+
+ /**
+ * Updates a tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param tierName Name of the tier.
+ * @param properties The resource properties to be updated.
+ * @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 SQL Database Fleet tier.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetTierInner update(String resourceGroupName, String fleetName, String tierName, FleetTierInner properties,
+ Context context);
+
+ /**
+ * Deletes a tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param tierName Name of the tier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, String tierName);
+
+ /**
+ * Deletes a tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param tierName Name of the tier.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, String tierName,
+ Context context);
+
+ /**
+ * Deletes a tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param tierName Name of the tier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 fleetName, String tierName);
+
+ /**
+ * Deletes a tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param tierName Name of the tier.
+ * @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 fleetName, String tierName, Context context);
+
+ /**
+ * List tiers in a fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FleetTier list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByFleet(String resourceGroupName, String fleetName);
+
+ /**
+ * List tiers in a fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the collection.
+ * @param skiptoken An opaque token that identifies a starting point in the collection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FleetTier list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByFleet(String resourceGroupName, String fleetName, Long skip, Long top,
+ String skiptoken, Context context);
+
+ /**
+ * Disables a tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param tierName Name of the tier.
+ * @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 SQL Database Fleet tier along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response disableWithResponse(String resourceGroupName, String fleetName, String tierName,
+ Context context);
+
+ /**
+ * Disables a tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param tierName Name of the tier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 SQL Database Fleet tier.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetTierInner disable(String resourceGroupName, String fleetName, String tierName);
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/FleetsClient.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/FleetsClient.java
new file mode 100644
index 000000000000..e8fe2fcb0e7e
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/FleetsClient.java
@@ -0,0 +1,270 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.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.databasefleetmanager.fluent.models.FleetInner;
+import com.azure.resourcemanager.databasefleetmanager.models.FleetUpdate;
+
+/**
+ * An instance of this class provides access to all the operations defined in FleetsClient.
+ */
+public interface FleetsClient {
+ /**
+ * Gets a fleet resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @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 fleet resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String fleetName, Context context);
+
+ /**
+ * Gets a fleet resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetInner getByResourceGroup(String resourceGroupName, String fleetName);
+
+ /**
+ * Creates or updates a fleet resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param resource The fleet object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Database Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetInner> beginCreateOrUpdate(String resourceGroupName, String fleetName,
+ FleetInner resource);
+
+ /**
+ * Creates or updates a fleet resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param resource The fleet object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Database Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetInner> beginCreateOrUpdate(String resourceGroupName, String fleetName,
+ FleetInner resource, Context context);
+
+ /**
+ * Creates or updates a fleet resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param resource The fleet object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Database Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetInner createOrUpdate(String resourceGroupName, String fleetName, FleetInner resource);
+
+ /**
+ * Creates or updates a fleet resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param resource The fleet object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Database Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetInner createOrUpdate(String resourceGroupName, String fleetName, FleetInner resource, Context context);
+
+ /**
+ * Modifies a fleet resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param properties The fleet object to patch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Database Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetInner> beginUpdate(String resourceGroupName, String fleetName,
+ FleetUpdate properties);
+
+ /**
+ * Modifies a fleet resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param properties The fleet object to patch.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Database Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetInner> beginUpdate(String resourceGroupName, String fleetName,
+ FleetUpdate properties, Context context);
+
+ /**
+ * Modifies a fleet resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param properties The fleet object to patch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 Database Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetInner update(String resourceGroupName, String fleetName, FleetUpdate properties);
+
+ /**
+ * Modifies a fleet resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param properties The fleet object to patch.
+ * @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 Database Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetInner update(String resourceGroupName, String fleetName, FleetUpdate properties, Context context);
+
+ /**
+ * Deletes a fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName);
+
+ /**
+ * Deletes a fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, Context context);
+
+ /**
+ * Deletes a fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 fleetName);
+
+ /**
+ * Deletes a fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @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 fleetName, Context context);
+
+ /**
+ * Gets all fleets in a 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 all fleets in a resource group as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Gets all fleets in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the collection.
+ * @param skiptoken An opaque token that identifies a starting point in the collection.
+ * @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 fleets in a resource group as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Long skip, Long top, String skiptoken,
+ Context context);
+
+ /**
+ * Gets all fleets in a 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 all fleets in a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets all fleets in a 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 all fleets in a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/FleetspacesClient.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/FleetspacesClient.java
new file mode 100644
index 000000000000..96882ffb2c00
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/FleetspacesClient.java
@@ -0,0 +1,392 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.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.databasefleetmanager.fluent.models.FleetspaceInner;
+import com.azure.resourcemanager.databasefleetmanager.models.RegisterServerProperties;
+
+/**
+ * An instance of this class provides access to all the operations defined in FleetspacesClient.
+ */
+public interface FleetspacesClient {
+ /**
+ * Gets fleetspace resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @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 fleetspace resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String fleetName, String fleetspaceName,
+ Context context);
+
+ /**
+ * Gets fleetspace resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return fleetspace resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetspaceInner get(String resourceGroupName, String fleetName, String fleetspaceName);
+
+ /**
+ * Creates or updates a fleetspace resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param resource The fleet object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a fleetspace.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetspaceInner> beginCreateOrUpdate(String resourceGroupName,
+ String fleetName, String fleetspaceName, FleetspaceInner resource);
+
+ /**
+ * Creates or updates a fleetspace resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param resource The fleet object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a fleetspace.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetspaceInner> beginCreateOrUpdate(String resourceGroupName,
+ String fleetName, String fleetspaceName, FleetspaceInner resource, Context context);
+
+ /**
+ * Creates or updates a fleetspace resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param resource The fleet object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a fleetspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetspaceInner createOrUpdate(String resourceGroupName, String fleetName, String fleetspaceName,
+ FleetspaceInner resource);
+
+ /**
+ * Creates or updates a fleetspace resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param resource The fleet object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a fleetspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetspaceInner createOrUpdate(String resourceGroupName, String fleetName, String fleetspaceName,
+ FleetspaceInner resource, Context context);
+
+ /**
+ * Modifies a fleetspace resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a fleetspace.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetspaceInner> beginUpdate(String resourceGroupName, String fleetName,
+ String fleetspaceName, FleetspaceInner properties);
+
+ /**
+ * Modifies a fleetspace resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a fleetspace.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetspaceInner> beginUpdate(String resourceGroupName, String fleetName,
+ String fleetspaceName, FleetspaceInner properties, Context context);
+
+ /**
+ * Modifies a fleetspace resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 fleetspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetspaceInner update(String resourceGroupName, String fleetName, String fleetspaceName,
+ FleetspaceInner properties);
+
+ /**
+ * Modifies a fleetspace resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param properties The resource properties to be updated.
+ * @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 fleetspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetspaceInner update(String resourceGroupName, String fleetName, String fleetspaceName,
+ FleetspaceInner properties, Context context);
+
+ /**
+ * Deletes a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, String fleetspaceName);
+
+ /**
+ * Deletes a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, String fleetspaceName,
+ Context context);
+
+ /**
+ * Deletes a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 fleetName, String fleetspaceName);
+
+ /**
+ * Deletes a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @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 fleetName, String fleetspaceName, Context context);
+
+ /**
+ * Lists fleetspaces in a fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Fleetspace list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByFleet(String resourceGroupName, String fleetName);
+
+ /**
+ * Lists fleetspaces in a fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the collection.
+ * @param skiptoken An opaque token that identifies a starting point in the collection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Fleetspace list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByFleet(String resourceGroupName, String fleetName, Long skip, Long top,
+ String skiptoken, Context context);
+
+ /**
+ * Migrates an existing logical server into fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param body The details of the register server operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRegisterServer(String resourceGroupName, String fleetName,
+ String fleetspaceName, RegisterServerProperties body);
+
+ /**
+ * Migrates an existing logical server into fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param body The details of the register server operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRegisterServer(String resourceGroupName, String fleetName,
+ String fleetspaceName, RegisterServerProperties body, Context context);
+
+ /**
+ * Migrates an existing logical server into fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param body The details of the register server 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 registerServer(String resourceGroupName, String fleetName, String fleetspaceName,
+ RegisterServerProperties body);
+
+ /**
+ * Migrates an existing logical server into fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param body The details of the register server 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void registerServer(String resourceGroupName, String fleetName, String fleetspaceName,
+ RegisterServerProperties body, Context context);
+
+ /**
+ * Unregisters all databases from a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginUnregister(String resourceGroupName, String fleetName,
+ String fleetspaceName);
+
+ /**
+ * Unregisters all databases from a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginUnregister(String resourceGroupName, String fleetName,
+ String fleetspaceName, Context context);
+
+ /**
+ * Unregisters all databases from a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 unregister(String resourceGroupName, String fleetName, String fleetspaceName);
+
+ /**
+ * Unregisters all databases from a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @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 unregister(String resourceGroupName, String fleetName, String fleetspaceName, Context context);
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/OperationsClient.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/OperationsClient.java
new file mode 100644
index 000000000000..19e73b22d00b
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/OperationsClient.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.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.databasefleetmanager.fluent.models.OperationInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperationsClient.
+ */
+public interface OperationsClient {
+ /**
+ * List the operations for the provider.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/FirewallRuleInner.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/FirewallRuleInner.java
new file mode 100644
index 000000000000..fcbcc59f1de6
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/FirewallRuleInner.java
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.databasefleetmanager.models.FirewallRuleProperties;
+import java.io.IOException;
+
+/**
+ * A firewall rule.
+ */
+@Fluent
+public final class FirewallRuleInner extends ProxyResource {
+ /*
+ * A Firewall rule properties.
+ */
+ private FirewallRuleProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of FirewallRuleInner class.
+ */
+ public FirewallRuleInner() {
+ }
+
+ /**
+ * Get the properties property: A Firewall rule properties.
+ *
+ * @return the properties value.
+ */
+ public FirewallRuleProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A Firewall rule properties.
+ *
+ * @param properties the properties value to set.
+ * @return the FirewallRuleInner object itself.
+ */
+ public FirewallRuleInner withProperties(FirewallRuleProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FirewallRuleInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FirewallRuleInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the FirewallRuleInner.
+ */
+ public static FirewallRuleInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FirewallRuleInner deserializedFirewallRuleInner = new FirewallRuleInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedFirewallRuleInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedFirewallRuleInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedFirewallRuleInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedFirewallRuleInner.properties = FirewallRuleProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedFirewallRuleInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFirewallRuleInner;
+ });
+ }
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/FleetDatabaseInner.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/FleetDatabaseInner.java
new file mode 100644
index 000000000000..2f2194a96521
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/FleetDatabaseInner.java
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.databasefleetmanager.models.FleetDatabaseProperties;
+import java.io.IOException;
+
+/**
+ * A fleet database.
+ */
+@Fluent
+public final class FleetDatabaseInner extends ProxyResource {
+ /*
+ * Fleet database properties.
+ */
+ private FleetDatabaseProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of FleetDatabaseInner class.
+ */
+ public FleetDatabaseInner() {
+ }
+
+ /**
+ * Get the properties property: Fleet database properties.
+ *
+ * @return the properties value.
+ */
+ public FleetDatabaseProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Fleet database properties.
+ *
+ * @param properties the properties value to set.
+ * @return the FleetDatabaseInner object itself.
+ */
+ public FleetDatabaseInner withProperties(FleetDatabaseProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FleetDatabaseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FleetDatabaseInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the FleetDatabaseInner.
+ */
+ public static FleetDatabaseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FleetDatabaseInner deserializedFleetDatabaseInner = new FleetDatabaseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedFleetDatabaseInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedFleetDatabaseInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedFleetDatabaseInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedFleetDatabaseInner.properties = FleetDatabaseProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedFleetDatabaseInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFleetDatabaseInner;
+ });
+ }
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/FleetInner.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/FleetInner.java
new file mode 100644
index 000000000000..1793ee658774
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/FleetInner.java
@@ -0,0 +1,192 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.databasefleetmanager.models.FleetProperties;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * A Database Fleet.
+ */
+@Fluent
+public final class FleetInner extends Resource {
+ /*
+ * The fleet properties.
+ */
+ private FleetProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of FleetInner class.
+ */
+ public FleetInner() {
+ }
+
+ /**
+ * Get the properties property: The fleet properties.
+ *
+ * @return the properties value.
+ */
+ public FleetProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The fleet properties.
+ *
+ * @param properties the properties value to set.
+ * @return the FleetInner object itself.
+ */
+ public FleetInner withProperties(FleetProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public FleetInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public FleetInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FleetInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FleetInner if the JsonReader was pointing to an instance of it, or null if it was pointing
+ * to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the FleetInner.
+ */
+ public static FleetInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FleetInner deserializedFleetInner = new FleetInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedFleetInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedFleetInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedFleetInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedFleetInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedFleetInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedFleetInner.properties = FleetProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedFleetInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFleetInner;
+ });
+ }
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/FleetTierInner.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/FleetTierInner.java
new file mode 100644
index 000000000000..d74675c2a8f3
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/FleetTierInner.java
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.databasefleetmanager.models.FleetTierProperties;
+import java.io.IOException;
+
+/**
+ * A SQL Database Fleet tier.
+ */
+@Fluent
+public final class FleetTierInner extends ProxyResource {
+ /*
+ * A Fleet tier properties.
+ */
+ private FleetTierProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of FleetTierInner class.
+ */
+ public FleetTierInner() {
+ }
+
+ /**
+ * Get the properties property: A Fleet tier properties.
+ *
+ * @return the properties value.
+ */
+ public FleetTierProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A Fleet tier properties.
+ *
+ * @param properties the properties value to set.
+ * @return the FleetTierInner object itself.
+ */
+ public FleetTierInner withProperties(FleetTierProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FleetTierInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FleetTierInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the FleetTierInner.
+ */
+ public static FleetTierInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FleetTierInner deserializedFleetTierInner = new FleetTierInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedFleetTierInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedFleetTierInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedFleetTierInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedFleetTierInner.properties = FleetTierProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedFleetTierInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFleetTierInner;
+ });
+ }
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/FleetspaceInner.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/FleetspaceInner.java
new file mode 100644
index 000000000000..f72e3a3c69c2
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/FleetspaceInner.java
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.databasefleetmanager.models.FleetspaceProperties;
+import java.io.IOException;
+
+/**
+ * A fleetspace.
+ */
+@Fluent
+public final class FleetspaceInner extends ProxyResource {
+ /*
+ * A Fleetspace properties.
+ */
+ private FleetspaceProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of FleetspaceInner class.
+ */
+ public FleetspaceInner() {
+ }
+
+ /**
+ * Get the properties property: A Fleetspace properties.
+ *
+ * @return the properties value.
+ */
+ public FleetspaceProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: A Fleetspace properties.
+ *
+ * @param properties the properties value to set.
+ * @return the FleetspaceInner object itself.
+ */
+ public FleetspaceInner withProperties(FleetspaceProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FleetspaceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FleetspaceInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the FleetspaceInner.
+ */
+ public static FleetspaceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FleetspaceInner deserializedFleetspaceInner = new FleetspaceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedFleetspaceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedFleetspaceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedFleetspaceInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedFleetspaceInner.properties = FleetspaceProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedFleetspaceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFleetspaceInner;
+ });
+ }
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/OperationInner.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..97550c82e7e7
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/OperationInner.java
@@ -0,0 +1,159 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.databasefleetmanager.models.ActionType;
+import com.azure.resourcemanager.databasefleetmanager.models.OperationDisplay;
+import com.azure.resourcemanager.databasefleetmanager.models.Origin;
+import java.io.IOException;
+
+/**
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
+@Immutable
+public final class OperationInner implements JsonSerializable {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
+ * Resource Manager/control-plane operations.
+ */
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
+ */
+ private Origin origin;
+
+ /*
+ * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ private ActionType actionType;
+
+ /**
+ * Creates an instance of OperationInner class.
+ */
+ private OperationInner() {
+ }
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for Azure Resource Manager/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are
+ * for internal only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("display", this.display);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationInner.
+ */
+ public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationInner deserializedOperationInner = new OperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedOperationInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else if ("display".equals(fieldName)) {
+ deserializedOperationInner.display = OperationDisplay.fromJson(reader);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperationInner.origin = Origin.fromString(reader.getString());
+ } else if ("actionType".equals(fieldName)) {
+ deserializedOperationInner.actionType = ActionType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationInner;
+ });
+ }
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/package-info.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/package-info.java
new file mode 100644
index 000000000000..3c19252a0acf
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the inner data models for Databasefleetmanager.
+ * Database Fleet Client.
+ */
+package com.azure.resourcemanager.databasefleetmanager.fluent.models;
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/package-info.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/package-info.java
new file mode 100644
index 000000000000..06a7ca1c8894
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the service clients for Databasefleetmanager.
+ * Database Fleet Client.
+ */
+package com.azure.resourcemanager.databasefleetmanager.fluent;
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/DatabaseFleetManagerClientBuilder.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/DatabaseFleetManagerClientBuilder.java
new file mode 100644
index 000000000000..ceefe039061e
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/DatabaseFleetManagerClientBuilder.java
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.implementation;
+
+import com.azure.core.annotation.ServiceClientBuilder;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerAdapter;
+import java.time.Duration;
+
+/**
+ * A builder for creating a new instance of the DatabaseFleetManagerClientImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { DatabaseFleetManagerClientImpl.class })
+public final class DatabaseFleetManagerClientBuilder {
+ /*
+ * Service host
+ */
+ private String endpoint;
+
+ /**
+ * Sets Service host.
+ *
+ * @param endpoint the endpoint value.
+ * @return the DatabaseFleetManagerClientBuilder.
+ */
+ public DatabaseFleetManagerClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription. The value must be an UUID.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the DatabaseFleetManagerClientBuilder.
+ */
+ public DatabaseFleetManagerClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the DatabaseFleetManagerClientBuilder.
+ */
+ public DatabaseFleetManagerClientBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the DatabaseFleetManagerClientBuilder.
+ */
+ public DatabaseFleetManagerClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The default poll interval for long-running operation
+ */
+ private Duration defaultPollInterval;
+
+ /**
+ * Sets The default poll interval for long-running operation.
+ *
+ * @param defaultPollInterval the defaultPollInterval value.
+ * @return the DatabaseFleetManagerClientBuilder.
+ */
+ public DatabaseFleetManagerClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ return this;
+ }
+
+ /*
+ * The serializer to serialize an object into a string
+ */
+ private SerializerAdapter serializerAdapter;
+
+ /**
+ * Sets The serializer to serialize an object into a string.
+ *
+ * @param serializerAdapter the serializerAdapter value.
+ * @return the DatabaseFleetManagerClientBuilder.
+ */
+ public DatabaseFleetManagerClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of DatabaseFleetManagerClientImpl with the provided parameters.
+ *
+ * @return an instance of DatabaseFleetManagerClientImpl.
+ */
+ public DatabaseFleetManagerClientImpl buildClient() {
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline = (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval
+ = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
+ DatabaseFleetManagerClientImpl client = new DatabaseFleetManagerClientImpl(localPipeline,
+ localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
+ return client;
+ }
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/DatabaseFleetManagerClientImpl.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/DatabaseFleetManagerClientImpl.java
new file mode 100644
index 000000000000..ae28d8c9e32d
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/DatabaseFleetManagerClientImpl.java
@@ -0,0 +1,368 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaderName;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.databasefleetmanager.fluent.DatabaseFleetManagerClient;
+import com.azure.resourcemanager.databasefleetmanager.fluent.FirewallRulesClient;
+import com.azure.resourcemanager.databasefleetmanager.fluent.FleetDatabasesClient;
+import com.azure.resourcemanager.databasefleetmanager.fluent.FleetTiersClient;
+import com.azure.resourcemanager.databasefleetmanager.fluent.FleetsClient;
+import com.azure.resourcemanager.databasefleetmanager.fluent.FleetspacesClient;
+import com.azure.resourcemanager.databasefleetmanager.fluent.OperationsClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * Initializes a new instance of the DatabaseFleetManagerClientImpl type.
+ */
+@ServiceClient(builder = DatabaseFleetManagerClientBuilder.class)
+public final class DatabaseFleetManagerClientImpl implements DatabaseFleetManagerClient {
+ /**
+ * Service host.
+ */
+ private final String endpoint;
+
+ /**
+ * Gets Service host.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /**
+ * Version parameter.
+ */
+ private final String apiVersion;
+
+ /**
+ * Gets Version parameter.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * The HTTP pipeline to send requests through.
+ */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /**
+ * The serializer to serialize an object into a string.
+ */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /**
+ * The default poll interval for long-running operation.
+ */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /**
+ * The OperationsClient object to access its operations.
+ */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /**
+ * The FleetDatabasesClient object to access its operations.
+ */
+ private final FleetDatabasesClient fleetDatabases;
+
+ /**
+ * Gets the FleetDatabasesClient object to access its operations.
+ *
+ * @return the FleetDatabasesClient object.
+ */
+ public FleetDatabasesClient getFleetDatabases() {
+ return this.fleetDatabases;
+ }
+
+ /**
+ * The FleetspacesClient object to access its operations.
+ */
+ private final FleetspacesClient fleetspaces;
+
+ /**
+ * Gets the FleetspacesClient object to access its operations.
+ *
+ * @return the FleetspacesClient object.
+ */
+ public FleetspacesClient getFleetspaces() {
+ return this.fleetspaces;
+ }
+
+ /**
+ * The FleetsClient object to access its operations.
+ */
+ private final FleetsClient fleets;
+
+ /**
+ * Gets the FleetsClient object to access its operations.
+ *
+ * @return the FleetsClient object.
+ */
+ public FleetsClient getFleets() {
+ return this.fleets;
+ }
+
+ /**
+ * The FirewallRulesClient object to access its operations.
+ */
+ private final FirewallRulesClient firewallRules;
+
+ /**
+ * Gets the FirewallRulesClient object to access its operations.
+ *
+ * @return the FirewallRulesClient object.
+ */
+ public FirewallRulesClient getFirewallRules() {
+ return this.firewallRules;
+ }
+
+ /**
+ * The FleetTiersClient object to access its operations.
+ */
+ private final FleetTiersClient fleetTiers;
+
+ /**
+ * Gets the FleetTiersClient object to access its operations.
+ *
+ * @return the FleetTiersClient object.
+ */
+ public FleetTiersClient getFleetTiers() {
+ return this.fleetTiers;
+ }
+
+ /**
+ * Initializes an instance of DatabaseFleetManagerClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param endpoint Service host.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
+ */
+ DatabaseFleetManagerClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.endpoint = endpoint;
+ this.subscriptionId = subscriptionId;
+ this.apiVersion = "2025-02-01-preview";
+ this.operations = new OperationsClientImpl(this);
+ this.fleetDatabases = new FleetDatabasesClientImpl(this);
+ this.fleetspaces = new FleetspacesClientImpl(this);
+ this.fleets = new FleetsClientImpl(this);
+ this.firewallRules = new FirewallRulesClientImpl(this);
+ this.fleetTiers = new FleetTiersClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ return CoreUtils.mergeContexts(this.getContext(), context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param httpPipeline the http pipeline.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return poller flux for poll result and final result.
+ */
+ public PollerFlux, U> getLroResult(Mono>> activationResponse,
+ HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) {
+ return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, activationResponse, context);
+ }
+
+ /**
+ * Gets the final result, or an error, based on last async poll response.
+ *
+ * @param response the last async poll response.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result, or an error.
+ */
+ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
+ if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ String errorMessage;
+ ManagementError managementError = null;
+ HttpResponse errorResponse = null;
+ PollResult.Error lroError = response.getValue().getError();
+ if (lroError != null) {
+ errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(),
+ lroError.getResponseBody());
+
+ errorMessage = response.getValue().getError().getMessage();
+ String errorBody = response.getValue().getError().getResponseBody();
+ if (errorBody != null) {
+ // try to deserialize error body to ManagementError
+ try {
+ managementError = this.getSerializerAdapter()
+ .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
+ if (managementError.getCode() == null || managementError.getMessage() == null) {
+ managementError = null;
+ }
+ } catch (IOException | RuntimeException ioe) {
+ LOGGER.logThrowableAsWarning(ioe);
+ }
+ }
+ } else {
+ // fallback to default error message
+ errorMessage = "Long running operation failed.";
+ }
+ if (managementError == null) {
+ // fallback to default ManagementError
+ managementError = new ManagementError(response.getStatus().toString(), errorMessage);
+ }
+ return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
+ } else {
+ return response.getFinalResult();
+ }
+ }
+
+ private static final class HttpResponseImpl extends HttpResponse {
+ private final int statusCode;
+
+ private final byte[] responseBody;
+
+ private final HttpHeaders httpHeaders;
+
+ HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) {
+ super(null);
+ this.statusCode = statusCode;
+ this.httpHeaders = httpHeaders;
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public String getHeaderValue(String s) {
+ return httpHeaders.getValue(HttpHeaderName.fromString(s));
+ }
+
+ public HttpHeaders getHeaders() {
+ return httpHeaders;
+ }
+
+ public Flux getBody() {
+ return Flux.just(ByteBuffer.wrap(responseBody));
+ }
+
+ public Mono getBodyAsByteArray() {
+ return Mono.just(responseBody);
+ }
+
+ public Mono getBodyAsString() {
+ return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
+ }
+
+ public Mono getBodyAsString(Charset charset) {
+ return Mono.just(new String(responseBody, charset));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(DatabaseFleetManagerClientImpl.class);
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FirewallRuleImpl.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FirewallRuleImpl.java
new file mode 100644
index 000000000000..aa6a971f5b77
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FirewallRuleImpl.java
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.databasefleetmanager.fluent.models.FirewallRuleInner;
+import com.azure.resourcemanager.databasefleetmanager.models.FirewallRule;
+import com.azure.resourcemanager.databasefleetmanager.models.FirewallRuleProperties;
+
+public final class FirewallRuleImpl implements FirewallRule, FirewallRule.Definition, FirewallRule.Update {
+ private FirewallRuleInner innerObject;
+
+ private final com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public FirewallRuleProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public FirewallRuleInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String fleetName;
+
+ private String fleetspaceName;
+
+ private String firewallRuleName;
+
+ public FirewallRuleImpl withExistingFleetspace(String resourceGroupName, String fleetName, String fleetspaceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.fleetName = fleetName;
+ this.fleetspaceName = fleetspaceName;
+ return this;
+ }
+
+ public FirewallRule create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getFirewallRules()
+ .createOrUpdate(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, this.innerModel(),
+ Context.NONE);
+ return this;
+ }
+
+ public FirewallRule create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getFirewallRules()
+ .createOrUpdate(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, this.innerModel(), context);
+ return this;
+ }
+
+ FirewallRuleImpl(String name,
+ com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager 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, fleetName, fleetspaceName, firewallRuleName, this.innerModel(),
+ Context.NONE);
+ return this;
+ }
+
+ public FirewallRule apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getFirewallRules()
+ .createOrUpdate(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, this.innerModel(), context);
+ return this;
+ }
+
+ FirewallRuleImpl(FirewallRuleInner innerObject,
+ com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.fleetName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "fleets");
+ this.fleetspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "fleetspaces");
+ this.firewallRuleName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "firewallRules");
+ }
+
+ public FirewallRule refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getFirewallRules()
+ .getWithResponse(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public FirewallRule refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getFirewallRules()
+ .getWithResponse(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, context)
+ .getValue();
+ return this;
+ }
+
+ public FirewallRuleImpl withProperties(FirewallRuleProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FirewallRulesClientImpl.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FirewallRulesClientImpl.java
new file mode 100644
index 000000000000..01bcd6248e1f
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FirewallRulesClientImpl.java
@@ -0,0 +1,1042 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.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.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.databasefleetmanager.fluent.FirewallRulesClient;
+import com.azure.resourcemanager.databasefleetmanager.fluent.models.FirewallRuleInner;
+import com.azure.resourcemanager.databasefleetmanager.implementation.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 {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final FirewallRulesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DatabaseFleetManagerClientImpl client;
+
+ /**
+ * Initializes an instance of FirewallRulesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ FirewallRulesClientImpl(DatabaseFleetManagerClientImpl client) {
+ this.service
+ = RestProxy.create(FirewallRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DatabaseFleetManagerClientFirewallRules to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DatabaseFleetManager")
+ public interface FirewallRulesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @PathParam("fleetspaceName") String fleetspaceName, @PathParam("firewallRuleName") String firewallRuleName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @PathParam("fleetspaceName") String fleetspaceName, @PathParam("firewallRuleName") String firewallRuleName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") FirewallRuleInner resource, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @PathParam("fleetspaceName") String fleetspaceName, @PathParam("firewallRuleName") String firewallRuleName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByFleetspace(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @PathParam("fleetspaceName") String fleetspaceName, @QueryParam("$skip") Long skip,
+ @QueryParam("$top") Long top, @QueryParam("$skiptoken") String skiptoken,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByFleetspaceNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Gets a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 firewall rule along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String firewallRuleName) {
+ 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (firewallRuleName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, fleetspaceName, firewallRuleName, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @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 firewall rule along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String firewallRuleName, 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (firewallRuleName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, fleetName, fleetspaceName, firewallRuleName, accept, context);
+ }
+
+ /**
+ * Gets a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 firewall rule on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String fleetName, String fleetspaceName,
+ String firewallRuleName) {
+ return getWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @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 firewall rule along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String fleetName,
+ String fleetspaceName, String firewallRuleName, Context context) {
+ return getWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, context).block();
+ }
+
+ /**
+ * Gets a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FirewallRuleInner get(String resourceGroupName, String fleetName, String fleetspaceName,
+ String firewallRuleName) {
+ return getWithResponse(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, Context.NONE).getValue();
+ }
+
+ /**
+ * Creates or updates a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param resource The firewall rule object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a firewall rule along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String firewallRuleName, FirewallRuleInner resource) {
+ 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (firewallRuleName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, fleetspaceName, firewallRuleName,
+ contentType, accept, resource, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or updates a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param resource The firewall rule object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a firewall rule along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String firewallRuleName, FirewallRuleInner resource, 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (firewallRuleName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, fleetspaceName, firewallRuleName,
+ contentType, accept, resource, context);
+ }
+
+ /**
+ * Creates or updates a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param resource The firewall rule object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FirewallRuleInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String fleetName, String fleetspaceName, String firewallRuleName,
+ FirewallRuleInner resource) {
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, resource);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ FirewallRuleInner.class, FirewallRuleInner.class, this.client.getContext());
+ }
+
+ /**
+ * Creates or updates a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param resource The firewall rule object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FirewallRuleInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String fleetName, String fleetspaceName, String firewallRuleName,
+ FirewallRuleInner resource, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, fleetName,
+ fleetspaceName, firewallRuleName, resource, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ FirewallRuleInner.class, FirewallRuleInner.class, context);
+ }
+
+ /**
+ * Creates or updates a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param resource The firewall rule object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName,
+ String fleetName, String fleetspaceName, String firewallRuleName, FirewallRuleInner resource) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, resource)
+ .getSyncPoller();
+ }
+
+ /**
+ * Creates or updates a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param resource The firewall rule object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName,
+ String fleetName, String fleetspaceName, String firewallRuleName, FirewallRuleInner resource, Context context) {
+ return this
+ .beginCreateOrUpdateAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, resource, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Creates or updates a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param resource The firewall rule object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a firewall rule on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String firewallRuleName, FirewallRuleInner resource) {
+ return beginCreateOrUpdateAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or updates a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param resource The firewall rule object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a firewall rule on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String firewallRuleName, FirewallRuleInner resource, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, resource,
+ context).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or updates a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param resource The firewall rule object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FirewallRuleInner createOrUpdate(String resourceGroupName, String fleetName, String fleetspaceName,
+ String firewallRuleName, FirewallRuleInner resource) {
+ return createOrUpdateAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, resource).block();
+ }
+
+ /**
+ * Creates or updates a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param resource The firewall rule object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FirewallRuleInner createOrUpdate(String resourceGroupName, String fleetName, String fleetspaceName,
+ String firewallRuleName, FirewallRuleInner resource, Context context) {
+ return createOrUpdateAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, resource, context)
+ .block();
+ }
+
+ /**
+ * Deletes a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String firewallRuleName) {
+ 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (firewallRuleName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, fleetspaceName, firewallRuleName, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String firewallRuleName, 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (firewallRuleName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, fleetName, fleetspaceName, firewallRuleName, accept, context);
+ }
+
+ /**
+ * Deletes a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String firewallRuleName) {
+ Mono>> mono
+ = deleteWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Deletes a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String firewallRuleName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = deleteWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Deletes a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName,
+ String fleetspaceName, String firewallRuleName) {
+ return this.beginDeleteAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName).getSyncPoller();
+ }
+
+ /**
+ * Deletes a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName,
+ String fleetspaceName, String firewallRuleName, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Deletes a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String fleetName, String fleetspaceName,
+ String firewallRuleName) {
+ return beginDeleteAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String fleetName, String fleetspaceName,
+ String firewallRuleName, Context context) {
+ return beginDeleteAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 fleetName, String fleetspaceName, String firewallRuleName) {
+ deleteAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName).block();
+ }
+
+ /**
+ * Deletes a firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param firewallRuleName Name of the firewall rule.
+ * @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 fleetName, String fleetspaceName, String firewallRuleName,
+ Context context) {
+ deleteAsync(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, context).block();
+ }
+
+ /**
+ * Gets all firewall rules in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the collection.
+ * @param skiptoken An opaque token that identifies a starting point in the collection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 firewall rules in a fleetspace along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetspaceSinglePageAsync(String resourceGroupName,
+ String fleetName, String fleetspaceName, Long skip, Long top, String skiptoken) {
+ 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByFleetspace(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, fleetspaceName, skip, top, skiptoken,
+ accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets all firewall rules in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the collection.
+ * @param skiptoken An opaque token that identifies a starting point in the collection.
+ * @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 all firewall rules in a fleetspace along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetspaceSinglePageAsync(String resourceGroupName,
+ String fleetName, String fleetspaceName, Long skip, Long top, String skiptoken, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByFleetspace(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, fleetName, fleetspaceName, skip, top, skiptoken, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Gets all firewall rules in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the collection.
+ * @param skiptoken An opaque token that identifies a starting point in the collection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 firewall rules in a fleetspace as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByFleetspaceAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, Long skip, Long top, String skiptoken) {
+ return new PagedFlux<>(
+ () -> listByFleetspaceSinglePageAsync(resourceGroupName, fleetName, fleetspaceName, skip, top, skiptoken),
+ nextLink -> listByFleetspaceNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets all firewall rules in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 firewall rules in a fleetspace as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByFleetspaceAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName) {
+ final Long skip = null;
+ final Long top = null;
+ final String skiptoken = null;
+ return new PagedFlux<>(
+ () -> listByFleetspaceSinglePageAsync(resourceGroupName, fleetName, fleetspaceName, skip, top, skiptoken),
+ nextLink -> listByFleetspaceNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets all firewall rules in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the collection.
+ * @param skiptoken An opaque token that identifies a starting point in the collection.
+ * @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 all firewall rules in a fleetspace as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByFleetspaceAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, Long skip, Long top, String skiptoken, Context context) {
+ return new PagedFlux<>(() -> listByFleetspaceSinglePageAsync(resourceGroupName, fleetName, fleetspaceName, skip,
+ top, skiptoken, context), nextLink -> listByFleetspaceNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets all firewall rules in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 firewall rules in a fleetspace as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByFleetspace(String resourceGroupName, String fleetName,
+ String fleetspaceName) {
+ final Long skip = null;
+ final Long top = null;
+ final String skiptoken = null;
+ return new PagedIterable<>(
+ listByFleetspaceAsync(resourceGroupName, fleetName, fleetspaceName, skip, top, skiptoken));
+ }
+
+ /**
+ * Gets all firewall rules in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the collection.
+ * @param skiptoken An opaque token that identifies a starting point in the collection.
+ * @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 all firewall rules in a fleetspace as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByFleetspace(String resourceGroupName, String fleetName,
+ String fleetspaceName, Long skip, Long top, String skiptoken, Context context) {
+ return new PagedIterable<>(
+ listByFleetspaceAsync(resourceGroupName, fleetName, fleetspaceName, skip, top, skiptoken, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FirewallRule list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetspaceNextSinglePageAsync(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.listByFleetspaceNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FirewallRule list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetspaceNextSinglePageAsync(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.listByFleetspaceNext(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/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FirewallRulesImpl.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FirewallRulesImpl.java
new file mode 100644
index 000000000000..5db95356f9b4
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FirewallRulesImpl.java
@@ -0,0 +1,184 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.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.databasefleetmanager.fluent.FirewallRulesClient;
+import com.azure.resourcemanager.databasefleetmanager.fluent.models.FirewallRuleInner;
+import com.azure.resourcemanager.databasefleetmanager.models.FirewallRule;
+import com.azure.resourcemanager.databasefleetmanager.models.FirewallRules;
+
+public final class FirewallRulesImpl implements FirewallRules {
+ private static final ClientLogger LOGGER = new ClientLogger(FirewallRulesImpl.class);
+
+ private final FirewallRulesClient innerClient;
+
+ private final com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager serviceManager;
+
+ public FirewallRulesImpl(FirewallRulesClient innerClient,
+ com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String fleetName, String fleetspaceName,
+ String firewallRuleName, Context context) {
+ Response inner = this.serviceClient()
+ .getWithResponse(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new FirewallRuleImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public FirewallRule get(String resourceGroupName, String fleetName, String fleetspaceName,
+ String firewallRuleName) {
+ FirewallRuleInner inner
+ = this.serviceClient().get(resourceGroupName, fleetName, fleetspaceName, firewallRuleName);
+ if (inner != null) {
+ return new FirewallRuleImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String fleetName, String fleetspaceName, String firewallRuleName) {
+ this.serviceClient().delete(resourceGroupName, fleetName, fleetspaceName, firewallRuleName);
+ }
+
+ public void delete(String resourceGroupName, String fleetName, String fleetspaceName, String firewallRuleName,
+ Context context) {
+ this.serviceClient().delete(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, context);
+ }
+
+ public PagedIterable listByFleetspace(String resourceGroupName, String fleetName,
+ String fleetspaceName) {
+ PagedIterable inner
+ = this.serviceClient().listByFleetspace(resourceGroupName, fleetName, fleetspaceName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new FirewallRuleImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByFleetspace(String resourceGroupName, String fleetName,
+ String fleetspaceName, Long skip, Long top, String skiptoken, Context context) {
+ PagedIterable inner = this.serviceClient()
+ .listByFleetspace(resourceGroupName, fleetName, fleetspaceName, skip, top, skiptoken, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new FirewallRuleImpl(inner1, this.manager()));
+ }
+
+ public FirewallRule getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.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 fleetName = ResourceManagerUtils.getValueFromIdByName(id, "fleets");
+ if (fleetName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id)));
+ }
+ String fleetspaceName = ResourceManagerUtils.getValueFromIdByName(id, "fleetspaces");
+ if (fleetspaceName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleetspaces'.", id)));
+ }
+ String firewallRuleName = ResourceManagerUtils.getValueFromIdByName(id, "firewallRules");
+ if (firewallRuleName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, Context.NONE)
+ .getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.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 fleetName = ResourceManagerUtils.getValueFromIdByName(id, "fleets");
+ if (fleetName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id)));
+ }
+ String fleetspaceName = ResourceManagerUtils.getValueFromIdByName(id, "fleetspaces");
+ if (fleetspaceName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleetspaces'.", id)));
+ }
+ String firewallRuleName = ResourceManagerUtils.getValueFromIdByName(id, "firewallRules");
+ if (firewallRuleName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = ResourceManagerUtils.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 fleetName = ResourceManagerUtils.getValueFromIdByName(id, "fleets");
+ if (fleetName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id)));
+ }
+ String fleetspaceName = ResourceManagerUtils.getValueFromIdByName(id, "fleetspaces");
+ if (fleetspaceName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleetspaces'.", id)));
+ }
+ String firewallRuleName = ResourceManagerUtils.getValueFromIdByName(id, "firewallRules");
+ if (firewallRuleName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id)));
+ }
+ this.delete(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.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 fleetName = ResourceManagerUtils.getValueFromIdByName(id, "fleets");
+ if (fleetName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id)));
+ }
+ String fleetspaceName = ResourceManagerUtils.getValueFromIdByName(id, "fleetspaces");
+ if (fleetspaceName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleetspaces'.", id)));
+ }
+ String firewallRuleName = ResourceManagerUtils.getValueFromIdByName(id, "firewallRules");
+ if (firewallRuleName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id)));
+ }
+ this.delete(resourceGroupName, fleetName, fleetspaceName, firewallRuleName, context);
+ }
+
+ private FirewallRulesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager manager() {
+ return this.serviceManager;
+ }
+
+ public FirewallRuleImpl define(String name) {
+ return new FirewallRuleImpl(name, this.manager());
+ }
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetDatabaseImpl.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetDatabaseImpl.java
new file mode 100644
index 000000000000..de7e38855939
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetDatabaseImpl.java
@@ -0,0 +1,163 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.databasefleetmanager.fluent.models.FleetDatabaseInner;
+import com.azure.resourcemanager.databasefleetmanager.models.DatabaseChangeTierProperties;
+import com.azure.resourcemanager.databasefleetmanager.models.DatabaseRenameProperties;
+import com.azure.resourcemanager.databasefleetmanager.models.FleetDatabase;
+import com.azure.resourcemanager.databasefleetmanager.models.FleetDatabaseProperties;
+
+public final class FleetDatabaseImpl implements FleetDatabase, FleetDatabase.Definition, FleetDatabase.Update {
+ private FleetDatabaseInner innerObject;
+
+ private final com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public FleetDatabaseProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public FleetDatabaseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String fleetName;
+
+ private String fleetspaceName;
+
+ private String databaseName;
+
+ public FleetDatabaseImpl withExistingFleetspace(String resourceGroupName, String fleetName, String fleetspaceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.fleetName = fleetName;
+ this.fleetspaceName = fleetspaceName;
+ return this;
+ }
+
+ public FleetDatabase create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleetDatabases()
+ .createOrUpdate(resourceGroupName, fleetName, fleetspaceName, databaseName, this.innerModel(),
+ Context.NONE);
+ return this;
+ }
+
+ public FleetDatabase create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleetDatabases()
+ .createOrUpdate(resourceGroupName, fleetName, fleetspaceName, databaseName, this.innerModel(), context);
+ return this;
+ }
+
+ FleetDatabaseImpl(String name,
+ com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager serviceManager) {
+ this.innerObject = new FleetDatabaseInner();
+ this.serviceManager = serviceManager;
+ this.databaseName = name;
+ }
+
+ public FleetDatabaseImpl update() {
+ return this;
+ }
+
+ public FleetDatabase apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleetDatabases()
+ .update(resourceGroupName, fleetName, fleetspaceName, databaseName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public FleetDatabase apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleetDatabases()
+ .update(resourceGroupName, fleetName, fleetspaceName, databaseName, this.innerModel(), context);
+ return this;
+ }
+
+ FleetDatabaseImpl(FleetDatabaseInner innerObject,
+ com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.fleetName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "fleets");
+ this.fleetspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "fleetspaces");
+ this.databaseName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "databases");
+ }
+
+ public FleetDatabase refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleetDatabases()
+ .getWithResponse(resourceGroupName, fleetName, fleetspaceName, databaseName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public FleetDatabase refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleetDatabases()
+ .getWithResponse(resourceGroupName, fleetName, fleetspaceName, databaseName, context)
+ .getValue();
+ return this;
+ }
+
+ public void changeTier(DatabaseChangeTierProperties body) {
+ serviceManager.fleetDatabases().changeTier(resourceGroupName, fleetName, fleetspaceName, databaseName, body);
+ }
+
+ public void changeTier(DatabaseChangeTierProperties body, Context context) {
+ serviceManager.fleetDatabases()
+ .changeTier(resourceGroupName, fleetName, fleetspaceName, databaseName, body, context);
+ }
+
+ public void rename(DatabaseRenameProperties body) {
+ serviceManager.fleetDatabases().rename(resourceGroupName, fleetName, fleetspaceName, databaseName, body);
+ }
+
+ public void rename(DatabaseRenameProperties body, Context context) {
+ serviceManager.fleetDatabases()
+ .rename(resourceGroupName, fleetName, fleetspaceName, databaseName, body, context);
+ }
+
+ public void revert() {
+ serviceManager.fleetDatabases().revert(resourceGroupName, fleetName, fleetspaceName, databaseName);
+ }
+
+ public void revert(Context context) {
+ serviceManager.fleetDatabases().revert(resourceGroupName, fleetName, fleetspaceName, databaseName, context);
+ }
+
+ public FleetDatabaseImpl withProperties(FleetDatabaseProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetDatabasesClientImpl.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetDatabasesClientImpl.java
new file mode 100644
index 000000000000..40628c0af488
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetDatabasesClientImpl.java
@@ -0,0 +1,2129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.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.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+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.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.databasefleetmanager.fluent.FleetDatabasesClient;
+import com.azure.resourcemanager.databasefleetmanager.fluent.models.FleetDatabaseInner;
+import com.azure.resourcemanager.databasefleetmanager.implementation.models.FleetDatabaseListResult;
+import com.azure.resourcemanager.databasefleetmanager.models.DatabaseChangeTierProperties;
+import com.azure.resourcemanager.databasefleetmanager.models.DatabaseRenameProperties;
+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 FleetDatabasesClient.
+ */
+public final class FleetDatabasesClientImpl implements FleetDatabasesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final FleetDatabasesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DatabaseFleetManagerClientImpl client;
+
+ /**
+ * Initializes an instance of FleetDatabasesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ FleetDatabasesClientImpl(DatabaseFleetManagerClientImpl client) {
+ this.service
+ = RestProxy.create(FleetDatabasesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DatabaseFleetManagerClientFleetDatabases to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DatabaseFleetManager")
+ public interface FleetDatabasesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @PathParam("fleetspaceName") String fleetspaceName, @PathParam("databaseName") String databaseName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @PathParam("fleetspaceName") String fleetspaceName, @PathParam("databaseName") String databaseName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") FleetDatabaseInner resource, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @PathParam("fleetspaceName") String fleetspaceName, @PathParam("databaseName") String databaseName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") FleetDatabaseInner properties, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @PathParam("fleetspaceName") String fleetspaceName, @PathParam("databaseName") String databaseName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByFleetspace(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @PathParam("fleetspaceName") String fleetspaceName, @QueryParam("$skip") Long skip,
+ @QueryParam("$top") Long top, @QueryParam("$filter") String filter,
+ @QueryParam("$skiptoken") String skiptoken, @HeaderParam("Accept") String accept, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName}/changeTier")
+ @ExpectedResponses({ 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> changeTier(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @PathParam("fleetspaceName") String fleetspaceName, @PathParam("databaseName") String databaseName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") DatabaseChangeTierProperties body, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName}/rename")
+ @ExpectedResponses({ 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> rename(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @PathParam("fleetspaceName") String fleetspaceName, @PathParam("databaseName") String databaseName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") DatabaseRenameProperties body, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName}/revert")
+ @ExpectedResponses({ 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> revert(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @PathParam("fleetspaceName") String fleetspaceName, @PathParam("databaseName") String databaseName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByFleetspaceNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Gets a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 a fleet database along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, fleetspaceName, databaseName, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 a fleet database along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, fleetName, fleetspaceName, databaseName, accept, context);
+ }
+
+ /**
+ * Gets a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 a fleet database on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName) {
+ return getWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, databaseName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 a fleet database along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, Context context) {
+ return getWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, context).block();
+ }
+
+ /**
+ * Gets a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetDatabaseInner get(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName) {
+ return getWithResponse(resourceGroupName, fleetName, fleetspaceName, databaseName, Context.NONE).getValue();
+ }
+
+ /**
+ * Creates or updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param resource The database object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a fleet database along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, FleetDatabaseInner resource) {
+ 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, fleetspaceName, databaseName,
+ contentType, accept, resource, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param resource The database object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a fleet database along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, FleetDatabaseInner resource, 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, fleetspaceName, databaseName, contentType,
+ accept, resource, context);
+ }
+
+ /**
+ * Creates or updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param resource The database object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetDatabaseInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ FleetDatabaseInner resource) {
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, resource);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ FleetDatabaseInner.class, FleetDatabaseInner.class, this.client.getContext());
+ }
+
+ /**
+ * Creates or updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param resource The database object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetDatabaseInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ FleetDatabaseInner resource, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, fleetName,
+ fleetspaceName, databaseName, resource, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ FleetDatabaseInner.class, FleetDatabaseInner.class, context);
+ }
+
+ /**
+ * Creates or updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param resource The database object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetDatabaseInner> beginCreateOrUpdate(String resourceGroupName,
+ String fleetName, String fleetspaceName, String databaseName, FleetDatabaseInner resource) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, resource)
+ .getSyncPoller();
+ }
+
+ /**
+ * Creates or updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param resource The database object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetDatabaseInner> beginCreateOrUpdate(String resourceGroupName,
+ String fleetName, String fleetspaceName, String databaseName, FleetDatabaseInner resource, Context context) {
+ return this
+ .beginCreateOrUpdateAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, resource, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Creates or updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param resource The database object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a fleet database on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, FleetDatabaseInner resource) {
+ return beginCreateOrUpdateAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param resource The database object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a fleet database on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, FleetDatabaseInner resource, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, resource, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param resource The database object to create or update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetDatabaseInner createOrUpdate(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, FleetDatabaseInner resource) {
+ return createOrUpdateAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, resource).block();
+ }
+
+ /**
+ * Creates or updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param resource The database object to create or update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetDatabaseInner createOrUpdate(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, FleetDatabaseInner resource, Context context) {
+ return createOrUpdateAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, resource, context)
+ .block();
+ }
+
+ /**
+ * Updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param properties The database object to patch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 fleet database along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, FleetDatabaseInner properties) {
+ 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, fleetspaceName, databaseName,
+ contentType, accept, properties, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param properties The database object to patch.
+ * @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 fleet database along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, FleetDatabaseInner properties, 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, fleetName, fleetspaceName, databaseName, contentType, accept, properties, context);
+ }
+
+ /**
+ * Updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param properties The database object to patch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetDatabaseInner> beginUpdateAsync(String resourceGroupName,
+ String fleetName, String fleetspaceName, String databaseName, FleetDatabaseInner properties) {
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, properties);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ FleetDatabaseInner.class, FleetDatabaseInner.class, this.client.getContext());
+ }
+
+ /**
+ * Updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param properties The database object to patch.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetDatabaseInner> beginUpdateAsync(String resourceGroupName,
+ String fleetName, String fleetspaceName, String databaseName, FleetDatabaseInner properties, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, properties, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ FleetDatabaseInner.class, FleetDatabaseInner.class, context);
+ }
+
+ /**
+ * Updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param properties The database object to patch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetDatabaseInner> beginUpdate(String resourceGroupName,
+ String fleetName, String fleetspaceName, String databaseName, FleetDatabaseInner properties) {
+ return this.beginUpdateAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, properties)
+ .getSyncPoller();
+ }
+
+ /**
+ * Updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param properties The database object to patch.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetDatabaseInner> beginUpdate(String resourceGroupName,
+ String fleetName, String fleetspaceName, String databaseName, FleetDatabaseInner properties, Context context) {
+ return this.beginUpdateAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, properties, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param properties The database object to patch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 fleet database on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, FleetDatabaseInner properties) {
+ return beginUpdateAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, properties).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param properties The database object to patch.
+ * @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 fleet database on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, FleetDatabaseInner properties, Context context) {
+ return beginUpdateAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, properties, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param properties The database object to patch.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetDatabaseInner update(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, FleetDatabaseInner properties) {
+ return updateAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, properties).block();
+ }
+
+ /**
+ * Updates a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param properties The database object to patch.
+ * @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 fleet database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetDatabaseInner update(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, FleetDatabaseInner properties, Context context) {
+ return updateAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, properties, context).block();
+ }
+
+ /**
+ * Deletes a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, fleetspaceName, databaseName, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, fleetName, fleetspaceName, databaseName, accept, context);
+ }
+
+ /**
+ * Deletes a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName) {
+ Mono>> mono
+ = deleteWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, databaseName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Deletes a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = deleteWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Deletes a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName) {
+ return this.beginDeleteAsync(resourceGroupName, fleetName, fleetspaceName, databaseName).getSyncPoller();
+ }
+
+ /**
+ * Deletes a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Deletes a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName) {
+ return beginDeleteAsync(resourceGroupName, fleetName, fleetspaceName, databaseName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, Context context) {
+ return beginDeleteAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 fleetName, String fleetspaceName, String databaseName) {
+ deleteAsync(resourceGroupName, fleetName, fleetspaceName, databaseName).block();
+ }
+
+ /**
+ * Deletes a fleet database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 fleetName, String fleetspaceName, String databaseName,
+ Context context) {
+ deleteAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, context).block();
+ }
+
+ /**
+ * Gets all fleet databases in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the collection.
+ * @param filter An OData filter expression that filters elements in the collection.
+ * @param skiptoken An opaque token that identifies a starting point in the collection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 fleet databases in a fleetspace along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetspaceSinglePageAsync(String resourceGroupName,
+ String fleetName, String fleetspaceName, Long skip, Long top, String filter, String skiptoken) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByFleetspace(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, fleetspaceName, skip, top, filter,
+ skiptoken, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets all fleet databases in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the collection.
+ * @param filter An OData filter expression that filters elements in the collection.
+ * @param skiptoken An opaque token that identifies a starting point in the collection.
+ * @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 all fleet databases in a fleetspace along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetspaceSinglePageAsync(String resourceGroupName,
+ String fleetName, String fleetspaceName, Long skip, Long top, String filter, String skiptoken,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByFleetspace(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, fleetName, fleetspaceName, skip, top, filter, skiptoken, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Gets all fleet databases in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the collection.
+ * @param filter An OData filter expression that filters elements in the collection.
+ * @param skiptoken An opaque token that identifies a starting point in the collection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 fleet databases in a fleetspace as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByFleetspaceAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, Long skip, Long top, String filter, String skiptoken) {
+ return new PagedFlux<>(() -> listByFleetspaceSinglePageAsync(resourceGroupName, fleetName, fleetspaceName, skip,
+ top, filter, skiptoken), nextLink -> listByFleetspaceNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets all fleet databases in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 fleet databases in a fleetspace as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByFleetspaceAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName) {
+ final Long skip = null;
+ final Long top = null;
+ final String filter = null;
+ final String skiptoken = null;
+ return new PagedFlux<>(() -> listByFleetspaceSinglePageAsync(resourceGroupName, fleetName, fleetspaceName, skip,
+ top, filter, skiptoken), nextLink -> listByFleetspaceNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets all fleet databases in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the collection.
+ * @param filter An OData filter expression that filters elements in the collection.
+ * @param skiptoken An opaque token that identifies a starting point in the collection.
+ * @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 all fleet databases in a fleetspace as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByFleetspaceAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, Long skip, Long top, String filter, String skiptoken, Context context) {
+ return new PagedFlux<>(() -> listByFleetspaceSinglePageAsync(resourceGroupName, fleetName, fleetspaceName, skip,
+ top, filter, skiptoken, context), nextLink -> listByFleetspaceNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets all fleet databases in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 fleet databases in a fleetspace as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByFleetspace(String resourceGroupName, String fleetName,
+ String fleetspaceName) {
+ final Long skip = null;
+ final Long top = null;
+ final String filter = null;
+ final String skiptoken = null;
+ return new PagedIterable<>(
+ listByFleetspaceAsync(resourceGroupName, fleetName, fleetspaceName, skip, top, filter, skiptoken));
+ }
+
+ /**
+ * Gets all fleet databases in a fleetspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param skip The number of elements in the collection to skip.
+ * @param top The number of elements to return from the collection.
+ * @param filter An OData filter expression that filters elements in the collection.
+ * @param skiptoken An opaque token that identifies a starting point in the collection.
+ * @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 all fleet databases in a fleetspace as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByFleetspace(String resourceGroupName, String fleetName,
+ String fleetspaceName, Long skip, Long top, String filter, String skiptoken, Context context) {
+ return new PagedIterable<>(
+ listByFleetspaceAsync(resourceGroupName, fleetName, fleetspaceName, skip, top, filter, skiptoken, context));
+ }
+
+ /**
+ * Moves database to a different tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the change tier operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> changeTierWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, DatabaseChangeTierProperties body) {
+ 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.changeTier(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, fleetspaceName, databaseName,
+ contentType, accept, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Moves database to a different tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the change tier operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> changeTierWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, DatabaseChangeTierProperties body, 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.changeTier(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, fleetspaceName, databaseName, contentType,
+ accept, body, context);
+ }
+
+ /**
+ * Moves database to a different tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the change tier operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginChangeTierAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, DatabaseChangeTierProperties body) {
+ Mono>> mono
+ = changeTierWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, body);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Moves database to a different tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the change tier operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginChangeTierAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, DatabaseChangeTierProperties body, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = changeTierWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, body, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Moves database to a different tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the change tier operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginChangeTier(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, DatabaseChangeTierProperties body) {
+ return this.beginChangeTierAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, body)
+ .getSyncPoller();
+ }
+
+ /**
+ * Moves database to a different tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the change tier operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginChangeTier(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, DatabaseChangeTierProperties body, Context context) {
+ return this.beginChangeTierAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, body, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Moves database to a different tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the change tier operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono changeTierAsync(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, DatabaseChangeTierProperties body) {
+ return beginChangeTierAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, body).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Moves database to a different tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the change tier operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono changeTierAsync(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, DatabaseChangeTierProperties body, Context context) {
+ return beginChangeTierAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, body, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Moves database to a different tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the change tier 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 changeTier(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ DatabaseChangeTierProperties body) {
+ changeTierAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, body).block();
+ }
+
+ /**
+ * Moves database to a different tier.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the change tier operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void changeTier(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ DatabaseChangeTierProperties body, Context context) {
+ changeTierAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, body, context).block();
+ }
+
+ /**
+ * Renames a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the rename operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> renameWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, DatabaseRenameProperties body) {
+ 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.rename(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, fleetspaceName, databaseName,
+ contentType, accept, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Renames a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the rename operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> renameWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, DatabaseRenameProperties body, 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.rename(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, fleetName, fleetspaceName, databaseName, contentType, accept, body, context);
+ }
+
+ /**
+ * Renames a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the rename operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginRenameAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, DatabaseRenameProperties body) {
+ Mono>> mono
+ = renameWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, body);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Renames a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the rename operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginRenameAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, DatabaseRenameProperties body, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = renameWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, body, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Renames a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the rename operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginRename(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, DatabaseRenameProperties body) {
+ return this.beginRenameAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, body).getSyncPoller();
+ }
+
+ /**
+ * Renames a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the rename operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginRename(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, DatabaseRenameProperties body, Context context) {
+ return this.beginRenameAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, body, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Renames a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the rename operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono renameAsync(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, DatabaseRenameProperties body) {
+ return beginRenameAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, body).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Renames a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the rename operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono renameAsync(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, DatabaseRenameProperties body, Context context) {
+ return beginRenameAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, body, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Renames a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the rename 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 rename(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ DatabaseRenameProperties body) {
+ renameAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, body).block();
+ }
+
+ /**
+ * Renames a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName Name of the database.
+ * @param body The details of the rename operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void rename(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ DatabaseRenameProperties body, Context context) {
+ renameAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, body, context).block();
+ }
+
+ /**
+ * Revert a database transparent data encryption (TDE).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> revertWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.revert(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, fleetspaceName, databaseName, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Revert a database transparent data encryption (TDE).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> revertWithResponseAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, 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 (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (fleetspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetspaceName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.revert(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, fleetName, fleetspaceName, databaseName, accept, context);
+ }
+
+ /**
+ * Revert a database transparent data encryption (TDE).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginRevertAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName) {
+ Mono>> mono
+ = revertWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, databaseName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Revert a database transparent data encryption (TDE).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginRevertAsync(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = revertWithResponseAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Revert a database transparent data encryption (TDE).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginRevert(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName) {
+ return this.beginRevertAsync(resourceGroupName, fleetName, fleetspaceName, databaseName).getSyncPoller();
+ }
+
+ /**
+ * Revert a database transparent data encryption (TDE).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginRevert(String resourceGroupName, String fleetName,
+ String fleetspaceName, String databaseName, Context context) {
+ return this.beginRevertAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Revert a database transparent data encryption (TDE).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono revertAsync(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName) {
+ return beginRevertAsync(resourceGroupName, fleetName, fleetspaceName, databaseName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Revert a database transparent data encryption (TDE).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono revertAsync(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, Context context) {
+ return beginRevertAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Revert a database transparent data encryption (TDE).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 revert(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName) {
+ revertAsync(resourceGroupName, fleetName, fleetspaceName, databaseName).block();
+ }
+
+ /**
+ * Revert a database transparent data encryption (TDE).
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName Name of the database fleet.
+ * @param fleetspaceName Name of the fleetspace.
+ * @param databaseName 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 revert(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ Context context) {
+ revertAsync(resourceGroupName, fleetName, fleetspaceName, databaseName, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FleetDatabase list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetspaceNextSinglePageAsync(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.listByFleetspaceNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FleetDatabase list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetspaceNextSinglePageAsync(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.listByFleetspaceNext(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/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetDatabasesImpl.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetDatabasesImpl.java
new file mode 100644
index 000000000000..158cc76da4f5
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetDatabasesImpl.java
@@ -0,0 +1,213 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.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.databasefleetmanager.fluent.FleetDatabasesClient;
+import com.azure.resourcemanager.databasefleetmanager.fluent.models.FleetDatabaseInner;
+import com.azure.resourcemanager.databasefleetmanager.models.DatabaseChangeTierProperties;
+import com.azure.resourcemanager.databasefleetmanager.models.DatabaseRenameProperties;
+import com.azure.resourcemanager.databasefleetmanager.models.FleetDatabase;
+import com.azure.resourcemanager.databasefleetmanager.models.FleetDatabases;
+
+public final class FleetDatabasesImpl implements FleetDatabases {
+ private static final ClientLogger LOGGER = new ClientLogger(FleetDatabasesImpl.class);
+
+ private final FleetDatabasesClient innerClient;
+
+ private final com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager serviceManager;
+
+ public FleetDatabasesImpl(FleetDatabasesClient innerClient,
+ com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String fleetName, String fleetspaceName,
+ String databaseName, Context context) {
+ Response inner
+ = this.serviceClient().getWithResponse(resourceGroupName, fleetName, fleetspaceName, databaseName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new FleetDatabaseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public FleetDatabase get(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName) {
+ FleetDatabaseInner inner = this.serviceClient().get(resourceGroupName, fleetName, fleetspaceName, databaseName);
+ if (inner != null) {
+ return new FleetDatabaseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName) {
+ this.serviceClient().delete(resourceGroupName, fleetName, fleetspaceName, databaseName);
+ }
+
+ public void delete(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ Context context) {
+ this.serviceClient().delete(resourceGroupName, fleetName, fleetspaceName, databaseName, context);
+ }
+
+ public PagedIterable listByFleetspace(String resourceGroupName, String fleetName,
+ String fleetspaceName) {
+ PagedIterable inner
+ = this.serviceClient().listByFleetspace(resourceGroupName, fleetName, fleetspaceName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetDatabaseImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByFleetspace(String resourceGroupName, String fleetName,
+ String fleetspaceName, Long skip, Long top, String filter, String skiptoken, Context context) {
+ PagedIterable inner = this.serviceClient()
+ .listByFleetspace(resourceGroupName, fleetName, fleetspaceName, skip, top, filter, skiptoken, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetDatabaseImpl(inner1, this.manager()));
+ }
+
+ public void changeTier(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ DatabaseChangeTierProperties body) {
+ this.serviceClient().changeTier(resourceGroupName, fleetName, fleetspaceName, databaseName, body);
+ }
+
+ public void changeTier(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ DatabaseChangeTierProperties body, Context context) {
+ this.serviceClient().changeTier(resourceGroupName, fleetName, fleetspaceName, databaseName, body, context);
+ }
+
+ public void rename(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ DatabaseRenameProperties body) {
+ this.serviceClient().rename(resourceGroupName, fleetName, fleetspaceName, databaseName, body);
+ }
+
+ public void rename(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ DatabaseRenameProperties body, Context context) {
+ this.serviceClient().rename(resourceGroupName, fleetName, fleetspaceName, databaseName, body, context);
+ }
+
+ public void revert(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName) {
+ this.serviceClient().revert(resourceGroupName, fleetName, fleetspaceName, databaseName);
+ }
+
+ public void revert(String resourceGroupName, String fleetName, String fleetspaceName, String databaseName,
+ Context context) {
+ this.serviceClient().revert(resourceGroupName, fleetName, fleetspaceName, databaseName, context);
+ }
+
+ public FleetDatabase getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.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 fleetName = ResourceManagerUtils.getValueFromIdByName(id, "fleets");
+ if (fleetName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id)));
+ }
+ String fleetspaceName = ResourceManagerUtils.getValueFromIdByName(id, "fleetspaces");
+ if (fleetspaceName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleetspaces'.", id)));
+ }
+ String databaseName = ResourceManagerUtils.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, fleetName, fleetspaceName, databaseName, Context.NONE)
+ .getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.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 fleetName = ResourceManagerUtils.getValueFromIdByName(id, "fleets");
+ if (fleetName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id)));
+ }
+ String fleetspaceName = ResourceManagerUtils.getValueFromIdByName(id, "fleetspaces");
+ if (fleetspaceName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleetspaces'.", id)));
+ }
+ String databaseName = ResourceManagerUtils.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, fleetName, fleetspaceName, databaseName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = ResourceManagerUtils.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 fleetName = ResourceManagerUtils.getValueFromIdByName(id, "fleets");
+ if (fleetName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id)));
+ }
+ String fleetspaceName = ResourceManagerUtils.getValueFromIdByName(id, "fleetspaces");
+ if (fleetspaceName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleetspaces'.", id)));
+ }
+ String databaseName = ResourceManagerUtils.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, fleetName, fleetspaceName, databaseName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.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 fleetName = ResourceManagerUtils.getValueFromIdByName(id, "fleets");
+ if (fleetName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id)));
+ }
+ String fleetspaceName = ResourceManagerUtils.getValueFromIdByName(id, "fleetspaces");
+ if (fleetspaceName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleetspaces'.", id)));
+ }
+ String databaseName = ResourceManagerUtils.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, fleetName, fleetspaceName, databaseName, context);
+ }
+
+ private FleetDatabasesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager manager() {
+ return this.serviceManager;
+ }
+
+ public FleetDatabaseImpl define(String name) {
+ return new FleetDatabaseImpl(name, this.manager());
+ }
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetImpl.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetImpl.java
new file mode 100644
index 000000000000..45489a39189e
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetImpl.java
@@ -0,0 +1,182 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.databasefleetmanager.fluent.models.FleetInner;
+import com.azure.resourcemanager.databasefleetmanager.models.Fleet;
+import com.azure.resourcemanager.databasefleetmanager.models.FleetProperties;
+import com.azure.resourcemanager.databasefleetmanager.models.FleetUpdate;
+import java.util.Collections;
+import java.util.Map;
+
+public final class FleetImpl implements Fleet, Fleet.Definition, Fleet.Update {
+ private FleetInner innerObject;
+
+ private final com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public FleetProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public FleetInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String fleetName;
+
+ private FleetUpdate updateProperties;
+
+ public FleetImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public Fleet create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleets()
+ .createOrUpdate(resourceGroupName, fleetName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Fleet create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleets()
+ .createOrUpdate(resourceGroupName, fleetName, this.innerModel(), context);
+ return this;
+ }
+
+ FleetImpl(String name, com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager serviceManager) {
+ this.innerObject = new FleetInner();
+ this.serviceManager = serviceManager;
+ this.fleetName = name;
+ }
+
+ public FleetImpl update() {
+ this.updateProperties = new FleetUpdate();
+ return this;
+ }
+
+ public Fleet apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleets()
+ .update(resourceGroupName, fleetName, updateProperties, Context.NONE);
+ return this;
+ }
+
+ public Fleet apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleets()
+ .update(resourceGroupName, fleetName, updateProperties, context);
+ return this;
+ }
+
+ FleetImpl(FleetInner innerObject,
+ com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.fleetName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "fleets");
+ }
+
+ public Fleet refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleets()
+ .getByResourceGroupWithResponse(resourceGroupName, fleetName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Fleet refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleets()
+ .getByResourceGroupWithResponse(resourceGroupName, fleetName, context)
+ .getValue();
+ return this;
+ }
+
+ public FleetImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public FleetImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public FleetImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateProperties.withTags(tags);
+ return this;
+ }
+ }
+
+ public FleetImpl withProperties(FleetProperties properties) {
+ if (isInCreateMode()) {
+ this.innerModel().withProperties(properties);
+ return this;
+ } else {
+ this.updateProperties.withProperties(properties);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetTierImpl.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetTierImpl.java
new file mode 100644
index 000000000000..8fbddb7e1589
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetTierImpl.java
@@ -0,0 +1,139 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.databasefleetmanager.fluent.models.FleetTierInner;
+import com.azure.resourcemanager.databasefleetmanager.models.FleetTier;
+import com.azure.resourcemanager.databasefleetmanager.models.FleetTierProperties;
+
+public final class FleetTierImpl implements FleetTier, FleetTier.Definition, FleetTier.Update {
+ private FleetTierInner innerObject;
+
+ private final com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public FleetTierProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public FleetTierInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String fleetName;
+
+ private String tierName;
+
+ public FleetTierImpl withExistingFleet(String resourceGroupName, String fleetName) {
+ this.resourceGroupName = resourceGroupName;
+ this.fleetName = fleetName;
+ return this;
+ }
+
+ public FleetTier create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleetTiers()
+ .createOrUpdate(resourceGroupName, fleetName, tierName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public FleetTier create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleetTiers()
+ .createOrUpdate(resourceGroupName, fleetName, tierName, this.innerModel(), context);
+ return this;
+ }
+
+ FleetTierImpl(String name,
+ com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager serviceManager) {
+ this.innerObject = new FleetTierInner();
+ this.serviceManager = serviceManager;
+ this.tierName = name;
+ }
+
+ public FleetTierImpl update() {
+ return this;
+ }
+
+ public FleetTier apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleetTiers()
+ .update(resourceGroupName, fleetName, tierName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public FleetTier apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleetTiers()
+ .update(resourceGroupName, fleetName, tierName, this.innerModel(), context);
+ return this;
+ }
+
+ FleetTierImpl(FleetTierInner innerObject,
+ com.azure.resourcemanager.databasefleetmanager.DatabasefleetmanagerManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.fleetName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "fleets");
+ this.tierName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "tiers");
+ }
+
+ public FleetTier refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleetTiers()
+ .getWithResponse(resourceGroupName, fleetName, tierName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public FleetTier refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleetTiers()
+ .getWithResponse(resourceGroupName, fleetName, tierName, context)
+ .getValue();
+ return this;
+ }
+
+ public Response disableWithResponse(Context context) {
+ return serviceManager.fleetTiers().disableWithResponse(resourceGroupName, fleetName, tierName, context);
+ }
+
+ public FleetTier disable() {
+ return serviceManager.fleetTiers().disable(resourceGroupName, fleetName, tierName);
+ }
+
+ public FleetTierImpl withProperties(FleetTierProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetTiersClientImpl.java b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetTiersClientImpl.java
new file mode 100644
index 000000000000..55f89489bd87
--- /dev/null
+++ b/sdk/databasefleetmanager/azure-resourcemanager-databasefleetmanager/src/main/java/com/azure/resourcemanager/databasefleetmanager/implementation/FleetTiersClientImpl.java
@@ -0,0 +1,1354 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databasefleetmanager.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.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+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.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.databasefleetmanager.fluent.FleetTiersClient;
+import com.azure.resourcemanager.databasefleetmanager.fluent.models.FleetTierInner;
+import com.azure.resourcemanager.databasefleetmanager.implementation.models.FleetTierListResult;
+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 FleetTiersClient.
+ */
+public final class FleetTiersClientImpl implements FleetTiersClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final FleetTiersService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DatabaseFleetManagerClientImpl client;
+
+ /**
+ * Initializes an instance of FleetTiersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ FleetTiersClientImpl(DatabaseFleetManagerClientImpl client) {
+ this.service
+ = RestProxy.create(FleetTiersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DatabaseFleetManagerClientFleetTiers to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DatabaseFleetManager")
+ public interface FleetTiersService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @PathParam("tierName") String tierName, @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @PathParam("tierName") String tierName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") FleetTierInner resource,
+ Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono