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 PostgreSql service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the PostgreSql service API instance.
+ */
+ public PostgreSqlManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder
+ .append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver")
+ .append("/")
+ .append("1.0.0-beta.1");
+ 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 ArmChallengeAuthenticationPolicy(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 PostgreSqlManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Administrators. It manages ActiveDirectoryAdministrator.
+ *
+ * @return Resource collection API of Administrators.
+ */
+ public Administrators administrators() {
+ if (this.administrators == null) {
+ this.administrators = new AdministratorsImpl(clientObject.getAdministrators(), this);
+ }
+ return administrators;
+ }
+
+ /**
+ * Gets the resource collection API of Backups.
+ *
+ * @return Resource collection API of Backups.
+ */
+ public Backups backups() {
+ if (this.backups == null) {
+ this.backups = new BackupsImpl(clientObject.getBackups(), this);
+ }
+ return backups;
+ }
+
+ /**
+ * Gets the resource collection API of LocationBasedCapabilities.
+ *
+ * @return Resource collection API of LocationBasedCapabilities.
+ */
+ public LocationBasedCapabilities locationBasedCapabilities() {
+ if (this.locationBasedCapabilities == null) {
+ this.locationBasedCapabilities =
+ new LocationBasedCapabilitiesImpl(clientObject.getLocationBasedCapabilities(), this);
+ }
+ return locationBasedCapabilities;
+ }
+
+ /**
+ * Gets the resource collection API of CheckNameAvailabilities.
+ *
+ * @return Resource collection API of CheckNameAvailabilities.
+ */
+ public CheckNameAvailabilities checkNameAvailabilities() {
+ if (this.checkNameAvailabilities == null) {
+ this.checkNameAvailabilities =
+ new CheckNameAvailabilitiesImpl(clientObject.getCheckNameAvailabilities(), this);
+ }
+ return checkNameAvailabilities;
+ }
+
+ /**
+ * Gets the resource collection API of CheckNameAvailabilityWithLocations.
+ *
+ * @return Resource collection API of CheckNameAvailabilityWithLocations.
+ */
+ public CheckNameAvailabilityWithLocations checkNameAvailabilityWithLocations() {
+ if (this.checkNameAvailabilityWithLocations == null) {
+ this.checkNameAvailabilityWithLocations =
+ new CheckNameAvailabilityWithLocationsImpl(clientObject.getCheckNameAvailabilityWithLocations(), this);
+ }
+ return checkNameAvailabilityWithLocations;
+ }
+
+ /**
+ * Gets the resource collection API of Configurations. It manages Configuration.
+ *
+ * @return Resource collection API of Configurations.
+ */
+ public Configurations configurations() {
+ if (this.configurations == null) {
+ this.configurations = new ConfigurationsImpl(clientObject.getConfigurations(), this);
+ }
+ return configurations;
+ }
+
+ /**
+ * Gets the resource collection API of Databases. It manages Database.
+ *
+ * @return Resource collection API of Databases.
+ */
+ public Databases databases() {
+ if (this.databases == null) {
+ this.databases = new DatabasesImpl(clientObject.getDatabases(), this);
+ }
+ return databases;
+ }
+
+ /**
+ * 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 Servers. It manages Server.
+ *
+ * @return Resource collection API of Servers.
+ */
+ public Servers servers() {
+ if (this.servers == null) {
+ this.servers = new ServersImpl(clientObject.getServers(), this);
+ }
+ return servers;
+ }
+
+ /**
+ * 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 GetPrivateDnsZoneSuffixes.
+ *
+ * @return Resource collection API of GetPrivateDnsZoneSuffixes.
+ */
+ public GetPrivateDnsZoneSuffixes getPrivateDnsZoneSuffixes() {
+ if (this.getPrivateDnsZoneSuffixes == null) {
+ this.getPrivateDnsZoneSuffixes =
+ new GetPrivateDnsZoneSuffixesImpl(clientObject.getGetPrivateDnsZoneSuffixes(), this);
+ }
+ return getPrivateDnsZoneSuffixes;
+ }
+
+ /**
+ * Gets the resource collection API of Replicas.
+ *
+ * @return Resource collection API of Replicas.
+ */
+ public Replicas replicas() {
+ if (this.replicas == null) {
+ this.replicas = new ReplicasImpl(clientObject.getReplicas(), this);
+ }
+ return replicas;
+ }
+
+ /**
+ * Gets the resource collection API of VirtualNetworkSubnetUsages.
+ *
+ * @return Resource collection API of VirtualNetworkSubnetUsages.
+ */
+ public VirtualNetworkSubnetUsages virtualNetworkSubnetUsages() {
+ if (this.virtualNetworkSubnetUsages == null) {
+ this.virtualNetworkSubnetUsages =
+ new VirtualNetworkSubnetUsagesImpl(clientObject.getVirtualNetworkSubnetUsages(), this);
+ }
+ return virtualNetworkSubnetUsages;
+ }
+
+ /**
+ * @return Wrapped service client PostgreSqlManagementClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ */
+ public PostgreSqlManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/AdministratorsClient.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/AdministratorsClient.java
new file mode 100644
index 000000000000..15741e4324ad
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/AdministratorsClient.java
@@ -0,0 +1,346 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedFlux;
+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.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ActiveDirectoryAdministratorAdd;
+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 AdministratorsClient. */
+public interface AdministratorsClient {
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents an Active Directory administrator along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono>> createWithResponseAsync(
+ String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters);
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of represents an Active Directory administrator.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ PollerFlux, ActiveDirectoryAdministratorInner> beginCreateAsync(
+ String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters);
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents an Active Directory administrator.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ActiveDirectoryAdministratorInner> beginCreate(
+ String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters);
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents an Active Directory administrator.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ActiveDirectoryAdministratorInner> beginCreate(
+ String resourceGroupName,
+ String serverName,
+ String objectId,
+ ActiveDirectoryAdministratorAdd parameters,
+ Context context);
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents an Active Directory administrator on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono createAsync(
+ String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters);
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents an Active Directory administrator.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ActiveDirectoryAdministratorInner create(
+ String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters);
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents an Active Directory administrator.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ActiveDirectoryAdministratorInner create(
+ String resourceGroupName,
+ String serverName,
+ String objectId,
+ ActiveDirectoryAdministratorAdd parameters,
+ Context context);
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String serverName, String objectId);
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, String objectId);
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String objectId);
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String objectId, Context context);
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono deleteAsync(String resourceGroupName, String serverName, String objectId);
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String objectId);
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String objectId, Context context);
+
+ /**
+ * Gets information about a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a server along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono> getWithResponseAsync(
+ String resourceGroupName, String serverName, String objectId);
+
+ /**
+ * Gets information about a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a server on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono getAsync(String resourceGroupName, String serverName, String objectId);
+
+ /**
+ * Gets information about a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a server along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String objectId, Context context);
+
+ /**
+ * Gets information about a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ActiveDirectoryAdministratorInner get(String resourceGroupName, String serverName, String objectId);
+
+ /**
+ * List all the AAD administrators for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of active directory administrators as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listByServerAsync(String resourceGroupName, String serverName);
+
+ /**
+ * List all the AAD administrators for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of active directory administrators as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * List all the AAD administrators for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of active directory administrators as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(
+ String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/BackupsClient.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/BackupsClient.java
new file mode 100644
index 000000000000..9637c51eae40
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/BackupsClient.java
@@ -0,0 +1,116 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.ServerBackupInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in BackupsClient. */
+public interface BackupsClient {
+ /**
+ * Get specific backup for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specific backup for a given server along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono> getWithResponseAsync(
+ String resourceGroupName, String serverName, String backupName);
+
+ /**
+ * Get specific backup for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specific backup for a given server on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono getAsync(String resourceGroupName, String serverName, String backupName);
+
+ /**
+ * Get specific backup for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specific backup for a given server along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String backupName, Context context);
+
+ /**
+ * Get specific backup for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specific backup for a given server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerBackupInner get(String resourceGroupName, String serverName, String backupName);
+
+ /**
+ * List all the backups for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server backups as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listByServerAsync(String resourceGroupName, String serverName);
+
+ /**
+ * List all the backups for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server backups as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * List all the backups for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server backups as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java
new file mode 100644
index 000000000000..e531905b7bcd
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.NameAvailabilityInner;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.CheckNameAvailabilityRequest;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in CheckNameAvailabilitiesClient. */
+public interface CheckNameAvailabilitiesClient {
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono> executeWithResponseAsync(
+ CheckNameAvailabilityRequest nameAvailabilityRequest);
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono executeAsync(CheckNameAvailabilityRequest nameAvailabilityRequest);
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response executeWithResponse(
+ CheckNameAvailabilityRequest nameAvailabilityRequest, Context context);
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NameAvailabilityInner execute(CheckNameAvailabilityRequest nameAvailabilityRequest);
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/CheckNameAvailabilityWithLocationsClient.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/CheckNameAvailabilityWithLocationsClient.java
new file mode 100644
index 000000000000..8a4f1b1047f8
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/CheckNameAvailabilityWithLocationsClient.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.NameAvailabilityInner;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.CheckNameAvailabilityRequest;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in CheckNameAvailabilityWithLocationsClient.
+ */
+public interface CheckNameAvailabilityWithLocationsClient {
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param locationName The name of the location.
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono> executeWithResponseAsync(
+ String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest);
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param locationName The name of the location.
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono executeAsync(String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest);
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param locationName The name of the location.
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response executeWithResponse(
+ String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest, Context context);
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param locationName The name of the location.
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NameAvailabilityInner execute(String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest);
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/ConfigurationsClient.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/ConfigurationsClient.java
new file mode 100644
index 000000000000..2483ec9fc6fd
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/ConfigurationsClient.java
@@ -0,0 +1,367 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedFlux;
+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.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.ConfigurationInner;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ConfigurationForUpdate;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ConfigurationsClient. */
+public interface ConfigurationsClient {
+ /**
+ * List all the configurations in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server configurations as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listByServerAsync(String resourceGroupName, String serverName);
+
+ /**
+ * List all the configurations in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server configurations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * List all the configurations in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server configurations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Gets information about a configuration of server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a configuration of server along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono> getWithResponseAsync(
+ String resourceGroupName, String serverName, String configurationName);
+
+ /**
+ * Gets information about a configuration of server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a configuration of server on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono getAsync(String resourceGroupName, String serverName, String configurationName);
+
+ /**
+ * Gets information about a configuration of server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a configuration of server along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String configurationName, Context context);
+
+ /**
+ * Gets information about a configuration of server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a configuration of server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationInner get(String resourceGroupName, String serverName, String configurationName);
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a Configuration along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono>> updateWithResponseAsync(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters);
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ PollerFlux, ConfigurationInner> beginUpdateAsync(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters);
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ConfigurationInner> beginUpdate(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters);
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ConfigurationInner> beginUpdate(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationForUpdate parameters,
+ Context context);
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a Configuration on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono updateAsync(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters);
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationInner update(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters);
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationInner update(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationForUpdate parameters,
+ Context context);
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a Configuration along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono>> putWithResponseAsync(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters);
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ PollerFlux, ConfigurationInner> beginPutAsync(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters);
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ConfigurationInner> beginPut(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters);
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ConfigurationInner> beginPut(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ Context context);
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a Configuration on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono putAsync(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters);
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationInner put(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters);
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationInner put(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ Context context);
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/DatabasesClient.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/DatabasesClient.java
new file mode 100644
index 000000000000..05bae8b286d3
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/DatabasesClient.java
@@ -0,0 +1,335 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedFlux;
+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.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.DatabaseInner;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in DatabasesClient. */
+public interface DatabasesClient {
+ /**
+ * Creates a new database or updates an existing database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The required parameters for creating or updating a database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a Database along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono>> createWithResponseAsync(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters);
+
+ /**
+ * Creates a new database or updates an existing database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The required parameters for creating or updating a database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of represents a Database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ PollerFlux, DatabaseInner> beginCreateAsync(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters);
+
+ /**
+ * Creates a new database or updates an existing database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The required parameters for creating or updating a database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a Database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseInner> beginCreate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters);
+
+ /**
+ * Creates a new database or updates an existing database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The required parameters for creating or updating a database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a Database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseInner> beginCreate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context);
+
+ /**
+ * Creates a new database or updates an existing database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The required parameters for creating or updating a database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a Database on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono createAsync(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters);
+
+ /**
+ * Creates a new database or updates an existing database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The required parameters for creating or updating a database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner create(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters);
+
+ /**
+ * Creates a new database or updates an existing database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param parameters The required parameters for creating or updating a database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner create(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context);
+
+ /**
+ * Deletes a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Deletes a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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)
+ PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Deletes a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Deletes a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Deletes a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono deleteAsync(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Deletes a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Deletes a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Gets information about a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a database along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono> getWithResponseAsync(
+ String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Gets information about a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a database on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono getAsync(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Gets information about a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a database along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String databaseName, Context context);
+
+ /**
+ * Gets information about a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner get(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * List all the databases in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a List of databases as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listByServerAsync(String resourceGroupName, String serverName);
+
+ /**
+ * List all the databases in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a List of databases as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * List all the databases in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a List of databases as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/FirewallRulesClient.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/FirewallRulesClient.java
new file mode 100644
index 000000000000..a0fa53af6d49
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/FirewallRulesClient.java
@@ -0,0 +1,345 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedFlux;
+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.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.FirewallRuleInner;
+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 interface FirewallRulesClient {
+ /**
+ * Creates a new firewall rule or updates an existing firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @param parameters The required parameters for creating or updating a firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters);
+
+ /**
+ * Creates a new firewall rule or updates an existing firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @param parameters The required parameters for creating or updating a firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of represents a server firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ PollerFlux, FirewallRuleInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters);
+
+ /**
+ * Creates a new firewall rule or updates an existing firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @param parameters The required parameters for creating or updating a firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a server firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FirewallRuleInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters);
+
+ /**
+ * Creates a new firewall rule or updates an existing firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @param parameters The required parameters for creating or updating a firewall rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a server firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FirewallRuleInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String firewallRuleName,
+ FirewallRuleInner parameters,
+ Context context);
+
+ /**
+ * Creates a new firewall rule or updates an existing firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @param parameters The required parameters for creating or updating a firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server firewall rule on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono createOrUpdateAsync(
+ String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters);
+
+ /**
+ * Creates a new firewall rule or updates an existing firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @param parameters The required parameters for creating or updating a firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FirewallRuleInner createOrUpdate(
+ String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters);
+
+ /**
+ * Creates a new firewall rule or updates an existing firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @param parameters The required parameters for creating or updating a firewall rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FirewallRuleInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String firewallRuleName,
+ FirewallRuleInner parameters,
+ Context context);
+
+ /**
+ * Deletes a PostgreSQL server firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String serverName, String firewallRuleName);
+
+ /**
+ * Deletes a PostgreSQL server firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String serverName, String firewallRuleName);
+
+ /**
+ * Deletes a PostgreSQL server firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String firewallRuleName);
+
+ /**
+ * Deletes a PostgreSQL server firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String firewallRuleName, Context context);
+
+ /**
+ * Deletes a PostgreSQL server firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono deleteAsync(String resourceGroupName, String serverName, String firewallRuleName);
+
+ /**
+ * Deletes a PostgreSQL server firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String firewallRuleName);
+
+ /**
+ * Deletes a PostgreSQL server firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String firewallRuleName, Context context);
+
+ /**
+ * List all the firewall rules in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono> getWithResponseAsync(
+ String resourceGroupName, String serverName, String firewallRuleName);
+
+ /**
+ * List all the firewall rules in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server firewall rule on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono getAsync(String resourceGroupName, String serverName, String firewallRuleName);
+
+ /**
+ * List all the firewall rules in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server firewall rule along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String firewallRuleName, Context context);
+
+ /**
+ * List all the firewall rules in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName);
+
+ /**
+ * List all the firewall rules in a given PostgreSQL server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of firewall rules as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listByServerAsync(String resourceGroupName, String serverName);
+
+ /**
+ * List all the firewall rules in a given PostgreSQL server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of firewall rules as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * List all the firewall rules in a given PostgreSQL server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of firewall rules as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java
new file mode 100644
index 000000000000..1413a774fd21
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in GetPrivateDnsZoneSuffixesClient. */
+public interface GetPrivateDnsZoneSuffixesClient {
+ /**
+ * Get private DNS zone suffix in the cloud.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return private DNS zone suffix in the cloud along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono> executeWithResponseAsync();
+
+ /**
+ * Get private DNS zone suffix in the cloud.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return private DNS zone suffix in the cloud on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono executeAsync();
+
+ /**
+ * Get private DNS zone suffix in the cloud.
+ *
+ * @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 private DNS zone suffix in the cloud along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response executeWithResponse(Context context);
+
+ /**
+ * Get private DNS zone suffix in the cloud.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return private DNS zone suffix in the cloud.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ String execute();
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/LocationBasedCapabilitiesClient.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/LocationBasedCapabilitiesClient.java
new file mode 100644
index 000000000000..63457c0c4e88
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/LocationBasedCapabilitiesClient.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.CapabilityPropertiesInner;
+
+/** An instance of this class provides access to all the operations defined in LocationBasedCapabilitiesClient. */
+public interface LocationBasedCapabilitiesClient {
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return capabilities at specified location in a given subscription as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux executeAsync(String locationName);
+
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return capabilities at specified location in a given subscription as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable execute(String locationName);
+
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return capabilities at specified location in a given subscription as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable execute(String locationName, Context context);
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/OperationsClient.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/OperationsClient.java
new file mode 100644
index 000000000000..e690e2238ae5
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/OperationsClient.java
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.OperationListResultInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Lists all of the available REST API operations.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of resource provider operations along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono> listWithResponseAsync();
+
+ /**
+ * Lists all of the available REST API operations.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of resource provider operations on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono listAsync();
+
+ /**
+ * Lists all of the available REST API operations.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of resource provider operations along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listWithResponse(Context context);
+
+ /**
+ * Lists all of the available REST API operations.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of resource provider operations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationListResultInner list();
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/PostgreSqlManagementClient.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/PostgreSqlManagementClient.java
new file mode 100644
index 000000000000..fa0bf0cbe6c4
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/PostgreSqlManagementClient.java
@@ -0,0 +1,137 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for PostgreSqlManagementClient class. */
+public interface PostgreSqlManagementClient {
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * 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 AdministratorsClient object to access its operations.
+ *
+ * @return the AdministratorsClient object.
+ */
+ AdministratorsClient getAdministrators();
+
+ /**
+ * Gets the BackupsClient object to access its operations.
+ *
+ * @return the BackupsClient object.
+ */
+ BackupsClient getBackups();
+
+ /**
+ * Gets the LocationBasedCapabilitiesClient object to access its operations.
+ *
+ * @return the LocationBasedCapabilitiesClient object.
+ */
+ LocationBasedCapabilitiesClient getLocationBasedCapabilities();
+
+ /**
+ * Gets the CheckNameAvailabilitiesClient object to access its operations.
+ *
+ * @return the CheckNameAvailabilitiesClient object.
+ */
+ CheckNameAvailabilitiesClient getCheckNameAvailabilities();
+
+ /**
+ * Gets the CheckNameAvailabilityWithLocationsClient object to access its operations.
+ *
+ * @return the CheckNameAvailabilityWithLocationsClient object.
+ */
+ CheckNameAvailabilityWithLocationsClient getCheckNameAvailabilityWithLocations();
+
+ /**
+ * Gets the ConfigurationsClient object to access its operations.
+ *
+ * @return the ConfigurationsClient object.
+ */
+ ConfigurationsClient getConfigurations();
+
+ /**
+ * Gets the DatabasesClient object to access its operations.
+ *
+ * @return the DatabasesClient object.
+ */
+ DatabasesClient getDatabases();
+
+ /**
+ * Gets the FirewallRulesClient object to access its operations.
+ *
+ * @return the FirewallRulesClient object.
+ */
+ FirewallRulesClient getFirewallRules();
+
+ /**
+ * Gets the ServersClient object to access its operations.
+ *
+ * @return the ServersClient object.
+ */
+ ServersClient getServers();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the GetPrivateDnsZoneSuffixesClient object to access its operations.
+ *
+ * @return the GetPrivateDnsZoneSuffixesClient object.
+ */
+ GetPrivateDnsZoneSuffixesClient getGetPrivateDnsZoneSuffixes();
+
+ /**
+ * Gets the ReplicasClient object to access its operations.
+ *
+ * @return the ReplicasClient object.
+ */
+ ReplicasClient getReplicas();
+
+ /**
+ * Gets the VirtualNetworkSubnetUsagesClient object to access its operations.
+ *
+ * @return the VirtualNetworkSubnetUsagesClient object.
+ */
+ VirtualNetworkSubnetUsagesClient getVirtualNetworkSubnetUsages();
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/ReplicasClient.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/ReplicasClient.java
new file mode 100644
index 000000000000..f2ed30b8a6f7
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/ReplicasClient.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.ServerInner;
+
+/** An instance of this class provides access to all the operations defined in ReplicasClient. */
+public interface ReplicasClient {
+ /**
+ * List all the replicas for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of servers as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listByServerAsync(String resourceGroupName, String serverName);
+
+ /**
+ * List all the replicas for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of servers as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * List all the replicas for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of servers as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/ServersClient.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/ServersClient.java
new file mode 100644
index 000000000000..32ef69f32023
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/ServersClient.java
@@ -0,0 +1,759 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedFlux;
+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.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.ServerInner;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.RestartParameter;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ServerForUpdate;
+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 ServersClient. */
+public interface ServersClient {
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating or updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono>> createWithResponseAsync(
+ String resourceGroupName, String serverName, ServerInner parameters);
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating or updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ PollerFlux, ServerInner> beginCreateAsync(
+ String resourceGroupName, String serverName, ServerInner parameters);
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating or updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ServerInner> beginCreate(
+ String resourceGroupName, String serverName, ServerInner parameters);
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating or updating a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ServerInner> beginCreate(
+ String resourceGroupName, String serverName, ServerInner parameters, Context context);
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating or updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono createAsync(String resourceGroupName, String serverName, ServerInner parameters);
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating or updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerInner create(String resourceGroupName, String serverName, ServerInner parameters);
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for creating or updating a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerInner create(String resourceGroupName, String serverName, ServerInner parameters, Context context);
+
+ /**
+ * Updates an existing server. The request body can contain one to many of the properties present in the normal
+ * server definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono>> updateWithResponseAsync(
+ String resourceGroupName, String serverName, ServerForUpdate parameters);
+
+ /**
+ * Updates an existing server. The request body can contain one to many of the properties present in the normal
+ * server definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ PollerFlux, ServerInner> beginUpdateAsync(
+ String resourceGroupName, String serverName, ServerForUpdate parameters);
+
+ /**
+ * Updates an existing server. The request body can contain one to many of the properties present in the normal
+ * server definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ServerInner> beginUpdate(
+ String resourceGroupName, String serverName, ServerForUpdate parameters);
+
+ /**
+ * Updates an existing server. The request body can contain one to many of the properties present in the normal
+ * server definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for updating a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ServerInner> beginUpdate(
+ String resourceGroupName, String serverName, ServerForUpdate parameters, Context context);
+
+ /**
+ * Updates an existing server. The request body can contain one to many of the properties present in the normal
+ * server definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono updateAsync(String resourceGroupName, String serverName, ServerForUpdate parameters);
+
+ /**
+ * Updates an existing server. The request body can contain one to many of the properties present in the normal
+ * server definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerInner update(String resourceGroupName, String serverName, ServerForUpdate parameters);
+
+ /**
+ * Updates an existing server. The request body can contain one to many of the properties present in the normal
+ * server definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The required parameters for updating a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerInner update(String resourceGroupName, String serverName, ServerForUpdate parameters, Context context);
+
+ /**
+ * Deletes a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName);
+
+ /**
+ * Deletes a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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)
+ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName);
+
+ /**
+ * Deletes a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName);
+
+ /**
+ * Deletes a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Deletes a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono deleteAsync(String resourceGroupName, String serverName);
+
+ /**
+ * Deletes a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName);
+
+ /**
+ * Deletes a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Gets information about a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a server along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String serverName);
+
+ /**
+ * Gets information about a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a server on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono getByResourceGroupAsync(String resourceGroupName, String serverName);
+
+ /**
+ * Gets information about a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a server along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Gets information about a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerInner getByResourceGroup(String resourceGroupName, String serverName);
+
+ /**
+ * List all the servers in a given resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of servers as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listByResourceGroupAsync(String resourceGroupName);
+
+ /**
+ * List all the servers in a given resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of servers as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List all the servers in a given resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of servers as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * List all the servers in a given subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of servers as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedFlux listAsync();
+
+ /**
+ * List all the servers in a given subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of servers as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List all the servers in a given subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of servers as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Restarts a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The parameters for restarting a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono>> restartWithResponseAsync(
+ String resourceGroupName, String serverName, RestartParameter parameters);
+
+ /**
+ * Restarts a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The parameters for restarting a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ PollerFlux, Void> beginRestartAsync(
+ String resourceGroupName, String serverName, RestartParameter parameters);
+
+ /**
+ * Restarts a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ PollerFlux, Void> beginRestartAsync(String resourceGroupName, String serverName);
+
+ /**
+ * Restarts a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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> beginRestart(String resourceGroupName, String serverName);
+
+ /**
+ * Restarts a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The parameters for restarting a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRestart(
+ String resourceGroupName, String serverName, RestartParameter parameters, Context context);
+
+ /**
+ * Restarts a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The parameters for restarting a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono restartAsync(String resourceGroupName, String serverName, RestartParameter parameters);
+
+ /**
+ * Restarts a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono restartAsync(String resourceGroupName, String serverName);
+
+ /**
+ * Restarts a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void restart(String resourceGroupName, String serverName);
+
+ /**
+ * Restarts a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param parameters The parameters for restarting a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void restart(String resourceGroupName, String serverName, RestartParameter parameters, Context context);
+
+ /**
+ * Starts a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono>> startWithResponseAsync(String resourceGroupName, String serverName);
+
+ /**
+ * Starts a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ PollerFlux, Void> beginStartAsync(String resourceGroupName, String serverName);
+
+ /**
+ * Starts a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStart(String resourceGroupName, String serverName);
+
+ /**
+ * Starts a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStart(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Starts a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono startAsync(String resourceGroupName, String serverName);
+
+ /**
+ * Starts a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void start(String resourceGroupName, String serverName);
+
+ /**
+ * Starts a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void start(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Stops a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono>> stopWithResponseAsync(String resourceGroupName, String serverName);
+
+ /**
+ * Stops a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ PollerFlux, Void> beginStopAsync(String resourceGroupName, String serverName);
+
+ /**
+ * Stops a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStop(String resourceGroupName, String serverName);
+
+ /**
+ * Stops a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStop(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Stops a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono stopAsync(String resourceGroupName, String serverName);
+
+ /**
+ * Stops a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void stop(String resourceGroupName, String serverName);
+
+ /**
+ * Stops a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void stop(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java
new file mode 100644
index 000000000000..4484d12b634a
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in VirtualNetworkSubnetUsagesClient. */
+public interface VirtualNetworkSubnetUsagesClient {
+ /**
+ * Get virtual network subnet usage for a given vNet resource id.
+ *
+ * @param locationName The name of the location.
+ * @param parameters The required parameters for creating or updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return virtual network subnet usage for a given vNet resource id along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono> executeWithResponseAsync(
+ String locationName, VirtualNetworkSubnetUsageParameter parameters);
+
+ /**
+ * Get virtual network subnet usage for a given vNet resource id.
+ *
+ * @param locationName The name of the location.
+ * @param parameters The required parameters for creating or updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return virtual network subnet usage for a given vNet resource id on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono executeAsync(
+ String locationName, VirtualNetworkSubnetUsageParameter parameters);
+
+ /**
+ * Get virtual network subnet usage for a given vNet resource id.
+ *
+ * @param locationName The name of the location.
+ * @param parameters The required parameters for creating or updating a server.
+ * @param 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 virtual network subnet usage for a given vNet resource id along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response executeWithResponse(
+ String locationName, VirtualNetworkSubnetUsageParameter parameters, Context context);
+
+ /**
+ * Get virtual network subnet usage for a given vNet resource id.
+ *
+ * @param locationName The name of the location.
+ * @param parameters The required parameters for creating or updating a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return virtual network subnet usage for a given vNet resource id.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualNetworkSubnetUsageResultInner execute(String locationName, VirtualNetworkSubnetUsageParameter parameters);
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ActiveDirectoryAdministratorInner.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ActiveDirectoryAdministratorInner.java
new file mode 100644
index 000000000000..c6d9ef854400
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ActiveDirectoryAdministratorInner.java
@@ -0,0 +1,160 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.PrincipalType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents an Active Directory administrator. */
+@Fluent
+public final class ActiveDirectoryAdministratorInner extends ProxyResource {
+ /*
+ * Properties of the active directory administrator.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private AdministratorProperties innerProperties = new AdministratorProperties();
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of ActiveDirectoryAdministratorInner class. */
+ public ActiveDirectoryAdministratorInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Properties of the active directory administrator.
+ *
+ * @return the innerProperties value.
+ */
+ private AdministratorProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the principalType property: The principal type used to represent the type of Active Directory Administrator.
+ *
+ * @return the principalType value.
+ */
+ public PrincipalType principalType() {
+ return this.innerProperties() == null ? null : this.innerProperties().principalType();
+ }
+
+ /**
+ * Set the principalType property: The principal type used to represent the type of Active Directory Administrator.
+ *
+ * @param principalType the principalType value to set.
+ * @return the ActiveDirectoryAdministratorInner object itself.
+ */
+ public ActiveDirectoryAdministratorInner withPrincipalType(PrincipalType principalType) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AdministratorProperties();
+ }
+ this.innerProperties().withPrincipalType(principalType);
+ return this;
+ }
+
+ /**
+ * Get the principalName property: Active Directory administrator principal name.
+ *
+ * @return the principalName value.
+ */
+ public String principalName() {
+ return this.innerProperties() == null ? null : this.innerProperties().principalName();
+ }
+
+ /**
+ * Set the principalName property: Active Directory administrator principal name.
+ *
+ * @param principalName the principalName value to set.
+ * @return the ActiveDirectoryAdministratorInner object itself.
+ */
+ public ActiveDirectoryAdministratorInner withPrincipalName(String principalName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AdministratorProperties();
+ }
+ this.innerProperties().withPrincipalName(principalName);
+ return this;
+ }
+
+ /**
+ * Get the objectId property: The objectId of the Active Directory administrator.
+ *
+ * @return the objectId value.
+ */
+ public String objectId() {
+ return this.innerProperties() == null ? null : this.innerProperties().objectId();
+ }
+
+ /**
+ * Set the objectId property: The objectId of the Active Directory administrator.
+ *
+ * @param objectId the objectId value to set.
+ * @return the ActiveDirectoryAdministratorInner object itself.
+ */
+ public ActiveDirectoryAdministratorInner withObjectId(String objectId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AdministratorProperties();
+ }
+ this.innerProperties().withObjectId(objectId);
+ return this;
+ }
+
+ /**
+ * Get the tenantId property: The tenantId of the Active Directory administrator.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.innerProperties() == null ? null : this.innerProperties().tenantId();
+ }
+
+ /**
+ * Set the tenantId property: The tenantId of the Active Directory administrator.
+ *
+ * @param tenantId the tenantId value to set.
+ * @return the ActiveDirectoryAdministratorInner object itself.
+ */
+ public ActiveDirectoryAdministratorInner withTenantId(String tenantId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AdministratorProperties();
+ }
+ this.innerProperties().withTenantId(tenantId);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model ActiveDirectoryAdministratorInner"));
+ } else {
+ innerProperties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryAdministratorInner.class);
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/AdministratorProperties.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/AdministratorProperties.java
new file mode 100644
index 000000000000..a0fe84dc6d0d
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/AdministratorProperties.java
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.PrincipalType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties of an Active Directory administrator. */
+@Fluent
+public final class AdministratorProperties {
+ /*
+ * The principal type used to represent the type of Active Directory Administrator.
+ */
+ @JsonProperty(value = "principalType")
+ private PrincipalType principalType;
+
+ /*
+ * Active Directory administrator principal name.
+ */
+ @JsonProperty(value = "principalName")
+ private String principalName;
+
+ /*
+ * The objectId of the Active Directory administrator.
+ */
+ @JsonProperty(value = "objectId")
+ private String objectId;
+
+ /*
+ * The tenantId of the Active Directory administrator.
+ */
+ @JsonProperty(value = "tenantId")
+ private String tenantId;
+
+ /** Creates an instance of AdministratorProperties class. */
+ public AdministratorProperties() {
+ }
+
+ /**
+ * Get the principalType property: The principal type used to represent the type of Active Directory Administrator.
+ *
+ * @return the principalType value.
+ */
+ public PrincipalType principalType() {
+ return this.principalType;
+ }
+
+ /**
+ * Set the principalType property: The principal type used to represent the type of Active Directory Administrator.
+ *
+ * @param principalType the principalType value to set.
+ * @return the AdministratorProperties object itself.
+ */
+ public AdministratorProperties withPrincipalType(PrincipalType principalType) {
+ this.principalType = principalType;
+ return this;
+ }
+
+ /**
+ * Get the principalName property: Active Directory administrator principal name.
+ *
+ * @return the principalName value.
+ */
+ public String principalName() {
+ return this.principalName;
+ }
+
+ /**
+ * Set the principalName property: Active Directory administrator principal name.
+ *
+ * @param principalName the principalName value to set.
+ * @return the AdministratorProperties object itself.
+ */
+ public AdministratorProperties withPrincipalName(String principalName) {
+ this.principalName = principalName;
+ return this;
+ }
+
+ /**
+ * Get the objectId property: The objectId of the Active Directory administrator.
+ *
+ * @return the objectId value.
+ */
+ public String objectId() {
+ return this.objectId;
+ }
+
+ /**
+ * Set the objectId property: The objectId of the Active Directory administrator.
+ *
+ * @param objectId the objectId value to set.
+ * @return the AdministratorProperties object itself.
+ */
+ public AdministratorProperties withObjectId(String objectId) {
+ this.objectId = objectId;
+ return this;
+ }
+
+ /**
+ * Get the tenantId property: The tenantId of the Active Directory administrator.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Set the tenantId property: The tenantId of the Active Directory administrator.
+ *
+ * @param tenantId the tenantId value to set.
+ * @return the AdministratorProperties object itself.
+ */
+ public AdministratorProperties withTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/AdministratorPropertiesForAdd.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/AdministratorPropertiesForAdd.java
new file mode 100644
index 000000000000..c28c26af6477
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/AdministratorPropertiesForAdd.java
@@ -0,0 +1,103 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.PrincipalType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties of an Active Directory administrator. */
+@Fluent
+public final class AdministratorPropertiesForAdd {
+ /*
+ * The principal type used to represent the type of Active Directory Administrator.
+ */
+ @JsonProperty(value = "principalType")
+ private PrincipalType principalType;
+
+ /*
+ * Active Directory administrator principal name.
+ */
+ @JsonProperty(value = "principalName")
+ private String principalName;
+
+ /*
+ * The tenantId of the Active Directory administrator.
+ */
+ @JsonProperty(value = "tenantId")
+ private String tenantId;
+
+ /** Creates an instance of AdministratorPropertiesForAdd class. */
+ public AdministratorPropertiesForAdd() {
+ }
+
+ /**
+ * Get the principalType property: The principal type used to represent the type of Active Directory Administrator.
+ *
+ * @return the principalType value.
+ */
+ public PrincipalType principalType() {
+ return this.principalType;
+ }
+
+ /**
+ * Set the principalType property: The principal type used to represent the type of Active Directory Administrator.
+ *
+ * @param principalType the principalType value to set.
+ * @return the AdministratorPropertiesForAdd object itself.
+ */
+ public AdministratorPropertiesForAdd withPrincipalType(PrincipalType principalType) {
+ this.principalType = principalType;
+ return this;
+ }
+
+ /**
+ * Get the principalName property: Active Directory administrator principal name.
+ *
+ * @return the principalName value.
+ */
+ public String principalName() {
+ return this.principalName;
+ }
+
+ /**
+ * Set the principalName property: Active Directory administrator principal name.
+ *
+ * @param principalName the principalName value to set.
+ * @return the AdministratorPropertiesForAdd object itself.
+ */
+ public AdministratorPropertiesForAdd withPrincipalName(String principalName) {
+ this.principalName = principalName;
+ return this;
+ }
+
+ /**
+ * Get the tenantId property: The tenantId of the Active Directory administrator.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Set the tenantId property: The tenantId of the Active Directory administrator.
+ *
+ * @param tenantId the tenantId value to set.
+ * @return the AdministratorPropertiesForAdd object itself.
+ */
+ public AdministratorPropertiesForAdd withTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/CapabilityPropertiesInner.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/CapabilityPropertiesInner.java
new file mode 100644
index 000000000000..e638b4605aae
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/CapabilityPropertiesInner.java
@@ -0,0 +1,191 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.FastProvisioningEditionCapability;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.FlexibleServerEditionCapability;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.HyperscaleNodeEditionCapability;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Location capabilities. */
+@Immutable
+public final class CapabilityPropertiesInner {
+ /*
+ * zone name
+ */
+ @JsonProperty(value = "zone", access = JsonProperty.Access.WRITE_ONLY)
+ private String zone;
+
+ /*
+ * Supported high availability mode
+ */
+ @JsonProperty(value = "supportedHAMode", access = JsonProperty.Access.WRITE_ONLY)
+ private List supportedHAMode;
+
+ /*
+ * A value indicating whether a new server in this region can have geo-backups to paired region.
+ */
+ @JsonProperty(value = "geoBackupSupported", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean geoBackupSupported;
+
+ /*
+ * A value indicating whether a new server in this region can support multi zone HA.
+ */
+ @JsonProperty(value = "zoneRedundantHaSupported", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean zoneRedundantHaSupported;
+
+ /*
+ * A value indicating whether a new server in this region can have geo-backups to paired region.
+ */
+ @JsonProperty(value = "zoneRedundantHaAndGeoBackupSupported", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean zoneRedundantHaAndGeoBackupSupported;
+
+ /*
+ * The supportedFlexibleServerEditions property.
+ */
+ @JsonProperty(value = "supportedFlexibleServerEditions", access = JsonProperty.Access.WRITE_ONLY)
+ private List supportedFlexibleServerEditions;
+
+ /*
+ * The supportedHyperscaleNodeEditions property.
+ */
+ @JsonProperty(value = "supportedHyperscaleNodeEditions", access = JsonProperty.Access.WRITE_ONLY)
+ private List supportedHyperscaleNodeEditions;
+
+ /*
+ * A value indicating whether fast provisioning is supported in this region.
+ */
+ @JsonProperty(value = "fastProvisioningSupported", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean fastProvisioningSupported;
+
+ /*
+ * The supportedFastProvisioningEditions property.
+ */
+ @JsonProperty(value = "supportedFastProvisioningEditions", access = JsonProperty.Access.WRITE_ONLY)
+ private List supportedFastProvisioningEditions;
+
+ /*
+ * The status
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private String status;
+
+ /** Creates an instance of CapabilityPropertiesInner class. */
+ public CapabilityPropertiesInner() {
+ }
+
+ /**
+ * Get the zone property: zone name.
+ *
+ * @return the zone value.
+ */
+ public String zone() {
+ return this.zone;
+ }
+
+ /**
+ * Get the supportedHAMode property: Supported high availability mode.
+ *
+ * @return the supportedHAMode value.
+ */
+ public List supportedHAMode() {
+ return this.supportedHAMode;
+ }
+
+ /**
+ * Get the geoBackupSupported property: A value indicating whether a new server in this region can have geo-backups
+ * to paired region.
+ *
+ * @return the geoBackupSupported value.
+ */
+ public Boolean geoBackupSupported() {
+ return this.geoBackupSupported;
+ }
+
+ /**
+ * Get the zoneRedundantHaSupported property: A value indicating whether a new server in this region can support
+ * multi zone HA.
+ *
+ * @return the zoneRedundantHaSupported value.
+ */
+ public Boolean zoneRedundantHaSupported() {
+ return this.zoneRedundantHaSupported;
+ }
+
+ /**
+ * Get the zoneRedundantHaAndGeoBackupSupported property: A value indicating whether a new server in this region can
+ * have geo-backups to paired region.
+ *
+ * @return the zoneRedundantHaAndGeoBackupSupported value.
+ */
+ public Boolean zoneRedundantHaAndGeoBackupSupported() {
+ return this.zoneRedundantHaAndGeoBackupSupported;
+ }
+
+ /**
+ * Get the supportedFlexibleServerEditions property: The supportedFlexibleServerEditions property.
+ *
+ * @return the supportedFlexibleServerEditions value.
+ */
+ public List supportedFlexibleServerEditions() {
+ return this.supportedFlexibleServerEditions;
+ }
+
+ /**
+ * Get the supportedHyperscaleNodeEditions property: The supportedHyperscaleNodeEditions property.
+ *
+ * @return the supportedHyperscaleNodeEditions value.
+ */
+ public List supportedHyperscaleNodeEditions() {
+ return this.supportedHyperscaleNodeEditions;
+ }
+
+ /**
+ * Get the fastProvisioningSupported property: A value indicating whether fast provisioning is supported in this
+ * region.
+ *
+ * @return the fastProvisioningSupported value.
+ */
+ public Boolean fastProvisioningSupported() {
+ return this.fastProvisioningSupported;
+ }
+
+ /**
+ * Get the supportedFastProvisioningEditions property: The supportedFastProvisioningEditions property.
+ *
+ * @return the supportedFastProvisioningEditions value.
+ */
+ public List supportedFastProvisioningEditions() {
+ return this.supportedFastProvisioningEditions;
+ }
+
+ /**
+ * Get the status property: The status.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (supportedFlexibleServerEditions() != null) {
+ supportedFlexibleServerEditions().forEach(e -> e.validate());
+ }
+ if (supportedHyperscaleNodeEditions() != null) {
+ supportedHyperscaleNodeEditions().forEach(e -> e.validate());
+ }
+ if (supportedFastProvisioningEditions() != null) {
+ supportedFastProvisioningEditions().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ConfigurationInner.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ConfigurationInner.java
new file mode 100644
index 000000000000..f4c2376bc9a1
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ConfigurationInner.java
@@ -0,0 +1,187 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ConfigurationDataType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents a Configuration. */
+@Fluent
+public final class ConfigurationInner extends ProxyResource {
+ /*
+ * The properties of a configuration.
+ */
+ @JsonProperty(value = "properties")
+ private ConfigurationProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of ConfigurationInner class. */
+ public ConfigurationInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of a configuration.
+ *
+ * @return the innerProperties value.
+ */
+ private ConfigurationProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the value property: Value of the configuration.
+ *
+ * @return the value value.
+ */
+ public String value() {
+ return this.innerProperties() == null ? null : this.innerProperties().value();
+ }
+
+ /**
+ * Set the value property: Value of the configuration.
+ *
+ * @param value the value value to set.
+ * @return the ConfigurationInner object itself.
+ */
+ public ConfigurationInner withValue(String value) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ConfigurationProperties();
+ }
+ this.innerProperties().withValue(value);
+ return this;
+ }
+
+ /**
+ * Get the description property: Description of the configuration.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Get the defaultValue property: Default value of the configuration.
+ *
+ * @return the defaultValue value.
+ */
+ public String defaultValue() {
+ return this.innerProperties() == null ? null : this.innerProperties().defaultValue();
+ }
+
+ /**
+ * Get the dataType property: Data type of the configuration.
+ *
+ * @return the dataType value.
+ */
+ public ConfigurationDataType dataType() {
+ return this.innerProperties() == null ? null : this.innerProperties().dataType();
+ }
+
+ /**
+ * Get the allowedValues property: Allowed values of the configuration.
+ *
+ * @return the allowedValues value.
+ */
+ public String allowedValues() {
+ return this.innerProperties() == null ? null : this.innerProperties().allowedValues();
+ }
+
+ /**
+ * Get the source property: Source of the configuration.
+ *
+ * @return the source value.
+ */
+ public String source() {
+ return this.innerProperties() == null ? null : this.innerProperties().source();
+ }
+
+ /**
+ * Set the source property: Source of the configuration.
+ *
+ * @param source the source value to set.
+ * @return the ConfigurationInner object itself.
+ */
+ public ConfigurationInner withSource(String source) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ConfigurationProperties();
+ }
+ this.innerProperties().withSource(source);
+ return this;
+ }
+
+ /**
+ * Get the isDynamicConfig property: Configuration dynamic or static.
+ *
+ * @return the isDynamicConfig value.
+ */
+ public Boolean isDynamicConfig() {
+ return this.innerProperties() == null ? null : this.innerProperties().isDynamicConfig();
+ }
+
+ /**
+ * Get the isReadOnly property: Configuration read-only or not.
+ *
+ * @return the isReadOnly value.
+ */
+ public Boolean isReadOnly() {
+ return this.innerProperties() == null ? null : this.innerProperties().isReadOnly();
+ }
+
+ /**
+ * Get the isConfigPendingRestart property: Configuration is pending restart or not.
+ *
+ * @return the isConfigPendingRestart value.
+ */
+ public Boolean isConfigPendingRestart() {
+ return this.innerProperties() == null ? null : this.innerProperties().isConfigPendingRestart();
+ }
+
+ /**
+ * Get the unit property: Configuration unit.
+ *
+ * @return the unit value.
+ */
+ public String unit() {
+ return this.innerProperties() == null ? null : this.innerProperties().unit();
+ }
+
+ /**
+ * Get the documentationLink property: Configuration documentation link.
+ *
+ * @return the documentationLink value.
+ */
+ public String documentationLink() {
+ return this.innerProperties() == null ? null : this.innerProperties().documentationLink();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ConfigurationProperties.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ConfigurationProperties.java
new file mode 100644
index 000000000000..56f65da88753
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ConfigurationProperties.java
@@ -0,0 +1,212 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ConfigurationDataType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties of a configuration. */
+@Fluent
+public final class ConfigurationProperties {
+ /*
+ * Value of the configuration.
+ */
+ @JsonProperty(value = "value")
+ private String value;
+
+ /*
+ * Description of the configuration.
+ */
+ @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
+ private String description;
+
+ /*
+ * Default value of the configuration.
+ */
+ @JsonProperty(value = "defaultValue", access = JsonProperty.Access.WRITE_ONLY)
+ private String defaultValue;
+
+ /*
+ * Data type of the configuration.
+ */
+ @JsonProperty(value = "dataType", access = JsonProperty.Access.WRITE_ONLY)
+ private ConfigurationDataType dataType;
+
+ /*
+ * Allowed values of the configuration.
+ */
+ @JsonProperty(value = "allowedValues", access = JsonProperty.Access.WRITE_ONLY)
+ private String allowedValues;
+
+ /*
+ * Source of the configuration.
+ */
+ @JsonProperty(value = "source")
+ private String source;
+
+ /*
+ * Configuration dynamic or static.
+ */
+ @JsonProperty(value = "isDynamicConfig", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isDynamicConfig;
+
+ /*
+ * Configuration read-only or not.
+ */
+ @JsonProperty(value = "isReadOnly", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isReadOnly;
+
+ /*
+ * Configuration is pending restart or not.
+ */
+ @JsonProperty(value = "isConfigPendingRestart", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isConfigPendingRestart;
+
+ /*
+ * Configuration unit.
+ */
+ @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY)
+ private String unit;
+
+ /*
+ * Configuration documentation link.
+ */
+ @JsonProperty(value = "documentationLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String documentationLink;
+
+ /** Creates an instance of ConfigurationProperties class. */
+ public ConfigurationProperties() {
+ }
+
+ /**
+ * Get the value property: Value of the configuration.
+ *
+ * @return the value value.
+ */
+ public String value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Value of the configuration.
+ *
+ * @param value the value value to set.
+ * @return the ConfigurationProperties object itself.
+ */
+ public ConfigurationProperties withValue(String value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the description property: Description of the configuration.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Get the defaultValue property: Default value of the configuration.
+ *
+ * @return the defaultValue value.
+ */
+ public String defaultValue() {
+ return this.defaultValue;
+ }
+
+ /**
+ * Get the dataType property: Data type of the configuration.
+ *
+ * @return the dataType value.
+ */
+ public ConfigurationDataType dataType() {
+ return this.dataType;
+ }
+
+ /**
+ * Get the allowedValues property: Allowed values of the configuration.
+ *
+ * @return the allowedValues value.
+ */
+ public String allowedValues() {
+ return this.allowedValues;
+ }
+
+ /**
+ * Get the source property: Source of the configuration.
+ *
+ * @return the source value.
+ */
+ public String source() {
+ return this.source;
+ }
+
+ /**
+ * Set the source property: Source of the configuration.
+ *
+ * @param source the source value to set.
+ * @return the ConfigurationProperties object itself.
+ */
+ public ConfigurationProperties withSource(String source) {
+ this.source = source;
+ return this;
+ }
+
+ /**
+ * Get the isDynamicConfig property: Configuration dynamic or static.
+ *
+ * @return the isDynamicConfig value.
+ */
+ public Boolean isDynamicConfig() {
+ return this.isDynamicConfig;
+ }
+
+ /**
+ * Get the isReadOnly property: Configuration read-only or not.
+ *
+ * @return the isReadOnly value.
+ */
+ public Boolean isReadOnly() {
+ return this.isReadOnly;
+ }
+
+ /**
+ * Get the isConfigPendingRestart property: Configuration is pending restart or not.
+ *
+ * @return the isConfigPendingRestart value.
+ */
+ public Boolean isConfigPendingRestart() {
+ return this.isConfigPendingRestart;
+ }
+
+ /**
+ * Get the unit property: Configuration unit.
+ *
+ * @return the unit value.
+ */
+ public String unit() {
+ return this.unit;
+ }
+
+ /**
+ * Get the documentationLink property: Configuration documentation link.
+ *
+ * @return the documentationLink value.
+ */
+ public String documentationLink() {
+ return this.documentationLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/DatabaseInner.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/DatabaseInner.java
new file mode 100644
index 000000000000..c352f43a40d7
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/DatabaseInner.java
@@ -0,0 +1,105 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents a Database. */
+@Fluent
+public final class DatabaseInner extends ProxyResource {
+ /*
+ * The properties of a database.
+ */
+ @JsonProperty(value = "properties")
+ private DatabaseProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of DatabaseInner class. */
+ public DatabaseInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of a database.
+ *
+ * @return the innerProperties value.
+ */
+ private DatabaseProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the charset property: The charset of the database.
+ *
+ * @return the charset value.
+ */
+ public String charset() {
+ return this.innerProperties() == null ? null : this.innerProperties().charset();
+ }
+
+ /**
+ * Set the charset property: The charset of the database.
+ *
+ * @param charset the charset value to set.
+ * @return the DatabaseInner object itself.
+ */
+ public DatabaseInner withCharset(String charset) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DatabaseProperties();
+ }
+ this.innerProperties().withCharset(charset);
+ return this;
+ }
+
+ /**
+ * Get the collation property: The collation of the database.
+ *
+ * @return the collation value.
+ */
+ public String collation() {
+ return this.innerProperties() == null ? null : this.innerProperties().collation();
+ }
+
+ /**
+ * Set the collation property: The collation of the database.
+ *
+ * @param collation the collation value to set.
+ * @return the DatabaseInner object itself.
+ */
+ public DatabaseInner withCollation(String collation) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DatabaseProperties();
+ }
+ this.innerProperties().withCollation(collation);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/DatabaseProperties.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/DatabaseProperties.java
new file mode 100644
index 000000000000..491190630dfb
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/DatabaseProperties.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties of a database. */
+@Fluent
+public final class DatabaseProperties {
+ /*
+ * The charset of the database.
+ */
+ @JsonProperty(value = "charset")
+ private String charset;
+
+ /*
+ * The collation of the database.
+ */
+ @JsonProperty(value = "collation")
+ private String collation;
+
+ /** Creates an instance of DatabaseProperties class. */
+ public DatabaseProperties() {
+ }
+
+ /**
+ * Get the charset property: The charset of the database.
+ *
+ * @return the charset value.
+ */
+ public String charset() {
+ return this.charset;
+ }
+
+ /**
+ * Set the charset property: The charset of the database.
+ *
+ * @param charset the charset value to set.
+ * @return the DatabaseProperties object itself.
+ */
+ public DatabaseProperties withCharset(String charset) {
+ this.charset = charset;
+ return this;
+ }
+
+ /**
+ * Get the collation property: The collation of the database.
+ *
+ * @return the collation value.
+ */
+ public String collation() {
+ return this.collation;
+ }
+
+ /**
+ * Set the collation property: The collation of the database.
+ *
+ * @param collation the collation value to set.
+ * @return the DatabaseProperties object itself.
+ */
+ public DatabaseProperties withCollation(String collation) {
+ this.collation = collation;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/FirewallRuleInner.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/FirewallRuleInner.java
new file mode 100644
index 000000000000..b8dff329c012
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/FirewallRuleInner.java
@@ -0,0 +1,113 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents a server firewall rule. */
+@Fluent
+public final class FirewallRuleInner extends ProxyResource {
+ /*
+ * The properties of a firewall rule.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private FirewallRuleProperties innerProperties = new FirewallRuleProperties();
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of FirewallRuleInner class. */
+ public FirewallRuleInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of a firewall rule.
+ *
+ * @return the innerProperties value.
+ */
+ private FirewallRuleProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format.
+ *
+ * @return the startIpAddress value.
+ */
+ public String startIpAddress() {
+ return this.innerProperties() == null ? null : this.innerProperties().startIpAddress();
+ }
+
+ /**
+ * Set the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format.
+ *
+ * @param startIpAddress the startIpAddress value to set.
+ * @return the FirewallRuleInner object itself.
+ */
+ public FirewallRuleInner withStartIpAddress(String startIpAddress) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new FirewallRuleProperties();
+ }
+ this.innerProperties().withStartIpAddress(startIpAddress);
+ return this;
+ }
+
+ /**
+ * Get the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format.
+ *
+ * @return the endIpAddress value.
+ */
+ public String endIpAddress() {
+ return this.innerProperties() == null ? null : this.innerProperties().endIpAddress();
+ }
+
+ /**
+ * Set the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format.
+ *
+ * @param endIpAddress the endIpAddress value to set.
+ * @return the FirewallRuleInner object itself.
+ */
+ public FirewallRuleInner withEndIpAddress(String endIpAddress) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new FirewallRuleProperties();
+ }
+ this.innerProperties().withEndIpAddress(endIpAddress);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model FirewallRuleInner"));
+ } else {
+ innerProperties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(FirewallRuleInner.class);
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/FirewallRuleProperties.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/FirewallRuleProperties.java
new file mode 100644
index 000000000000..1ff3c9e53615
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/FirewallRuleProperties.java
@@ -0,0 +1,91 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties of a server firewall rule. */
+@Fluent
+public final class FirewallRuleProperties {
+ /*
+ * The start IP address of the server firewall rule. Must be IPv4 format.
+ */
+ @JsonProperty(value = "startIpAddress", required = true)
+ private String startIpAddress;
+
+ /*
+ * The end IP address of the server firewall rule. Must be IPv4 format.
+ */
+ @JsonProperty(value = "endIpAddress", required = true)
+ private String endIpAddress;
+
+ /** Creates an instance of FirewallRuleProperties class. */
+ public FirewallRuleProperties() {
+ }
+
+ /**
+ * Get the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format.
+ *
+ * @return the startIpAddress value.
+ */
+ public String startIpAddress() {
+ return this.startIpAddress;
+ }
+
+ /**
+ * Set the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format.
+ *
+ * @param startIpAddress the startIpAddress value to set.
+ * @return the FirewallRuleProperties object itself.
+ */
+ public FirewallRuleProperties withStartIpAddress(String startIpAddress) {
+ this.startIpAddress = startIpAddress;
+ return this;
+ }
+
+ /**
+ * Get the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format.
+ *
+ * @return the endIpAddress value.
+ */
+ public String endIpAddress() {
+ return this.endIpAddress;
+ }
+
+ /**
+ * Set the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format.
+ *
+ * @param endIpAddress the endIpAddress value to set.
+ * @return the FirewallRuleProperties object itself.
+ */
+ public FirewallRuleProperties withEndIpAddress(String endIpAddress) {
+ this.endIpAddress = endIpAddress;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (startIpAddress() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property startIpAddress in model FirewallRuleProperties"));
+ }
+ if (endIpAddress() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property endIpAddress in model FirewallRuleProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(FirewallRuleProperties.class);
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/NameAvailabilityInner.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/NameAvailabilityInner.java
new file mode 100644
index 000000000000..908d5beae915
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/NameAvailabilityInner.java
@@ -0,0 +1,79 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.CheckNameAvailabilityReason;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.CheckNameAvailabilityResponse;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents a resource name availability. */
+@Fluent
+public final class NameAvailabilityInner extends CheckNameAvailabilityResponse {
+ /*
+ * name of the PostgreSQL server.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * type of the server
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /** Creates an instance of NameAvailabilityInner class. */
+ public NameAvailabilityInner() {
+ }
+
+ /**
+ * Get the name property: name of the PostgreSQL server.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: type of the server.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public NameAvailabilityInner withNameAvailable(Boolean nameAvailable) {
+ super.withNameAvailable(nameAvailable);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public NameAvailabilityInner withReason(CheckNameAvailabilityReason reason) {
+ super.withReason(reason);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public NameAvailabilityInner withMessage(String message) {
+ super.withMessage(message);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/OperationListResultInner.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/OperationListResultInner.java
new file mode 100644
index 000000000000..113ae2bb8b73
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/OperationListResultInner.java
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.Operation;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A list of resource provider operations. */
+@Fluent
+public final class OperationListResultInner {
+ /*
+ * Collection of available operation details
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /*
+ * URL client should use to fetch the next page (per server side paging).
+ * It's null for now, added for future use.
+ */
+ @JsonProperty(value = "nextLink")
+ private String nextLink;
+
+ /** Creates an instance of OperationListResultInner class. */
+ public OperationListResultInner() {
+ }
+
+ /**
+ * Get the value property: Collection of available operation details.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Collection of available operation details.
+ *
+ * @param value the value value to set.
+ * @return the OperationListResultInner object itself.
+ */
+ public OperationListResultInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: URL client should use to fetch the next page (per server side paging). It's null for
+ * now, added for future use.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Set the nextLink property: URL client should use to fetch the next page (per server side paging). It's null for
+ * now, added for future use.
+ *
+ * @param nextLink the nextLink value to set.
+ * @return the OperationListResultInner object itself.
+ */
+ public OperationListResultInner withNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ServerBackupInner.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ServerBackupInner.java
new file mode 100644
index 000000000000..a082464704e3
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ServerBackupInner.java
@@ -0,0 +1,130 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.Origin;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Server backup properties. */
+@Fluent
+public final class ServerBackupInner extends ProxyResource {
+ /*
+ * The properties of a server backup.
+ */
+ @JsonProperty(value = "properties")
+ private ServerBackupProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of ServerBackupInner class. */
+ public ServerBackupInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of a server backup.
+ *
+ * @return the innerProperties value.
+ */
+ private ServerBackupProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the backupType property: Backup type.
+ *
+ * @return the backupType value.
+ */
+ public Origin backupType() {
+ return this.innerProperties() == null ? null : this.innerProperties().backupType();
+ }
+
+ /**
+ * Set the backupType property: Backup type.
+ *
+ * @param backupType the backupType value to set.
+ * @return the ServerBackupInner object itself.
+ */
+ public ServerBackupInner withBackupType(Origin backupType) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerBackupProperties();
+ }
+ this.innerProperties().withBackupType(backupType);
+ return this;
+ }
+
+ /**
+ * Get the completedTime property: Backup completed time (ISO8601 format).
+ *
+ * @return the completedTime value.
+ */
+ public OffsetDateTime completedTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().completedTime();
+ }
+
+ /**
+ * Set the completedTime property: Backup completed time (ISO8601 format).
+ *
+ * @param completedTime the completedTime value to set.
+ * @return the ServerBackupInner object itself.
+ */
+ public ServerBackupInner withCompletedTime(OffsetDateTime completedTime) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerBackupProperties();
+ }
+ this.innerProperties().withCompletedTime(completedTime);
+ return this;
+ }
+
+ /**
+ * Get the source property: Backup source.
+ *
+ * @return the source value.
+ */
+ public String source() {
+ return this.innerProperties() == null ? null : this.innerProperties().source();
+ }
+
+ /**
+ * Set the source property: Backup source.
+ *
+ * @param source the source value to set.
+ * @return the ServerBackupInner object itself.
+ */
+ public ServerBackupInner withSource(String source) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerBackupProperties();
+ }
+ this.innerProperties().withSource(source);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ServerBackupProperties.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ServerBackupProperties.java
new file mode 100644
index 000000000000..f2a28cf11f77
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ServerBackupProperties.java
@@ -0,0 +1,104 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.Origin;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** The properties of a server backup. */
+@Fluent
+public final class ServerBackupProperties {
+ /*
+ * Backup type.
+ */
+ @JsonProperty(value = "backupType")
+ private Origin backupType;
+
+ /*
+ * Backup completed time (ISO8601 format).
+ */
+ @JsonProperty(value = "completedTime")
+ private OffsetDateTime completedTime;
+
+ /*
+ * Backup source
+ */
+ @JsonProperty(value = "source")
+ private String source;
+
+ /** Creates an instance of ServerBackupProperties class. */
+ public ServerBackupProperties() {
+ }
+
+ /**
+ * Get the backupType property: Backup type.
+ *
+ * @return the backupType value.
+ */
+ public Origin backupType() {
+ return this.backupType;
+ }
+
+ /**
+ * Set the backupType property: Backup type.
+ *
+ * @param backupType the backupType value to set.
+ * @return the ServerBackupProperties object itself.
+ */
+ public ServerBackupProperties withBackupType(Origin backupType) {
+ this.backupType = backupType;
+ return this;
+ }
+
+ /**
+ * Get the completedTime property: Backup completed time (ISO8601 format).
+ *
+ * @return the completedTime value.
+ */
+ public OffsetDateTime completedTime() {
+ return this.completedTime;
+ }
+
+ /**
+ * Set the completedTime property: Backup completed time (ISO8601 format).
+ *
+ * @param completedTime the completedTime value to set.
+ * @return the ServerBackupProperties object itself.
+ */
+ public ServerBackupProperties withCompletedTime(OffsetDateTime completedTime) {
+ this.completedTime = completedTime;
+ return this;
+ }
+
+ /**
+ * Get the source property: Backup source.
+ *
+ * @return the source value.
+ */
+ public String source() {
+ return this.source;
+ }
+
+ /**
+ * Set the source property: Backup source.
+ *
+ * @param source the source value to set.
+ * @return the ServerBackupProperties object itself.
+ */
+ public ServerBackupProperties withSource(String source) {
+ this.source = source;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ServerInner.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ServerInner.java
new file mode 100644
index 000000000000..6cf80edcb972
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ServerInner.java
@@ -0,0 +1,537 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.AuthConfig;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.Backup;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.CreateMode;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.DataEncryption;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.HighAvailability;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.MaintenanceWindow;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.Network;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ReplicationRole;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ServerState;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ServerVersion;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.Sku;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.Storage;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.UserAssignedIdentity;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.Map;
+
+/** Represents a server. */
+@Fluent
+public final class ServerInner extends Resource {
+ /*
+ * The SKU (pricing tier) of the server.
+ */
+ @JsonProperty(value = "sku")
+ private Sku sku;
+
+ /*
+ * Describes the identity of the application.
+ */
+ @JsonProperty(value = "identity")
+ private UserAssignedIdentity identity;
+
+ /*
+ * Properties of the server.
+ */
+ @JsonProperty(value = "properties")
+ private ServerProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of ServerInner class. */
+ public ServerInner() {
+ }
+
+ /**
+ * Get the sku property: The SKU (pricing tier) of the server.
+ *
+ * @return the sku value.
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The SKU (pricing tier) of the server.
+ *
+ * @param sku the sku value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the identity property: Describes the identity of the application.
+ *
+ * @return the identity value.
+ */
+ public UserAssignedIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Describes the identity of the application.
+ *
+ * @param identity the identity value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withIdentity(UserAssignedIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the innerProperties property: Properties of the server.
+ *
+ * @return the innerProperties value.
+ */
+ private ServerProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ServerInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ServerInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the administratorLogin property: The administrator's login name of a server. Can only be specified when the
+ * server is being created (and is required for creation).
+ *
+ * @return the administratorLogin value.
+ */
+ public String administratorLogin() {
+ return this.innerProperties() == null ? null : this.innerProperties().administratorLogin();
+ }
+
+ /**
+ * Set the administratorLogin property: The administrator's login name of a server. Can only be specified when the
+ * server is being created (and is required for creation).
+ *
+ * @param administratorLogin the administratorLogin value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withAdministratorLogin(String administratorLogin) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withAdministratorLogin(administratorLogin);
+ return this;
+ }
+
+ /**
+ * Get the administratorLoginPassword property: The administrator login password (required for server creation).
+ *
+ * @return the administratorLoginPassword value.
+ */
+ public String administratorLoginPassword() {
+ return this.innerProperties() == null ? null : this.innerProperties().administratorLoginPassword();
+ }
+
+ /**
+ * Set the administratorLoginPassword property: The administrator login password (required for server creation).
+ *
+ * @param administratorLoginPassword the administratorLoginPassword value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withAdministratorLoginPassword(String administratorLoginPassword) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withAdministratorLoginPassword(administratorLoginPassword);
+ return this;
+ }
+
+ /**
+ * Get the version property: PostgreSQL Server version.
+ *
+ * @return the version value.
+ */
+ public ServerVersion version() {
+ return this.innerProperties() == null ? null : this.innerProperties().version();
+ }
+
+ /**
+ * Set the version property: PostgreSQL Server version.
+ *
+ * @param version the version value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withVersion(ServerVersion version) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withVersion(version);
+ return this;
+ }
+
+ /**
+ * Get the minorVersion property: The minor version of the server.
+ *
+ * @return the minorVersion value.
+ */
+ public String minorVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().minorVersion();
+ }
+
+ /**
+ * Get the state property: A state of a server that is visible to user.
+ *
+ * @return the state value.
+ */
+ public ServerState state() {
+ return this.innerProperties() == null ? null : this.innerProperties().state();
+ }
+
+ /**
+ * Get the fullyQualifiedDomainName property: The fully qualified domain name of a server.
+ *
+ * @return the fullyQualifiedDomainName value.
+ */
+ public String fullyQualifiedDomainName() {
+ return this.innerProperties() == null ? null : this.innerProperties().fullyQualifiedDomainName();
+ }
+
+ /**
+ * Get the storage property: Storage properties of a server.
+ *
+ * @return the storage value.
+ */
+ public Storage storage() {
+ return this.innerProperties() == null ? null : this.innerProperties().storage();
+ }
+
+ /**
+ * Set the storage property: Storage properties of a server.
+ *
+ * @param storage the storage value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withStorage(Storage storage) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withStorage(storage);
+ return this;
+ }
+
+ /**
+ * Get the authConfig property: AuthConfig properties of a server.
+ *
+ * @return the authConfig value.
+ */
+ public AuthConfig authConfig() {
+ return this.innerProperties() == null ? null : this.innerProperties().authConfig();
+ }
+
+ /**
+ * Set the authConfig property: AuthConfig properties of a server.
+ *
+ * @param authConfig the authConfig value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withAuthConfig(AuthConfig authConfig) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withAuthConfig(authConfig);
+ return this;
+ }
+
+ /**
+ * Get the dataEncryption property: Data encryption properties of a server.
+ *
+ * @return the dataEncryption value.
+ */
+ public DataEncryption dataEncryption() {
+ return this.innerProperties() == null ? null : this.innerProperties().dataEncryption();
+ }
+
+ /**
+ * Set the dataEncryption property: Data encryption properties of a server.
+ *
+ * @param dataEncryption the dataEncryption value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withDataEncryption(DataEncryption dataEncryption) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withDataEncryption(dataEncryption);
+ return this;
+ }
+
+ /**
+ * Get the backup property: Backup properties of a server.
+ *
+ * @return the backup value.
+ */
+ public Backup backup() {
+ return this.innerProperties() == null ? null : this.innerProperties().backup();
+ }
+
+ /**
+ * Set the backup property: Backup properties of a server.
+ *
+ * @param backup the backup value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withBackup(Backup backup) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withBackup(backup);
+ return this;
+ }
+
+ /**
+ * Get the network property: Network properties of a server. This Network property is required to be passed only in
+ * case you want the server to be Private access server.
+ *
+ * @return the network value.
+ */
+ public Network network() {
+ return this.innerProperties() == null ? null : this.innerProperties().network();
+ }
+
+ /**
+ * Set the network property: Network properties of a server. This Network property is required to be passed only in
+ * case you want the server to be Private access server.
+ *
+ * @param network the network value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withNetwork(Network network) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withNetwork(network);
+ return this;
+ }
+
+ /**
+ * Get the highAvailability property: High availability properties of a server.
+ *
+ * @return the highAvailability value.
+ */
+ public HighAvailability highAvailability() {
+ return this.innerProperties() == null ? null : this.innerProperties().highAvailability();
+ }
+
+ /**
+ * Set the highAvailability property: High availability properties of a server.
+ *
+ * @param highAvailability the highAvailability value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withHighAvailability(HighAvailability highAvailability) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withHighAvailability(highAvailability);
+ return this;
+ }
+
+ /**
+ * Get the maintenanceWindow property: Maintenance window properties of a server.
+ *
+ * @return the maintenanceWindow value.
+ */
+ public MaintenanceWindow maintenanceWindow() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenanceWindow();
+ }
+
+ /**
+ * Set the maintenanceWindow property: Maintenance window properties of a server.
+ *
+ * @param maintenanceWindow the maintenanceWindow value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withMaintenanceWindow(maintenanceWindow);
+ return this;
+ }
+
+ /**
+ * Get the sourceServerResourceId property: The source server resource ID to restore from. It's required when
+ * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica'. This property is returned only for Replica
+ * server.
+ *
+ * @return the sourceServerResourceId value.
+ */
+ public String sourceServerResourceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().sourceServerResourceId();
+ }
+
+ /**
+ * Set the sourceServerResourceId property: The source server resource ID to restore from. It's required when
+ * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica'. This property is returned only for Replica
+ * server.
+ *
+ * @param sourceServerResourceId the sourceServerResourceId value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withSourceServerResourceId(String sourceServerResourceId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withSourceServerResourceId(sourceServerResourceId);
+ return this;
+ }
+
+ /**
+ * Get the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time to restore
+ * from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore'.
+ *
+ * @return the pointInTimeUtc value.
+ */
+ public OffsetDateTime pointInTimeUtc() {
+ return this.innerProperties() == null ? null : this.innerProperties().pointInTimeUtc();
+ }
+
+ /**
+ * Set the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time to restore
+ * from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore'.
+ *
+ * @param pointInTimeUtc the pointInTimeUtc value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withPointInTimeUtc(OffsetDateTime pointInTimeUtc) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withPointInTimeUtc(pointInTimeUtc);
+ return this;
+ }
+
+ /**
+ * Get the availabilityZone property: availability zone information of the server.
+ *
+ * @return the availabilityZone value.
+ */
+ public String availabilityZone() {
+ return this.innerProperties() == null ? null : this.innerProperties().availabilityZone();
+ }
+
+ /**
+ * Set the availabilityZone property: availability zone information of the server.
+ *
+ * @param availabilityZone the availabilityZone value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withAvailabilityZone(String availabilityZone) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withAvailabilityZone(availabilityZone);
+ return this;
+ }
+
+ /**
+ * Get the replicationRole property: Replication role of the server.
+ *
+ * @return the replicationRole value.
+ */
+ public ReplicationRole replicationRole() {
+ return this.innerProperties() == null ? null : this.innerProperties().replicationRole();
+ }
+
+ /**
+ * Set the replicationRole property: Replication role of the server.
+ *
+ * @param replicationRole the replicationRole value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withReplicationRole(ReplicationRole replicationRole) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withReplicationRole(replicationRole);
+ return this;
+ }
+
+ /**
+ * Get the replicaCapacity property: Replicas allowed for a server.
+ *
+ * @return the replicaCapacity value.
+ */
+ public Integer replicaCapacity() {
+ return this.innerProperties() == null ? null : this.innerProperties().replicaCapacity();
+ }
+
+ /**
+ * Get the createMode property: The mode to create a new PostgreSQL server.
+ *
+ * @return the createMode value.
+ */
+ public CreateMode createMode() {
+ return this.innerProperties() == null ? null : this.innerProperties().createMode();
+ }
+
+ /**
+ * Set the createMode property: The mode to create a new PostgreSQL server.
+ *
+ * @param createMode the createMode value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withCreateMode(CreateMode createMode) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withCreateMode(createMode);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (sku() != null) {
+ sku().validate();
+ }
+ if (identity() != null) {
+ identity().validate();
+ }
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ServerProperties.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ServerProperties.java
new file mode 100644
index 000000000000..92220a70494d
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ServerProperties.java
@@ -0,0 +1,521 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.AuthConfig;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.Backup;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.CreateMode;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.DataEncryption;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.HighAvailability;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.MaintenanceWindow;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.Network;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ReplicationRole;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ServerState;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ServerVersion;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.Storage;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** The properties of a server. */
+@Fluent
+public final class ServerProperties {
+ /*
+ * The administrator's login name of a server. Can only be specified when the server is being created (and is
+ * required for creation).
+ */
+ @JsonProperty(value = "administratorLogin")
+ private String administratorLogin;
+
+ /*
+ * The administrator login password (required for server creation).
+ */
+ @JsonProperty(value = "administratorLoginPassword")
+ private String administratorLoginPassword;
+
+ /*
+ * PostgreSQL Server version.
+ */
+ @JsonProperty(value = "version")
+ private ServerVersion version;
+
+ /*
+ * The minor version of the server.
+ */
+ @JsonProperty(value = "minorVersion", access = JsonProperty.Access.WRITE_ONLY)
+ private String minorVersion;
+
+ /*
+ * A state of a server that is visible to user.
+ */
+ @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
+ private ServerState state;
+
+ /*
+ * The fully qualified domain name of a server.
+ */
+ @JsonProperty(value = "fullyQualifiedDomainName", access = JsonProperty.Access.WRITE_ONLY)
+ private String fullyQualifiedDomainName;
+
+ /*
+ * Storage properties of a server.
+ */
+ @JsonProperty(value = "storage")
+ private Storage storage;
+
+ /*
+ * AuthConfig properties of a server.
+ */
+ @JsonProperty(value = "authConfig")
+ private AuthConfig authConfig;
+
+ /*
+ * Data encryption properties of a server.
+ */
+ @JsonProperty(value = "dataEncryption")
+ private DataEncryption dataEncryption;
+
+ /*
+ * Backup properties of a server.
+ */
+ @JsonProperty(value = "backup")
+ private Backup backup;
+
+ /*
+ * Network properties of a server. This Network property is required to be passed only in case you want the server
+ * to be Private access server.
+ */
+ @JsonProperty(value = "network")
+ private Network network;
+
+ /*
+ * High availability properties of a server.
+ */
+ @JsonProperty(value = "highAvailability")
+ private HighAvailability highAvailability;
+
+ /*
+ * Maintenance window properties of a server.
+ */
+ @JsonProperty(value = "maintenanceWindow")
+ private MaintenanceWindow maintenanceWindow;
+
+ /*
+ * The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore' or
+ * 'GeoRestore' or 'Replica'. This property is returned only for Replica server
+ */
+ @JsonProperty(value = "sourceServerResourceId")
+ private String sourceServerResourceId;
+
+ /*
+ * Restore point creation time (ISO8601 format), specifying the time to restore from. It's required when
+ * 'createMode' is 'PointInTimeRestore' or 'GeoRestore'.
+ */
+ @JsonProperty(value = "pointInTimeUTC")
+ private OffsetDateTime pointInTimeUtc;
+
+ /*
+ * availability zone information of the server.
+ */
+ @JsonProperty(value = "availabilityZone")
+ private String availabilityZone;
+
+ /*
+ * Replication role of the server
+ */
+ @JsonProperty(value = "replicationRole")
+ private ReplicationRole replicationRole;
+
+ /*
+ * Replicas allowed for a server.
+ */
+ @JsonProperty(value = "replicaCapacity", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer replicaCapacity;
+
+ /*
+ * The mode to create a new PostgreSQL server.
+ */
+ @JsonProperty(value = "createMode")
+ private CreateMode createMode;
+
+ /** Creates an instance of ServerProperties class. */
+ public ServerProperties() {
+ }
+
+ /**
+ * Get the administratorLogin property: The administrator's login name of a server. Can only be specified when the
+ * server is being created (and is required for creation).
+ *
+ * @return the administratorLogin value.
+ */
+ public String administratorLogin() {
+ return this.administratorLogin;
+ }
+
+ /**
+ * Set the administratorLogin property: The administrator's login name of a server. Can only be specified when the
+ * server is being created (and is required for creation).
+ *
+ * @param administratorLogin the administratorLogin value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withAdministratorLogin(String administratorLogin) {
+ this.administratorLogin = administratorLogin;
+ return this;
+ }
+
+ /**
+ * Get the administratorLoginPassword property: The administrator login password (required for server creation).
+ *
+ * @return the administratorLoginPassword value.
+ */
+ public String administratorLoginPassword() {
+ return this.administratorLoginPassword;
+ }
+
+ /**
+ * Set the administratorLoginPassword property: The administrator login password (required for server creation).
+ *
+ * @param administratorLoginPassword the administratorLoginPassword value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withAdministratorLoginPassword(String administratorLoginPassword) {
+ this.administratorLoginPassword = administratorLoginPassword;
+ return this;
+ }
+
+ /**
+ * Get the version property: PostgreSQL Server version.
+ *
+ * @return the version value.
+ */
+ public ServerVersion version() {
+ return this.version;
+ }
+
+ /**
+ * Set the version property: PostgreSQL Server version.
+ *
+ * @param version the version value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withVersion(ServerVersion version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Get the minorVersion property: The minor version of the server.
+ *
+ * @return the minorVersion value.
+ */
+ public String minorVersion() {
+ return this.minorVersion;
+ }
+
+ /**
+ * Get the state property: A state of a server that is visible to user.
+ *
+ * @return the state value.
+ */
+ public ServerState state() {
+ return this.state;
+ }
+
+ /**
+ * Get the fullyQualifiedDomainName property: The fully qualified domain name of a server.
+ *
+ * @return the fullyQualifiedDomainName value.
+ */
+ public String fullyQualifiedDomainName() {
+ return this.fullyQualifiedDomainName;
+ }
+
+ /**
+ * Get the storage property: Storage properties of a server.
+ *
+ * @return the storage value.
+ */
+ public Storage storage() {
+ return this.storage;
+ }
+
+ /**
+ * Set the storage property: Storage properties of a server.
+ *
+ * @param storage the storage value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withStorage(Storage storage) {
+ this.storage = storage;
+ return this;
+ }
+
+ /**
+ * Get the authConfig property: AuthConfig properties of a server.
+ *
+ * @return the authConfig value.
+ */
+ public AuthConfig authConfig() {
+ return this.authConfig;
+ }
+
+ /**
+ * Set the authConfig property: AuthConfig properties of a server.
+ *
+ * @param authConfig the authConfig value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withAuthConfig(AuthConfig authConfig) {
+ this.authConfig = authConfig;
+ return this;
+ }
+
+ /**
+ * Get the dataEncryption property: Data encryption properties of a server.
+ *
+ * @return the dataEncryption value.
+ */
+ public DataEncryption dataEncryption() {
+ return this.dataEncryption;
+ }
+
+ /**
+ * Set the dataEncryption property: Data encryption properties of a server.
+ *
+ * @param dataEncryption the dataEncryption value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withDataEncryption(DataEncryption dataEncryption) {
+ this.dataEncryption = dataEncryption;
+ return this;
+ }
+
+ /**
+ * Get the backup property: Backup properties of a server.
+ *
+ * @return the backup value.
+ */
+ public Backup backup() {
+ return this.backup;
+ }
+
+ /**
+ * Set the backup property: Backup properties of a server.
+ *
+ * @param backup the backup value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withBackup(Backup backup) {
+ this.backup = backup;
+ return this;
+ }
+
+ /**
+ * Get the network property: Network properties of a server. This Network property is required to be passed only in
+ * case you want the server to be Private access server.
+ *
+ * @return the network value.
+ */
+ public Network network() {
+ return this.network;
+ }
+
+ /**
+ * Set the network property: Network properties of a server. This Network property is required to be passed only in
+ * case you want the server to be Private access server.
+ *
+ * @param network the network value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withNetwork(Network network) {
+ this.network = network;
+ return this;
+ }
+
+ /**
+ * Get the highAvailability property: High availability properties of a server.
+ *
+ * @return the highAvailability value.
+ */
+ public HighAvailability highAvailability() {
+ return this.highAvailability;
+ }
+
+ /**
+ * Set the highAvailability property: High availability properties of a server.
+ *
+ * @param highAvailability the highAvailability value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withHighAvailability(HighAvailability highAvailability) {
+ this.highAvailability = highAvailability;
+ return this;
+ }
+
+ /**
+ * Get the maintenanceWindow property: Maintenance window properties of a server.
+ *
+ * @return the maintenanceWindow value.
+ */
+ public MaintenanceWindow maintenanceWindow() {
+ return this.maintenanceWindow;
+ }
+
+ /**
+ * Set the maintenanceWindow property: Maintenance window properties of a server.
+ *
+ * @param maintenanceWindow the maintenanceWindow value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
+ this.maintenanceWindow = maintenanceWindow;
+ return this;
+ }
+
+ /**
+ * Get the sourceServerResourceId property: The source server resource ID to restore from. It's required when
+ * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica'. This property is returned only for Replica
+ * server.
+ *
+ * @return the sourceServerResourceId value.
+ */
+ public String sourceServerResourceId() {
+ return this.sourceServerResourceId;
+ }
+
+ /**
+ * Set the sourceServerResourceId property: The source server resource ID to restore from. It's required when
+ * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica'. This property is returned only for Replica
+ * server.
+ *
+ * @param sourceServerResourceId the sourceServerResourceId value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withSourceServerResourceId(String sourceServerResourceId) {
+ this.sourceServerResourceId = sourceServerResourceId;
+ return this;
+ }
+
+ /**
+ * Get the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time to restore
+ * from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore'.
+ *
+ * @return the pointInTimeUtc value.
+ */
+ public OffsetDateTime pointInTimeUtc() {
+ return this.pointInTimeUtc;
+ }
+
+ /**
+ * Set the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time to restore
+ * from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore'.
+ *
+ * @param pointInTimeUtc the pointInTimeUtc value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withPointInTimeUtc(OffsetDateTime pointInTimeUtc) {
+ this.pointInTimeUtc = pointInTimeUtc;
+ return this;
+ }
+
+ /**
+ * Get the availabilityZone property: availability zone information of the server.
+ *
+ * @return the availabilityZone value.
+ */
+ public String availabilityZone() {
+ return this.availabilityZone;
+ }
+
+ /**
+ * Set the availabilityZone property: availability zone information of the server.
+ *
+ * @param availabilityZone the availabilityZone value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withAvailabilityZone(String availabilityZone) {
+ this.availabilityZone = availabilityZone;
+ return this;
+ }
+
+ /**
+ * Get the replicationRole property: Replication role of the server.
+ *
+ * @return the replicationRole value.
+ */
+ public ReplicationRole replicationRole() {
+ return this.replicationRole;
+ }
+
+ /**
+ * Set the replicationRole property: Replication role of the server.
+ *
+ * @param replicationRole the replicationRole value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withReplicationRole(ReplicationRole replicationRole) {
+ this.replicationRole = replicationRole;
+ return this;
+ }
+
+ /**
+ * Get the replicaCapacity property: Replicas allowed for a server.
+ *
+ * @return the replicaCapacity value.
+ */
+ public Integer replicaCapacity() {
+ return this.replicaCapacity;
+ }
+
+ /**
+ * Get the createMode property: The mode to create a new PostgreSQL server.
+ *
+ * @return the createMode value.
+ */
+ public CreateMode createMode() {
+ return this.createMode;
+ }
+
+ /**
+ * Set the createMode property: The mode to create a new PostgreSQL server.
+ *
+ * @param createMode the createMode value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withCreateMode(CreateMode createMode) {
+ this.createMode = createMode;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (storage() != null) {
+ storage().validate();
+ }
+ if (authConfig() != null) {
+ authConfig().validate();
+ }
+ if (dataEncryption() != null) {
+ dataEncryption().validate();
+ }
+ if (backup() != null) {
+ backup().validate();
+ }
+ if (network() != null) {
+ network().validate();
+ }
+ if (highAvailability() != null) {
+ highAvailability().validate();
+ }
+ if (maintenanceWindow() != null) {
+ maintenanceWindow().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java
new file mode 100644
index 000000000000..8eb84c103f5a
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java
@@ -0,0 +1,344 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.AuthConfig;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.Backup;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.CreateModeForUpdate;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.DataEncryption;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.HighAvailability;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.MaintenanceWindow;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.Network;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ReplicationRole;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ServerVersion;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.Storage;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The ServerPropertiesForUpdate model. */
+@Fluent
+public final class ServerPropertiesForUpdate {
+ /*
+ * The password of the administrator login.
+ */
+ @JsonProperty(value = "administratorLoginPassword")
+ private String administratorLoginPassword;
+
+ /*
+ * PostgreSQL Server version.
+ */
+ @JsonProperty(value = "version")
+ private ServerVersion version;
+
+ /*
+ * Storage properties of a server.
+ */
+ @JsonProperty(value = "storage")
+ private Storage storage;
+
+ /*
+ * Backup properties of a server.
+ */
+ @JsonProperty(value = "backup")
+ private Backup backup;
+
+ /*
+ * High availability properties of a server.
+ */
+ @JsonProperty(value = "highAvailability")
+ private HighAvailability highAvailability;
+
+ /*
+ * Maintenance window properties of a server.
+ */
+ @JsonProperty(value = "maintenanceWindow")
+ private MaintenanceWindow maintenanceWindow;
+
+ /*
+ * AuthConfig properties of a server.
+ */
+ @JsonProperty(value = "authConfig")
+ private AuthConfig authConfig;
+
+ /*
+ * Data encryption properties of a server.
+ */
+ @JsonProperty(value = "dataEncryption")
+ private DataEncryption dataEncryption;
+
+ /*
+ * The mode to update a new PostgreSQL server.
+ */
+ @JsonProperty(value = "createMode")
+ private CreateModeForUpdate createMode;
+
+ /*
+ * Replication role of the server
+ */
+ @JsonProperty(value = "replicationRole")
+ private ReplicationRole replicationRole;
+
+ /*
+ * Network properties of a server. These are required to be passed only in case if server is a private access
+ * server.
+ */
+ @JsonProperty(value = "network")
+ private Network network;
+
+ /** Creates an instance of ServerPropertiesForUpdate class. */
+ public ServerPropertiesForUpdate() {
+ }
+
+ /**
+ * Get the administratorLoginPassword property: The password of the administrator login.
+ *
+ * @return the administratorLoginPassword value.
+ */
+ public String administratorLoginPassword() {
+ return this.administratorLoginPassword;
+ }
+
+ /**
+ * Set the administratorLoginPassword property: The password of the administrator login.
+ *
+ * @param administratorLoginPassword the administratorLoginPassword value to set.
+ * @return the ServerPropertiesForUpdate object itself.
+ */
+ public ServerPropertiesForUpdate withAdministratorLoginPassword(String administratorLoginPassword) {
+ this.administratorLoginPassword = administratorLoginPassword;
+ return this;
+ }
+
+ /**
+ * Get the version property: PostgreSQL Server version.
+ *
+ * @return the version value.
+ */
+ public ServerVersion version() {
+ return this.version;
+ }
+
+ /**
+ * Set the version property: PostgreSQL Server version.
+ *
+ * @param version the version value to set.
+ * @return the ServerPropertiesForUpdate object itself.
+ */
+ public ServerPropertiesForUpdate withVersion(ServerVersion version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Get the storage property: Storage properties of a server.
+ *
+ * @return the storage value.
+ */
+ public Storage storage() {
+ return this.storage;
+ }
+
+ /**
+ * Set the storage property: Storage properties of a server.
+ *
+ * @param storage the storage value to set.
+ * @return the ServerPropertiesForUpdate object itself.
+ */
+ public ServerPropertiesForUpdate withStorage(Storage storage) {
+ this.storage = storage;
+ return this;
+ }
+
+ /**
+ * Get the backup property: Backup properties of a server.
+ *
+ * @return the backup value.
+ */
+ public Backup backup() {
+ return this.backup;
+ }
+
+ /**
+ * Set the backup property: Backup properties of a server.
+ *
+ * @param backup the backup value to set.
+ * @return the ServerPropertiesForUpdate object itself.
+ */
+ public ServerPropertiesForUpdate withBackup(Backup backup) {
+ this.backup = backup;
+ return this;
+ }
+
+ /**
+ * Get the highAvailability property: High availability properties of a server.
+ *
+ * @return the highAvailability value.
+ */
+ public HighAvailability highAvailability() {
+ return this.highAvailability;
+ }
+
+ /**
+ * Set the highAvailability property: High availability properties of a server.
+ *
+ * @param highAvailability the highAvailability value to set.
+ * @return the ServerPropertiesForUpdate object itself.
+ */
+ public ServerPropertiesForUpdate withHighAvailability(HighAvailability highAvailability) {
+ this.highAvailability = highAvailability;
+ return this;
+ }
+
+ /**
+ * Get the maintenanceWindow property: Maintenance window properties of a server.
+ *
+ * @return the maintenanceWindow value.
+ */
+ public MaintenanceWindow maintenanceWindow() {
+ return this.maintenanceWindow;
+ }
+
+ /**
+ * Set the maintenanceWindow property: Maintenance window properties of a server.
+ *
+ * @param maintenanceWindow the maintenanceWindow value to set.
+ * @return the ServerPropertiesForUpdate object itself.
+ */
+ public ServerPropertiesForUpdate withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
+ this.maintenanceWindow = maintenanceWindow;
+ return this;
+ }
+
+ /**
+ * Get the authConfig property: AuthConfig properties of a server.
+ *
+ * @return the authConfig value.
+ */
+ public AuthConfig authConfig() {
+ return this.authConfig;
+ }
+
+ /**
+ * Set the authConfig property: AuthConfig properties of a server.
+ *
+ * @param authConfig the authConfig value to set.
+ * @return the ServerPropertiesForUpdate object itself.
+ */
+ public ServerPropertiesForUpdate withAuthConfig(AuthConfig authConfig) {
+ this.authConfig = authConfig;
+ return this;
+ }
+
+ /**
+ * Get the dataEncryption property: Data encryption properties of a server.
+ *
+ * @return the dataEncryption value.
+ */
+ public DataEncryption dataEncryption() {
+ return this.dataEncryption;
+ }
+
+ /**
+ * Set the dataEncryption property: Data encryption properties of a server.
+ *
+ * @param dataEncryption the dataEncryption value to set.
+ * @return the ServerPropertiesForUpdate object itself.
+ */
+ public ServerPropertiesForUpdate withDataEncryption(DataEncryption dataEncryption) {
+ this.dataEncryption = dataEncryption;
+ return this;
+ }
+
+ /**
+ * Get the createMode property: The mode to update a new PostgreSQL server.
+ *
+ * @return the createMode value.
+ */
+ public CreateModeForUpdate createMode() {
+ return this.createMode;
+ }
+
+ /**
+ * Set the createMode property: The mode to update a new PostgreSQL server.
+ *
+ * @param createMode the createMode value to set.
+ * @return the ServerPropertiesForUpdate object itself.
+ */
+ public ServerPropertiesForUpdate withCreateMode(CreateModeForUpdate createMode) {
+ this.createMode = createMode;
+ return this;
+ }
+
+ /**
+ * Get the replicationRole property: Replication role of the server.
+ *
+ * @return the replicationRole value.
+ */
+ public ReplicationRole replicationRole() {
+ return this.replicationRole;
+ }
+
+ /**
+ * Set the replicationRole property: Replication role of the server.
+ *
+ * @param replicationRole the replicationRole value to set.
+ * @return the ServerPropertiesForUpdate object itself.
+ */
+ public ServerPropertiesForUpdate withReplicationRole(ReplicationRole replicationRole) {
+ this.replicationRole = replicationRole;
+ return this;
+ }
+
+ /**
+ * Get the network property: Network properties of a server. These are required to be passed only in case if server
+ * is a private access server.
+ *
+ * @return the network value.
+ */
+ public Network network() {
+ return this.network;
+ }
+
+ /**
+ * Set the network property: Network properties of a server. These are required to be passed only in case if server
+ * is a private access server.
+ *
+ * @param network the network value to set.
+ * @return the ServerPropertiesForUpdate object itself.
+ */
+ public ServerPropertiesForUpdate withNetwork(Network network) {
+ this.network = network;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (storage() != null) {
+ storage().validate();
+ }
+ if (backup() != null) {
+ backup().validate();
+ }
+ if (highAvailability() != null) {
+ highAvailability().validate();
+ }
+ if (maintenanceWindow() != null) {
+ maintenanceWindow().validate();
+ }
+ if (authConfig() != null) {
+ authConfig().validate();
+ }
+ if (dataEncryption() != null) {
+ dataEncryption().validate();
+ }
+ if (network() != null) {
+ network().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java
new file mode 100644
index 000000000000..711294526205
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.DelegatedSubnetUsage;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Virtual network subnet usage data. */
+@Immutable
+public final class VirtualNetworkSubnetUsageResultInner {
+ /*
+ * The delegatedSubnetsUsage property.
+ */
+ @JsonProperty(value = "delegatedSubnetsUsage", access = JsonProperty.Access.WRITE_ONLY)
+ private List delegatedSubnetsUsage;
+
+ /*
+ * location of the delegated subnet usage
+ */
+ @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY)
+ private String location;
+
+ /*
+ * subscriptionId of the delegated subnet usage
+ */
+ @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String subscriptionId;
+
+ /** Creates an instance of VirtualNetworkSubnetUsageResultInner class. */
+ public VirtualNetworkSubnetUsageResultInner() {
+ }
+
+ /**
+ * Get the delegatedSubnetsUsage property: The delegatedSubnetsUsage property.
+ *
+ * @return the delegatedSubnetsUsage value.
+ */
+ public List delegatedSubnetsUsage() {
+ return this.delegatedSubnetsUsage;
+ }
+
+ /**
+ * Get the location property: location of the delegated subnet usage.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Get the subscriptionId property: subscriptionId of the delegated subnet usage.
+ *
+ * @return the subscriptionId value.
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (delegatedSubnetsUsage() != null) {
+ delegatedSubnetsUsage().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/package-info.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/package-info.java
new file mode 100644
index 000000000000..c29098d38b47
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/models/package-info.java
@@ -0,0 +1,10 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for PostgreSqlManagementClient. The Microsoft Azure management API provides
+ * create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall
+ * rules, VNET rules, security alert policies, log files and configurations with new business model.
+ */
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models;
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/package-info.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/package-info.java
new file mode 100644
index 000000000000..818e13f97e5f
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/fluent/package-info.java
@@ -0,0 +1,10 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for PostgreSqlManagementClient. The Microsoft Azure management API provides
+ * create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall
+ * rules, VNET rules, security alert policies, log files and configurations with new business model.
+ */
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent;
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/ActiveDirectoryAdministratorImpl.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/ActiveDirectoryAdministratorImpl.java
new file mode 100644
index 000000000000..3f3a436c5cd2
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/ActiveDirectoryAdministratorImpl.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ActiveDirectoryAdministrator;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ActiveDirectoryAdministratorAdd;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.PrincipalType;
+
+public final class ActiveDirectoryAdministratorImpl
+ implements ActiveDirectoryAdministrator, ActiveDirectoryAdministrator.Definition {
+ private ActiveDirectoryAdministratorInner innerObject;
+
+ private final com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.PostgreSqlManager
+ serviceManager;
+
+ ActiveDirectoryAdministratorImpl(
+ ActiveDirectoryAdministratorInner innerObject,
+ com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.PostgreSqlManager
+ serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public PrincipalType principalType() {
+ return this.innerModel().principalType();
+ }
+
+ public String principalName() {
+ return this.innerModel().principalName();
+ }
+
+ public String objectId() {
+ return this.innerModel().objectId();
+ }
+
+ public String tenantId() {
+ return this.innerModel().tenantId();
+ }
+
+ public ActiveDirectoryAdministratorInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.PostgreSqlManager
+ manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String serverName;
+
+ private String objectId;
+
+ private ActiveDirectoryAdministratorAdd createParameters;
+
+ public ActiveDirectoryAdministratorImpl withExistingFlexibleServer(String resourceGroupName, String serverName) {
+ this.resourceGroupName = resourceGroupName;
+ this.serverName = serverName;
+ return this;
+ }
+
+ public ActiveDirectoryAdministrator create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAdministrators()
+ .create(resourceGroupName, serverName, objectId, createParameters, Context.NONE);
+ return this;
+ }
+
+ public ActiveDirectoryAdministrator create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAdministrators()
+ .create(resourceGroupName, serverName, objectId, createParameters, context);
+ return this;
+ }
+
+ ActiveDirectoryAdministratorImpl(
+ String name,
+ com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.PostgreSqlManager
+ serviceManager) {
+ this.innerObject = new ActiveDirectoryAdministratorInner();
+ this.serviceManager = serviceManager;
+ this.objectId = name;
+ this.createParameters = new ActiveDirectoryAdministratorAdd();
+ }
+
+ public ActiveDirectoryAdministrator refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAdministrators()
+ .getWithResponse(resourceGroupName, serverName, objectId, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ActiveDirectoryAdministrator refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAdministrators()
+ .getWithResponse(resourceGroupName, serverName, objectId, context)
+ .getValue();
+ return this;
+ }
+
+ public ActiveDirectoryAdministratorImpl withPrincipalType(PrincipalType principalType) {
+ this.createParameters.withPrincipalType(principalType);
+ return this;
+ }
+
+ public ActiveDirectoryAdministratorImpl withPrincipalName(String principalName) {
+ this.createParameters.withPrincipalName(principalName);
+ return this;
+ }
+
+ public ActiveDirectoryAdministratorImpl withTenantId(String tenantId) {
+ this.createParameters.withTenantId(tenantId);
+ return this;
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/AdministratorsClientImpl.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/AdministratorsClientImpl.java
new file mode 100644
index 000000000000..087d0c292eec
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/AdministratorsClientImpl.java
@@ -0,0 +1,1116 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.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.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.AdministratorsClient;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ActiveDirectoryAdministratorAdd;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.AdministratorListResult;
+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 AdministratorsClient. */
+public final class AdministratorsClientImpl implements AdministratorsClient {
+ /** The proxy service used to perform REST calls. */
+ private final AdministratorsService service;
+
+ /** The service client containing this operation class. */
+ private final PostgreSqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of AdministratorsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AdministratorsClientImpl(PostgreSqlManagementClientImpl client) {
+ this.service =
+ RestProxy.create(AdministratorsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PostgreSqlManagementClientAdministrators to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PostgreSqlManagement")
+ public interface AdministratorsService {
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}")
+ @ExpectedResponses({200, 201, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("objectId") String objectId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ActiveDirectoryAdministratorAdd parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("objectId") String objectId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("objectId") String objectId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByServer(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByServerNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents an Active Directory administrator along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono>> createWithResponseAsync(
+ String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (objectId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter objectId is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ objectId,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents an Active Directory administrator along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName,
+ String serverName,
+ String objectId,
+ ActiveDirectoryAdministratorAdd parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (objectId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter objectId is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ objectId,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of represents an Active Directory administrator.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux, ActiveDirectoryAdministratorInner>
+ beginCreateAsync(
+ String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters) {
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, serverName, objectId, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ActiveDirectoryAdministratorInner.class,
+ ActiveDirectoryAdministratorInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of represents an Active Directory administrator.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ActiveDirectoryAdministratorInner>
+ beginCreateAsync(
+ String resourceGroupName,
+ String serverName,
+ String objectId,
+ ActiveDirectoryAdministratorAdd parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, serverName, objectId, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ActiveDirectoryAdministratorInner.class,
+ ActiveDirectoryAdministratorInner.class,
+ context);
+ }
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents an Active Directory administrator.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ActiveDirectoryAdministratorInner> beginCreate(
+ String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters) {
+ return this.beginCreateAsync(resourceGroupName, serverName, objectId, parameters).getSyncPoller();
+ }
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents an Active Directory administrator.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ActiveDirectoryAdministratorInner> beginCreate(
+ String resourceGroupName,
+ String serverName,
+ String objectId,
+ ActiveDirectoryAdministratorAdd parameters,
+ Context context) {
+ return this.beginCreateAsync(resourceGroupName, serverName, objectId, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents an Active Directory administrator on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createAsync(
+ String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters) {
+ return beginCreateAsync(resourceGroupName, serverName, objectId, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents an Active Directory administrator on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName,
+ String serverName,
+ String objectId,
+ ActiveDirectoryAdministratorAdd parameters,
+ Context context) {
+ return beginCreateAsync(resourceGroupName, serverName, objectId, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents an Active Directory administrator.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ActiveDirectoryAdministratorInner create(
+ String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters) {
+ return createAsync(resourceGroupName, serverName, objectId, parameters).block();
+ }
+
+ /**
+ * Creates a new server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param parameters The required parameters for adding an active directory administrator for a server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents an Active Directory administrator.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ActiveDirectoryAdministratorInner create(
+ String resourceGroupName,
+ String serverName,
+ String objectId,
+ ActiveDirectoryAdministratorAdd parameters,
+ Context context) {
+ return createAsync(resourceGroupName, serverName, objectId, parameters, context).block();
+ }
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String serverName, String objectId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (objectId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter objectId 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,
+ serverName,
+ objectId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String serverName, String objectId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (objectId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter objectId 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,
+ serverName,
+ objectId,
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String serverName, String objectId) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, objectId);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String serverName, String objectId, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, serverName, objectId, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String objectId) {
+ return this.beginDeleteAsync(resourceGroupName, serverName, objectId).getSyncPoller();
+ }
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String objectId, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, serverName, objectId, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteAsync(String resourceGroupName, String serverName, String objectId) {
+ return beginDeleteAsync(resourceGroupName, serverName, objectId)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String serverName, String objectId, Context context) {
+ return beginDeleteAsync(resourceGroupName, serverName, objectId, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String serverName, String objectId) {
+ deleteAsync(resourceGroupName, serverName, objectId).block();
+ }
+
+ /**
+ * Deletes an Active Directory Administrator associated with the server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String serverName, String objectId, Context context) {
+ deleteAsync(resourceGroupName, serverName, objectId, context).block();
+ }
+
+ /**
+ * Gets information about a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a server along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getWithResponseAsync(
+ String resourceGroupName, String serverName, String objectId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (objectId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter objectId 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,
+ serverName,
+ objectId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets information about a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a server along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String serverName, String objectId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (objectId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter objectId 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,
+ serverName,
+ objectId,
+ accept,
+ context);
+ }
+
+ /**
+ * Gets information about a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a server on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getAsync(
+ String resourceGroupName, String serverName, String objectId) {
+ return getWithResponseAsync(resourceGroupName, serverName, objectId)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets information about a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a server along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String serverName, String objectId, Context context) {
+ return getWithResponseAsync(resourceGroupName, serverName, objectId, context).block();
+ }
+
+ /**
+ * Gets information about a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param objectId Guid of the objectId for the administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ActiveDirectoryAdministratorInner get(String resourceGroupName, String serverName, String objectId) {
+ return getWithResponse(resourceGroupName, serverName, objectId, Context.NONE).getValue();
+ }
+
+ /**
+ * List all the AAD administrators for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 active directory administrators along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServerSinglePageAsync(
+ String resourceGroupName, String serverName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByServer(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List all the AAD administrators for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 active directory administrators along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServerSinglePageAsync(
+ String resourceGroupName, String serverName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByServer(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List all the AAD administrators for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 active directory administrators as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listByServerAsync(String resourceGroupName, String serverName) {
+ return new PagedFlux<>(
+ () -> listByServerSinglePageAsync(resourceGroupName, serverName),
+ nextLink -> listByServerNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List all the AAD administrators for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 active directory administrators as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByServerAsync(
+ String resourceGroupName, String serverName, Context context) {
+ return new PagedFlux<>(
+ () -> listByServerSinglePageAsync(resourceGroupName, serverName, context),
+ nextLink -> listByServerNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List all the AAD administrators for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 active directory administrators as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByServer(String resourceGroupName, String serverName) {
+ return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName));
+ }
+
+ /**
+ * List all the AAD administrators for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 active directory administrators as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByServer(
+ String resourceGroupName, String serverName, Context context) {
+ return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of active directory administrators along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServerNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .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
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of active directory administrators along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServerNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByServerNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/AdministratorsImpl.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/AdministratorsImpl.java
new file mode 100644
index 000000000000..f9929014762a
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/AdministratorsImpl.java
@@ -0,0 +1,202 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.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.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.AdministratorsClient;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ActiveDirectoryAdministrator;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.Administrators;
+
+public final class AdministratorsImpl implements Administrators {
+ private static final ClientLogger LOGGER = new ClientLogger(AdministratorsImpl.class);
+
+ private final AdministratorsClient innerClient;
+
+ private final com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.PostgreSqlManager
+ serviceManager;
+
+ public AdministratorsImpl(
+ AdministratorsClient innerClient,
+ com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.PostgreSqlManager
+ serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public void delete(String resourceGroupName, String serverName, String objectId) {
+ this.serviceClient().delete(resourceGroupName, serverName, objectId);
+ }
+
+ public void delete(String resourceGroupName, String serverName, String objectId, Context context) {
+ this.serviceClient().delete(resourceGroupName, serverName, objectId, context);
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String serverName, String objectId, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, serverName, objectId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ActiveDirectoryAdministratorImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ActiveDirectoryAdministrator get(String resourceGroupName, String serverName, String objectId) {
+ ActiveDirectoryAdministratorInner inner = this.serviceClient().get(resourceGroupName, serverName, objectId);
+ if (inner != null) {
+ return new ActiveDirectoryAdministratorImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listByServer(String resourceGroupName, String serverName) {
+ PagedIterable inner =
+ this.serviceClient().listByServer(resourceGroupName, serverName);
+ return Utils.mapPage(inner, inner1 -> new ActiveDirectoryAdministratorImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByServer(
+ String resourceGroupName, String serverName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByServer(resourceGroupName, serverName, context);
+ return Utils.mapPage(inner, inner1 -> new ActiveDirectoryAdministratorImpl(inner1, this.manager()));
+ }
+
+ public ActiveDirectoryAdministrator getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String serverName = Utils.getValueFromIdByName(id, "flexibleServers");
+ if (serverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id)));
+ }
+ String objectId = Utils.getValueFromIdByName(id, "administrators");
+ if (objectId == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'administrators'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, serverName, objectId, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String serverName = Utils.getValueFromIdByName(id, "flexibleServers");
+ if (serverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id)));
+ }
+ String objectId = Utils.getValueFromIdByName(id, "administrators");
+ if (objectId == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'administrators'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, serverName, objectId, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String serverName = Utils.getValueFromIdByName(id, "flexibleServers");
+ if (serverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id)));
+ }
+ String objectId = Utils.getValueFromIdByName(id, "administrators");
+ if (objectId == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'administrators'.", id)));
+ }
+ this.delete(resourceGroupName, serverName, objectId, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String serverName = Utils.getValueFromIdByName(id, "flexibleServers");
+ if (serverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id)));
+ }
+ String objectId = Utils.getValueFromIdByName(id, "administrators");
+ if (objectId == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'administrators'.", id)));
+ }
+ this.delete(resourceGroupName, serverName, objectId, context);
+ }
+
+ private AdministratorsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.PostgreSqlManager
+ manager() {
+ return this.serviceManager;
+ }
+
+ public ActiveDirectoryAdministratorImpl define(String name) {
+ return new ActiveDirectoryAdministratorImpl(name, this.manager());
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/BackupsClientImpl.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/BackupsClientImpl.java
new file mode 100644
index 000000000000..92b4265212c6
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/BackupsClientImpl.java
@@ -0,0 +1,504 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.BackupsClient;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.ServerBackupInner;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ServerBackupListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in BackupsClient. */
+public final class BackupsClientImpl implements BackupsClient {
+ /** The proxy service used to perform REST calls. */
+ private final BackupsService service;
+
+ /** The service client containing this operation class. */
+ private final PostgreSqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of BackupsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupsClientImpl(PostgreSqlManagementClientImpl client) {
+ this.service = RestProxy.create(BackupsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PostgreSqlManagementClientBackups to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PostgreSqlManagement")
+ public interface BackupsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @PathParam("backupName") String backupName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByServer(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("serverName") String serverName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByServerNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get specific backup for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specific backup for a given server along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getWithResponseAsync(
+ String resourceGroupName, String serverName, String backupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (backupName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter backupName 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,
+ serverName,
+ backupName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get specific backup for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specific backup for a given server along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String serverName, String backupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (backupName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter backupName 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,
+ serverName,
+ backupName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get specific backup for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specific backup for a given server on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getAsync(String resourceGroupName, String serverName, String backupName) {
+ return getWithResponseAsync(resourceGroupName, serverName, backupName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get specific backup for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specific backup for a given server along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String serverName, String backupName, Context context) {
+ return getWithResponseAsync(resourceGroupName, serverName, backupName, context).block();
+ }
+
+ /**
+ * Get specific backup for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specific backup for a given server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ServerBackupInner get(String resourceGroupName, String serverName, String backupName) {
+ return getWithResponse(resourceGroupName, serverName, backupName, Context.NONE).getValue();
+ }
+
+ /**
+ * List all the backups for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server backups along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServerSinglePageAsync(
+ String resourceGroupName, String serverName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByServer(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List all the backups for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server backups along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServerSinglePageAsync(
+ String resourceGroupName, String serverName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByServer(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ serverName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List all the backups for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server backups as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listByServerAsync(String resourceGroupName, String serverName) {
+ return new PagedFlux<>(
+ () -> listByServerSinglePageAsync(resourceGroupName, serverName),
+ nextLink -> listByServerNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List all the backups for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server backups as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByServerAsync(
+ String resourceGroupName, String serverName, Context context) {
+ return new PagedFlux<>(
+ () -> listByServerSinglePageAsync(resourceGroupName, serverName, context),
+ nextLink -> listByServerNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List all the backups for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server backups as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByServer(String resourceGroupName, String serverName) {
+ return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName));
+ }
+
+ /**
+ * List all the backups for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server backups as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) {
+ return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server backups along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServerNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .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
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server backups along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServerNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByServerNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/BackupsImpl.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/BackupsImpl.java
new file mode 100644
index 000000000000..f88270b76b40
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/BackupsImpl.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.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.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.BackupsClient;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.ServerBackupInner;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.Backups;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.ServerBackup;
+
+public final class BackupsImpl implements Backups {
+ private static final ClientLogger LOGGER = new ClientLogger(BackupsImpl.class);
+
+ private final BackupsClient innerClient;
+
+ private final com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.PostgreSqlManager
+ serviceManager;
+
+ public BackupsImpl(
+ BackupsClient innerClient,
+ com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.PostgreSqlManager
+ serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String serverName, String backupName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, serverName, backupName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ServerBackupImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ServerBackup get(String resourceGroupName, String serverName, String backupName) {
+ ServerBackupInner inner = this.serviceClient().get(resourceGroupName, serverName, backupName);
+ if (inner != null) {
+ return new ServerBackupImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listByServer(String resourceGroupName, String serverName) {
+ PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName);
+ return Utils.mapPage(inner, inner1 -> new ServerBackupImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByServer(resourceGroupName, serverName, context);
+ return Utils.mapPage(inner, inner1 -> new ServerBackupImpl(inner1, this.manager()));
+ }
+
+ private BackupsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.PostgreSqlManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/CapabilityPropertiesImpl.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/CapabilityPropertiesImpl.java
new file mode 100644
index 000000000000..035a7c826aff
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/CapabilityPropertiesImpl.java
@@ -0,0 +1,97 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.implementation;
+
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.CapabilityPropertiesInner;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.CapabilityProperties;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.FastProvisioningEditionCapability;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.FlexibleServerEditionCapability;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.HyperscaleNodeEditionCapability;
+import java.util.Collections;
+import java.util.List;
+
+public final class CapabilityPropertiesImpl implements CapabilityProperties {
+ private CapabilityPropertiesInner innerObject;
+
+ private final com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.PostgreSqlManager
+ serviceManager;
+
+ CapabilityPropertiesImpl(
+ CapabilityPropertiesInner innerObject,
+ com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.PostgreSqlManager
+ serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String zone() {
+ return this.innerModel().zone();
+ }
+
+ public List supportedHAMode() {
+ List inner = this.innerModel().supportedHAMode();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Boolean geoBackupSupported() {
+ return this.innerModel().geoBackupSupported();
+ }
+
+ public Boolean zoneRedundantHaSupported() {
+ return this.innerModel().zoneRedundantHaSupported();
+ }
+
+ public Boolean zoneRedundantHaAndGeoBackupSupported() {
+ return this.innerModel().zoneRedundantHaAndGeoBackupSupported();
+ }
+
+ public List supportedFlexibleServerEditions() {
+ List inner = this.innerModel().supportedFlexibleServerEditions();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List supportedHyperscaleNodeEditions() {
+ List inner = this.innerModel().supportedHyperscaleNodeEditions();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Boolean fastProvisioningSupported() {
+ return this.innerModel().fastProvisioningSupported();
+ }
+
+ public List supportedFastProvisioningEditions() {
+ List inner = this.innerModel().supportedFastProvisioningEditions();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public String status() {
+ return this.innerModel().status();
+ }
+
+ public CapabilityPropertiesInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.PostgreSqlManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java
new file mode 100644
index 000000000000..9f1284690cde
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java
@@ -0,0 +1,205 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.CheckNameAvailabilitiesClient;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.NameAvailabilityInner;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.CheckNameAvailabilityRequest;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in CheckNameAvailabilitiesClient. */
+public final class CheckNameAvailabilitiesClientImpl implements CheckNameAvailabilitiesClient {
+ /** The proxy service used to perform REST calls. */
+ private final CheckNameAvailabilitiesService service;
+
+ /** The service client containing this operation class. */
+ private final PostgreSqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of CheckNameAvailabilitiesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CheckNameAvailabilitiesClientImpl(PostgreSqlManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(CheckNameAvailabilitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PostgreSqlManagementClientCheckNameAvailabilities to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PostgreSqlManagement")
+ public interface CheckNameAvailabilitiesService {
+ @Headers({"Content-Type: application/json"})
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> execute(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") CheckNameAvailabilityRequest nameAvailabilityRequest,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> executeWithResponseAsync(
+ CheckNameAvailabilityRequest nameAvailabilityRequest) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (nameAvailabilityRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null."));
+ } else {
+ nameAvailabilityRequest.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .execute(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ nameAvailabilityRequest,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> executeWithResponseAsync(
+ CheckNameAvailabilityRequest nameAvailabilityRequest, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (nameAvailabilityRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null."));
+ } else {
+ nameAvailabilityRequest.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .execute(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ nameAvailabilityRequest,
+ accept,
+ context);
+ }
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono executeAsync(CheckNameAvailabilityRequest nameAvailabilityRequest) {
+ return executeWithResponseAsync(nameAvailabilityRequest).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response executeWithResponse(
+ CheckNameAvailabilityRequest nameAvailabilityRequest, Context context) {
+ return executeWithResponseAsync(nameAvailabilityRequest, context).block();
+ }
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NameAvailabilityInner execute(CheckNameAvailabilityRequest nameAvailabilityRequest) {
+ return executeWithResponse(nameAvailabilityRequest, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java
new file mode 100644
index 000000000000..9549249dbacc
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.CheckNameAvailabilitiesClient;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.NameAvailabilityInner;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.CheckNameAvailabilities;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.CheckNameAvailabilityRequest;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.NameAvailability;
+
+public final class CheckNameAvailabilitiesImpl implements CheckNameAvailabilities {
+ private static final ClientLogger LOGGER = new ClientLogger(CheckNameAvailabilitiesImpl.class);
+
+ private final CheckNameAvailabilitiesClient innerClient;
+
+ private final com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.PostgreSqlManager
+ serviceManager;
+
+ public CheckNameAvailabilitiesImpl(
+ CheckNameAvailabilitiesClient innerClient,
+ com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.PostgreSqlManager
+ serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response executeWithResponse(
+ CheckNameAvailabilityRequest nameAvailabilityRequest, Context context) {
+ Response inner =
+ this.serviceClient().executeWithResponse(nameAvailabilityRequest, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new NameAvailabilityImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public NameAvailability execute(CheckNameAvailabilityRequest nameAvailabilityRequest) {
+ NameAvailabilityInner inner = this.serviceClient().execute(nameAvailabilityRequest);
+ if (inner != null) {
+ return new NameAvailabilityImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private CheckNameAvailabilitiesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.PostgreSqlManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsClientImpl.java b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsClientImpl.java
new file mode 100644
index 000000000000..4795bf35ff82
--- /dev/null
+++ b/sdk/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/azure-resourcemanager-postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsClientImpl.java
@@ -0,0 +1,227 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.CheckNameAvailabilityWithLocationsClient;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.fluent.models.NameAvailabilityInner;
+import com.azure.resourcemanager.postgresqlmicrosoftdbforpostgresqlpostgresqlflexibleserver.models.CheckNameAvailabilityRequest;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in CheckNameAvailabilityWithLocationsClient.
+ */
+public final class CheckNameAvailabilityWithLocationsClientImpl implements CheckNameAvailabilityWithLocationsClient {
+ /** The proxy service used to perform REST calls. */
+ private final CheckNameAvailabilityWithLocationsService service;
+
+ /** The service client containing this operation class. */
+ private final PostgreSqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of CheckNameAvailabilityWithLocationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CheckNameAvailabilityWithLocationsClientImpl(PostgreSqlManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ CheckNameAvailabilityWithLocationsService.class,
+ client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PostgreSqlManagementClientCheckNameAvailabilityWithLocations to be
+ * used by the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PostgreSqlManagement")
+ public interface CheckNameAvailabilityWithLocationsService {
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> execute(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("locationName") String locationName,
+ @BodyParam("application/json") CheckNameAvailabilityRequest nameAvailabilityRequest,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param locationName The name of the location.
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> executeWithResponseAsync(
+ String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (locationName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
+ }
+ if (nameAvailabilityRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null."));
+ } else {
+ nameAvailabilityRequest.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .execute(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ locationName,
+ nameAvailabilityRequest,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param locationName The name of the location.
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> executeWithResponseAsync(
+ String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (locationName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
+ }
+ if (nameAvailabilityRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null."));
+ } else {
+ nameAvailabilityRequest.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .execute(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ locationName,
+ nameAvailabilityRequest,
+ accept,
+ context);
+ }
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param locationName The name of the location.
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono executeAsync(
+ String locationName, CheckNameAvailabilityRequest nameAvailabilityRequest) {
+ return executeWithResponseAsync(locationName, nameAvailabilityRequest)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Check the availability of name for resource.
+ *
+ * @param locationName The name of the location.
+ * @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a resource name availability along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response