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 postgresqlhsc service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the postgresqlhsc service API instance.
+ */
+ public PostgresqlhscManager 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.postgresqlhsc")
+ .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 PostgresqlhscManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Clusters. It manages ClusterResponse.
+ *
+ * @return Resource collection API of Clusters.
+ */
+ public Clusters clusters() {
+ if (this.clusters == null) {
+ this.clusters = new ClustersImpl(clientObject.getClusters(), this);
+ }
+ return clusters;
+ }
+
+ /**
+ * Gets the resource collection API of Servers.
+ *
+ * @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 Configurations.
+ *
+ * @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 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 Roles. It manages Role.
+ *
+ * @return Resource collection API of Roles.
+ */
+ public Roles roles() {
+ if (this.roles == null) {
+ this.roles = new RolesImpl(clientObject.getRoles(), this);
+ }
+ return roles;
+ }
+
+ /**
+ * 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 PrivateEndpointConnections. It manages PrivateEndpointConnectionProperty.
+ *
+ * @return Resource collection API of PrivateEndpointConnections.
+ */
+ public PrivateEndpointConnections privateEndpointConnections() {
+ if (this.privateEndpointConnections == null) {
+ this.privateEndpointConnections =
+ new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
+ }
+ return privateEndpointConnections;
+ }
+
+ /**
+ * Gets the resource collection API of PrivateLinkResources.
+ *
+ * @return Resource collection API of PrivateLinkResources.
+ */
+ public PrivateLinkResources privateLinkResources() {
+ if (this.privateLinkResources == null) {
+ this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
+ }
+ return privateLinkResources;
+ }
+
+ /**
+ * @return Wrapped service client CosmosDBForPostgreSql providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public CosmosDBForPostgreSql serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/ClustersClient.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/ClustersClient.java
new file mode 100644
index 0000000000000..440f9cb96b51b
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/ClustersClient.java
@@ -0,0 +1,509 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.ClusterResponseInner;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.NameAvailabilityInner;
+import com.azure.resourcemanager.postgresqlhsc.models.Cluster;
+import com.azure.resourcemanager.postgresqlhsc.models.ClusterForUpdate;
+import com.azure.resourcemanager.postgresqlhsc.models.NameAvailabilityRequest;
+
+/** An instance of this class provides access to all the operations defined in ClustersClient. */
+public interface ClustersClient {
+ /**
+ * List all the clusters 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 clusters as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List all the clusters 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 clusters as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * List all the clusters 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 clusters as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List all the clusters 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 clusters as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Creates a new cluster with servers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The required parameters for creating or updating a cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ClusterResponseInner> beginCreateOrUpdate(
+ String resourceGroupName, String clusterName, Cluster parameters);
+
+ /**
+ * Creates a new cluster with servers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The required parameters for creating or updating a cluster.
+ * @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 cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ClusterResponseInner> beginCreateOrUpdate(
+ String resourceGroupName, String clusterName, Cluster parameters, Context context);
+
+ /**
+ * Creates a new cluster with servers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The required parameters for creating or updating a cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterResponseInner createOrUpdate(String resourceGroupName, String clusterName, Cluster parameters);
+
+ /**
+ * Creates a new cluster with servers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The required parameters for creating or updating a cluster.
+ * @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 cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterResponseInner createOrUpdate(
+ String resourceGroupName, String clusterName, Cluster parameters, Context context);
+
+ /**
+ * Gets information about a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 cluster along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Gets information about a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterResponseInner getByResourceGroup(String resourceGroupName, String clusterName);
+
+ /**
+ * Deletes a cluster together with servers in it.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 clusterName);
+
+ /**
+ * Deletes a cluster together with servers in it.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 clusterName, Context context);
+
+ /**
+ * Deletes a cluster together with servers in it.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 clusterName);
+
+ /**
+ * Deletes a cluster together with servers in it.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 clusterName, Context context);
+
+ /**
+ * Updates an existing cluster. The request body can contain one to many of the properties present in the normal
+ * cluster definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters for updating a cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ClusterResponseInner> beginUpdate(
+ String resourceGroupName, String clusterName, ClusterForUpdate parameters);
+
+ /**
+ * Updates an existing cluster. The request body can contain one to many of the properties present in the normal
+ * cluster definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters for updating a cluster.
+ * @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 cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ClusterResponseInner> beginUpdate(
+ String resourceGroupName, String clusterName, ClusterForUpdate parameters, Context context);
+
+ /**
+ * Updates an existing cluster. The request body can contain one to many of the properties present in the normal
+ * cluster definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters for updating a cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterResponseInner update(String resourceGroupName, String clusterName, ClusterForUpdate parameters);
+
+ /**
+ * Updates an existing cluster. The request body can contain one to many of the properties present in the normal
+ * cluster definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters for updating a cluster.
+ * @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 cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterResponseInner update(
+ String resourceGroupName, String clusterName, ClusterForUpdate parameters, Context context);
+
+ /**
+ * Restarts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 clusterName);
+
+ /**
+ * Restarts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 clusterName, Context context);
+
+ /**
+ * Restarts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 clusterName);
+
+ /**
+ * Restarts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 clusterName, Context context);
+
+ /**
+ * Starts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 clusterName);
+
+ /**
+ * Starts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 clusterName, Context context);
+
+ /**
+ * Starts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 clusterName);
+
+ /**
+ * Starts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 clusterName, Context context);
+
+ /**
+ * Stops the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 clusterName);
+
+ /**
+ * Stops the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 clusterName, Context context);
+
+ /**
+ * Stops the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 clusterName);
+
+ /**
+ * Stops the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 clusterName, Context context);
+
+ /**
+ * Promote the read replica cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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> beginPromoteReadReplica(String resourceGroupName, String clusterName);
+
+ /**
+ * Promote the read replica cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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> beginPromoteReadReplica(
+ String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Promote the read replica cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 promoteReadReplica(String resourceGroupName, String clusterName);
+
+ /**
+ * Promote the read replica cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 promoteReadReplica(String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * 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 checkNameAvailabilityWithResponse(
+ NameAvailabilityRequest 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 checkNameAvailability(NameAvailabilityRequest nameAvailabilityRequest);
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/ConfigurationsClient.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/ConfigurationsClient.java
new file mode 100644
index 0000000000000..0580be8ed7635
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/ConfigurationsClient.java
@@ -0,0 +1,255 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.ConfigurationInner;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.ServerConfigurationInner;
+import com.azure.resourcemanager.postgresqlhsc.models.ServerConfigurationRequest;
+
+/** An instance of this class provides access to all the operations defined in ConfigurationsClient. */
+public interface ConfigurationsClient {
+ /**
+ * List all the configurations of a server in cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 clusterName, String serverName);
+
+ /**
+ * List all the configurations of a server in cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 clusterName, String serverName, Context context);
+
+ /**
+ * List all the configurations of a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException 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 cluster configurations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCluster(String resourceGroupName, String clusterName);
+
+ /**
+ * List all the configurations of a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 cluster configurations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Gets information of a configuration for coordinator and nodes.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param configurationName The name of the cluster 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 of a configuration for coordinator and nodes along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String clusterName, String configurationName, Context context);
+
+ /**
+ * Gets information of a configuration for coordinator and nodes.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param configurationName The name of the cluster 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 of a configuration for coordinator and nodes.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationInner get(String resourceGroupName, String clusterName, String configurationName);
+
+ /**
+ * Updates configuration of coordinator in a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param configurationName The name of the cluster configuration.
+ * @param parameters The required parameters for updating a cluster 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, ServerConfigurationInner> beginUpdateCoordinator(
+ String resourceGroupName, String clusterName, String configurationName, ServerConfigurationRequest parameters);
+
+ /**
+ * Updates configuration of coordinator in a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param configurationName The name of the cluster configuration.
+ * @param parameters The required parameters for updating a cluster 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, ServerConfigurationInner> beginUpdateCoordinator(
+ String resourceGroupName,
+ String clusterName,
+ String configurationName,
+ ServerConfigurationRequest parameters,
+ Context context);
+
+ /**
+ * Updates configuration of coordinator in a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param configurationName The name of the cluster configuration.
+ * @param parameters The required parameters for updating a cluster 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)
+ ServerConfigurationInner updateCoordinator(
+ String resourceGroupName, String clusterName, String configurationName, ServerConfigurationRequest parameters);
+
+ /**
+ * Updates configuration of coordinator in a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param configurationName The name of the cluster configuration.
+ * @param parameters The required parameters for updating a cluster 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)
+ ServerConfigurationInner updateCoordinator(
+ String resourceGroupName,
+ String clusterName,
+ String configurationName,
+ ServerConfigurationRequest parameters,
+ Context context);
+
+ /**
+ * Updates configuration of nodes in a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param configurationName The name of the cluster configuration.
+ * @param parameters The required parameters for updating a cluster 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, ServerConfigurationInner> beginUpdateNode(
+ String resourceGroupName, String clusterName, String configurationName, ServerConfigurationRequest parameters);
+
+ /**
+ * Updates configuration of nodes in a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param configurationName The name of the cluster configuration.
+ * @param parameters The required parameters for updating a cluster 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, ServerConfigurationInner> beginUpdateNode(
+ String resourceGroupName,
+ String clusterName,
+ String configurationName,
+ ServerConfigurationRequest parameters,
+ Context context);
+
+ /**
+ * Updates configuration of nodes in a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param configurationName The name of the cluster configuration.
+ * @param parameters The required parameters for updating a cluster 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)
+ ServerConfigurationInner updateNode(
+ String resourceGroupName, String clusterName, String configurationName, ServerConfigurationRequest parameters);
+
+ /**
+ * Updates configuration of nodes in a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param configurationName The name of the cluster configuration.
+ * @param parameters The required parameters for updating a cluster 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)
+ ServerConfigurationInner updateNode(
+ String resourceGroupName,
+ String clusterName,
+ String configurationName,
+ ServerConfigurationRequest parameters,
+ Context context);
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/CosmosDBForPostgreSql.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/CosmosDBForPostgreSql.java
new file mode 100644
index 0000000000000..ea7e0a9d509db
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/CosmosDBForPostgreSql.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.postgresqlhsc.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+import java.util.UUID;
+
+/** The interface for CosmosDBForPostgreSql class. */
+public interface CosmosDBForPostgreSql {
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ UUID 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 ClustersClient object to access its operations.
+ *
+ * @return the ClustersClient object.
+ */
+ ClustersClient getClusters();
+
+ /**
+ * Gets the ServersClient object to access its operations.
+ *
+ * @return the ServersClient object.
+ */
+ ServersClient getServers();
+
+ /**
+ * Gets the ConfigurationsClient object to access its operations.
+ *
+ * @return the ConfigurationsClient object.
+ */
+ ConfigurationsClient getConfigurations();
+
+ /**
+ * Gets the FirewallRulesClient object to access its operations.
+ *
+ * @return the FirewallRulesClient object.
+ */
+ FirewallRulesClient getFirewallRules();
+
+ /**
+ * Gets the RolesClient object to access its operations.
+ *
+ * @return the RolesClient object.
+ */
+ RolesClient getRoles();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the PrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the PrivateEndpointConnectionsClient object.
+ */
+ PrivateEndpointConnectionsClient getPrivateEndpointConnections();
+
+ /**
+ * Gets the PrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the PrivateLinkResourcesClient object.
+ */
+ PrivateLinkResourcesClient getPrivateLinkResources();
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/FirewallRulesClient.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/FirewallRulesClient.java
new file mode 100644
index 0000000000000..e9567e8a57391
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/FirewallRulesClient.java
@@ -0,0 +1,206 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.FirewallRuleInner;
+
+/** An instance of this class provides access to all the operations defined in FirewallRulesClient. */
+public interface FirewallRulesClient {
+ /**
+ * Creates a new firewall rule or updates an existing firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param firewallRuleName The name of the cluster 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 cluster firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FirewallRuleInner> beginCreateOrUpdate(
+ String resourceGroupName, String clusterName, 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 clusterName The name of the cluster.
+ * @param firewallRuleName The name of the cluster 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 cluster firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FirewallRuleInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String clusterName,
+ 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 clusterName The name of the cluster.
+ * @param firewallRuleName The name of the cluster 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 cluster firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FirewallRuleInner createOrUpdate(
+ String resourceGroupName, String clusterName, 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 clusterName The name of the cluster.
+ * @param firewallRuleName The name of the cluster 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 cluster firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FirewallRuleInner createOrUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String firewallRuleName,
+ FirewallRuleInner parameters,
+ Context context);
+
+ /**
+ * Deletes a cluster firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param firewallRuleName The name of the cluster 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 clusterName, String firewallRuleName);
+
+ /**
+ * Deletes a cluster firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param firewallRuleName The name of the cluster 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 clusterName, String firewallRuleName, Context context);
+
+ /**
+ * Deletes a cluster firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param firewallRuleName The name of the cluster 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 clusterName, String firewallRuleName);
+
+ /**
+ * Deletes a cluster firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param firewallRuleName The name of the cluster 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 clusterName, String firewallRuleName, Context context);
+
+ /**
+ * Gets information about a cluster firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param firewallRuleName The name of the cluster firewall rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a cluster firewall rule along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String clusterName, String firewallRuleName, Context context);
+
+ /**
+ * Gets information about a cluster firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param firewallRuleName The name of the cluster firewall rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a cluster firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FirewallRuleInner get(String resourceGroupName, String clusterName, String firewallRuleName);
+
+ /**
+ * List all the firewall rules in a given cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException 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 listByCluster(String resourceGroupName, String clusterName);
+
+ /**
+ * List all the firewall rules in a given cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 listByCluster(String resourceGroupName, String clusterName, Context context);
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/OperationsClient.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/OperationsClient.java
new file mode 100644
index 0000000000000..5386176def826
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/OperationsClient.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.OperationInner;
+
+/** 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 as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all of the available REST API operations.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of resource provider operations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/PrivateEndpointConnectionsClient.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/PrivateEndpointConnectionsClient.java
new file mode 100644
index 0000000000000..98cd435793d8a
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/PrivateEndpointConnectionsClient.java
@@ -0,0 +1,176 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.PrivateEndpointConnectionPropertyInner;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateEndpointConnectionActionRequest;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateEndpointConnectionsCreateOrUpdateResponse;
+
+/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */
+public interface PrivateEndpointConnectionsClient {
+ /**
+ * Gets list of private endpoint connections on a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of private endpoint connections on a cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCluster(String resourceGroupName, String clusterName);
+
+ /**
+ * Gets list of private endpoint connections on a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 list of private endpoint connections on a cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCluster(
+ String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Gets private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return private endpoint connection along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Gets private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionPropertyInner get(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName);
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param parameters The required parameters for approving a private endpoint connection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection property.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionsCreateOrUpdateResponse createOrUpdateWithResponse(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionActionRequest parameters,
+ Context context);
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param parameters The required parameters for approving a private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection property.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionPropertyInner createOrUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionActionRequest parameters);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context);
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/PrivateLinkResourcesClient.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/PrivateLinkResourcesClient.java
new file mode 100644
index 0000000000000..db42f00abc10f
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/PrivateLinkResourcesClient.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.postgresqlhsc.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.PrivateLinkResourceInner;
+
+/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */
+public interface PrivateLinkResourcesClient {
+ /**
+ * Gets the private link resources for cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the private link resources for cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCluster(String resourceGroupName, String clusterName);
+
+ /**
+ * Gets the private link resources for cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the private link resources for cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCluster(
+ String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Gets a private link resource for cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param privateLinkResourceName The name of the private link resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private link resource for cluster along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String clusterName, String privateLinkResourceName, Context context);
+
+ /**
+ * Gets a private link resource for cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param privateLinkResourceName The name of the private link resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private link resource for cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateLinkResourceInner get(String resourceGroupName, String clusterName, String privateLinkResourceName);
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/RolesClient.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/RolesClient.java
new file mode 100644
index 0000000000000..9c76c2bcc6c02
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/RolesClient.java
@@ -0,0 +1,165 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.RoleInner;
+
+/** An instance of this class provides access to all the operations defined in RolesClient. */
+public interface RolesClient {
+ /**
+ * Creates a new role or updates an existing role.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param roleName The name of the cluster role.
+ * @param parameters The required parameters for creating or updating a role.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 cluster role.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, RoleInner> beginCreate(
+ String resourceGroupName, String clusterName, String roleName, RoleInner parameters);
+
+ /**
+ * Creates a new role or updates an existing role.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param roleName The name of the cluster role.
+ * @param parameters The required parameters for creating or updating a role.
+ * @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 cluster role.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, RoleInner> beginCreate(
+ String resourceGroupName, String clusterName, String roleName, RoleInner parameters, Context context);
+
+ /**
+ * Creates a new role or updates an existing role.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param roleName The name of the cluster role.
+ * @param parameters The required parameters for creating or updating a role.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 cluster role.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RoleInner create(String resourceGroupName, String clusterName, String roleName, RoleInner parameters);
+
+ /**
+ * Creates a new role or updates an existing role.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param roleName The name of the cluster role.
+ * @param parameters The required parameters for creating or updating a role.
+ * @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 cluster role.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RoleInner create(
+ String resourceGroupName, String clusterName, String roleName, RoleInner parameters, Context context);
+
+ /**
+ * Deletes a cluster role.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param roleName The name of the cluster role.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 clusterName, String roleName);
+
+ /**
+ * Deletes a cluster role.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param roleName The name of the cluster role.
+ * @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 clusterName, String roleName, Context context);
+
+ /**
+ * Deletes a cluster role.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param roleName The name of the cluster role.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 clusterName, String roleName);
+
+ /**
+ * Deletes a cluster role.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param roleName The name of the cluster role.
+ * @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 clusterName, String roleName, Context context);
+
+ /**
+ * List all the roles in a given cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException 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 roles as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCluster(String resourceGroupName, String clusterName);
+
+ /**
+ * List all the roles in a given cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 roles as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context);
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/ServersClient.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/ServersClient.java
new file mode 100644
index 0000000000000..c89d95edb93dd
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/ServersClient.java
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.ClusterServerInner;
+
+/** An instance of this class provides access to all the operations defined in ServersClient. */
+public interface ServersClient {
+ /**
+ * Lists servers of a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException 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 in a cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCluster(String resourceGroupName, String clusterName);
+
+ /**
+ * Lists servers of a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 in a cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Gets information about a server in cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 in cluster along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String clusterName, String serverName, Context context);
+
+ /**
+ * Gets information about a server in cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 in cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterServerInner get(String resourceGroupName, String clusterName, String serverName);
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterProperties.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterProperties.java
new file mode 100644
index 0000000000000..842d54412d1c1
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterProperties.java
@@ -0,0 +1,518 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.postgresqlhsc.models.MaintenanceWindow;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** The properties used to create a new cluster. */
+@Fluent
+public final class ClusterProperties {
+ /*
+ * The password of the administrator login. Required for creation.
+ */
+ @JsonProperty(value = "administratorLoginPassword")
+ private String administratorLoginPassword;
+
+ /*
+ * The PostgreSQL version of cluster.
+ */
+ @JsonProperty(value = "postgresqlVersion")
+ private String postgresqlVersion;
+
+ /*
+ * The Citus version of cluster.
+ */
+ @JsonProperty(value = "citusVersion")
+ private String citusVersion;
+
+ /*
+ * If shards on coordinator is enabled or not for the cluster.
+ */
+ @JsonProperty(value = "enableShardsOnCoordinator")
+ private Boolean enableShardsOnCoordinator;
+
+ /*
+ * The earliest restore point time (ISO8601 format) for the cluster.
+ */
+ @JsonProperty(value = "earliestRestoreTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime earliestRestoreTime;
+
+ /*
+ * If high availability is enabled or not for the cluster.
+ */
+ @JsonProperty(value = "enableHa")
+ private Boolean enableHa;
+
+ /*
+ * Preferred primary zone for the cluster
+ */
+ @JsonProperty(value = "preferredPrimaryZone")
+ private String preferredPrimaryZone;
+
+ /*
+ * The edition of the coordinator (default: GeneralPurpose). Required for creation.
+ */
+ @JsonProperty(value = "coordinatorServerEdition")
+ private String coordinatorServerEdition;
+
+ /*
+ * The storage of the coordinator in MB. Required for creation.
+ */
+ @JsonProperty(value = "coordinatorStorageQuotaInMb")
+ private Long coordinatorStorageQuotaInMb;
+
+ /*
+ * The vCores count of the coordinator (max: 64). Required for creation.
+ */
+ @JsonProperty(value = "coordinatorVCores")
+ private Long coordinatorVCores;
+
+ /*
+ * If public IP is requested or not for the coordinator.
+ */
+ @JsonProperty(value = "coordinatorEnablePublicIpAccess")
+ private Boolean coordinatorEnablePublicIpAccess;
+
+ /*
+ * The edition of a node (default: MemoryOptimized).
+ */
+ @JsonProperty(value = "nodeServerEdition")
+ private String nodeServerEdition;
+
+ /*
+ * Worker node count of the cluster
+ */
+ @JsonProperty(value = "nodeCount")
+ private Long nodeCount;
+
+ /*
+ * The storage of a node in MB.
+ */
+ @JsonProperty(value = "nodeStorageQuotaInMb")
+ private Long nodeStorageQuotaInMb;
+
+ /*
+ * The vCores count of a node (max: 64).
+ */
+ @JsonProperty(value = "nodeVCores")
+ private Long nodeVCores;
+
+ /*
+ * If public IP is requested or not for a node.
+ */
+ @JsonProperty(value = "nodeEnablePublicIpAccess")
+ private Boolean nodeEnablePublicIpAccess;
+
+ /*
+ * Maintenance window of a cluster.
+ */
+ @JsonProperty(value = "maintenanceWindow")
+ private MaintenanceWindow maintenanceWindow;
+
+ /*
+ * The source resource id to restore from. It's required for 'PointInTimeRestore' or 'ReadReplica' operations
+ */
+ @JsonProperty(value = "sourceResourceId")
+ private String sourceResourceId;
+
+ /*
+ * The source cluster location to restore from. It's required for 'PointInTimeRestore' or 'ReadReplica' operations
+ */
+ @JsonProperty(value = "sourceLocation")
+ private String sourceLocation;
+
+ /** Creates an instance of ClusterProperties class. */
+ public ClusterProperties() {
+ }
+
+ /**
+ * Get the administratorLoginPassword property: The password of the administrator login. Required for creation.
+ *
+ * @return the administratorLoginPassword value.
+ */
+ public String administratorLoginPassword() {
+ return this.administratorLoginPassword;
+ }
+
+ /**
+ * Set the administratorLoginPassword property: The password of the administrator login. Required for creation.
+ *
+ * @param administratorLoginPassword the administratorLoginPassword value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withAdministratorLoginPassword(String administratorLoginPassword) {
+ this.administratorLoginPassword = administratorLoginPassword;
+ return this;
+ }
+
+ /**
+ * Get the postgresqlVersion property: The PostgreSQL version of cluster.
+ *
+ * @return the postgresqlVersion value.
+ */
+ public String postgresqlVersion() {
+ return this.postgresqlVersion;
+ }
+
+ /**
+ * Set the postgresqlVersion property: The PostgreSQL version of cluster.
+ *
+ * @param postgresqlVersion the postgresqlVersion value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withPostgresqlVersion(String postgresqlVersion) {
+ this.postgresqlVersion = postgresqlVersion;
+ return this;
+ }
+
+ /**
+ * Get the citusVersion property: The Citus version of cluster.
+ *
+ * @return the citusVersion value.
+ */
+ public String citusVersion() {
+ return this.citusVersion;
+ }
+
+ /**
+ * Set the citusVersion property: The Citus version of cluster.
+ *
+ * @param citusVersion the citusVersion value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withCitusVersion(String citusVersion) {
+ this.citusVersion = citusVersion;
+ return this;
+ }
+
+ /**
+ * Get the enableShardsOnCoordinator property: If shards on coordinator is enabled or not for the cluster.
+ *
+ * @return the enableShardsOnCoordinator value.
+ */
+ public Boolean enableShardsOnCoordinator() {
+ return this.enableShardsOnCoordinator;
+ }
+
+ /**
+ * Set the enableShardsOnCoordinator property: If shards on coordinator is enabled or not for the cluster.
+ *
+ * @param enableShardsOnCoordinator the enableShardsOnCoordinator value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withEnableShardsOnCoordinator(Boolean enableShardsOnCoordinator) {
+ this.enableShardsOnCoordinator = enableShardsOnCoordinator;
+ return this;
+ }
+
+ /**
+ * Get the earliestRestoreTime property: The earliest restore point time (ISO8601 format) for the cluster.
+ *
+ * @return the earliestRestoreTime value.
+ */
+ public OffsetDateTime earliestRestoreTime() {
+ return this.earliestRestoreTime;
+ }
+
+ /**
+ * Get the enableHa property: If high availability is enabled or not for the cluster.
+ *
+ * @return the enableHa value.
+ */
+ public Boolean enableHa() {
+ return this.enableHa;
+ }
+
+ /**
+ * Set the enableHa property: If high availability is enabled or not for the cluster.
+ *
+ * @param enableHa the enableHa value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withEnableHa(Boolean enableHa) {
+ this.enableHa = enableHa;
+ return this;
+ }
+
+ /**
+ * Get the preferredPrimaryZone property: Preferred primary zone for the cluster.
+ *
+ * @return the preferredPrimaryZone value.
+ */
+ public String preferredPrimaryZone() {
+ return this.preferredPrimaryZone;
+ }
+
+ /**
+ * Set the preferredPrimaryZone property: Preferred primary zone for the cluster.
+ *
+ * @param preferredPrimaryZone the preferredPrimaryZone value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withPreferredPrimaryZone(String preferredPrimaryZone) {
+ this.preferredPrimaryZone = preferredPrimaryZone;
+ return this;
+ }
+
+ /**
+ * Get the coordinatorServerEdition property: The edition of the coordinator (default: GeneralPurpose). Required for
+ * creation.
+ *
+ * @return the coordinatorServerEdition value.
+ */
+ public String coordinatorServerEdition() {
+ return this.coordinatorServerEdition;
+ }
+
+ /**
+ * Set the coordinatorServerEdition property: The edition of the coordinator (default: GeneralPurpose). Required for
+ * creation.
+ *
+ * @param coordinatorServerEdition the coordinatorServerEdition value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withCoordinatorServerEdition(String coordinatorServerEdition) {
+ this.coordinatorServerEdition = coordinatorServerEdition;
+ return this;
+ }
+
+ /**
+ * Get the coordinatorStorageQuotaInMb property: The storage of the coordinator in MB. Required for creation.
+ *
+ * @return the coordinatorStorageQuotaInMb value.
+ */
+ public Long coordinatorStorageQuotaInMb() {
+ return this.coordinatorStorageQuotaInMb;
+ }
+
+ /**
+ * Set the coordinatorStorageQuotaInMb property: The storage of the coordinator in MB. Required for creation.
+ *
+ * @param coordinatorStorageQuotaInMb the coordinatorStorageQuotaInMb value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withCoordinatorStorageQuotaInMb(Long coordinatorStorageQuotaInMb) {
+ this.coordinatorStorageQuotaInMb = coordinatorStorageQuotaInMb;
+ return this;
+ }
+
+ /**
+ * Get the coordinatorVCores property: The vCores count of the coordinator (max: 64). Required for creation.
+ *
+ * @return the coordinatorVCores value.
+ */
+ public Long coordinatorVCores() {
+ return this.coordinatorVCores;
+ }
+
+ /**
+ * Set the coordinatorVCores property: The vCores count of the coordinator (max: 64). Required for creation.
+ *
+ * @param coordinatorVCores the coordinatorVCores value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withCoordinatorVCores(Long coordinatorVCores) {
+ this.coordinatorVCores = coordinatorVCores;
+ return this;
+ }
+
+ /**
+ * Get the coordinatorEnablePublicIpAccess property: If public IP is requested or not for the coordinator.
+ *
+ * @return the coordinatorEnablePublicIpAccess value.
+ */
+ public Boolean coordinatorEnablePublicIpAccess() {
+ return this.coordinatorEnablePublicIpAccess;
+ }
+
+ /**
+ * Set the coordinatorEnablePublicIpAccess property: If public IP is requested or not for the coordinator.
+ *
+ * @param coordinatorEnablePublicIpAccess the coordinatorEnablePublicIpAccess value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withCoordinatorEnablePublicIpAccess(Boolean coordinatorEnablePublicIpAccess) {
+ this.coordinatorEnablePublicIpAccess = coordinatorEnablePublicIpAccess;
+ return this;
+ }
+
+ /**
+ * Get the nodeServerEdition property: The edition of a node (default: MemoryOptimized).
+ *
+ * @return the nodeServerEdition value.
+ */
+ public String nodeServerEdition() {
+ return this.nodeServerEdition;
+ }
+
+ /**
+ * Set the nodeServerEdition property: The edition of a node (default: MemoryOptimized).
+ *
+ * @param nodeServerEdition the nodeServerEdition value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withNodeServerEdition(String nodeServerEdition) {
+ this.nodeServerEdition = nodeServerEdition;
+ return this;
+ }
+
+ /**
+ * Get the nodeCount property: Worker node count of the cluster.
+ *
+ * @return the nodeCount value.
+ */
+ public Long nodeCount() {
+ return this.nodeCount;
+ }
+
+ /**
+ * Set the nodeCount property: Worker node count of the cluster.
+ *
+ * @param nodeCount the nodeCount value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withNodeCount(Long nodeCount) {
+ this.nodeCount = nodeCount;
+ return this;
+ }
+
+ /**
+ * Get the nodeStorageQuotaInMb property: The storage of a node in MB.
+ *
+ * @return the nodeStorageQuotaInMb value.
+ */
+ public Long nodeStorageQuotaInMb() {
+ return this.nodeStorageQuotaInMb;
+ }
+
+ /**
+ * Set the nodeStorageQuotaInMb property: The storage of a node in MB.
+ *
+ * @param nodeStorageQuotaInMb the nodeStorageQuotaInMb value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withNodeStorageQuotaInMb(Long nodeStorageQuotaInMb) {
+ this.nodeStorageQuotaInMb = nodeStorageQuotaInMb;
+ return this;
+ }
+
+ /**
+ * Get the nodeVCores property: The vCores count of a node (max: 64).
+ *
+ * @return the nodeVCores value.
+ */
+ public Long nodeVCores() {
+ return this.nodeVCores;
+ }
+
+ /**
+ * Set the nodeVCores property: The vCores count of a node (max: 64).
+ *
+ * @param nodeVCores the nodeVCores value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withNodeVCores(Long nodeVCores) {
+ this.nodeVCores = nodeVCores;
+ return this;
+ }
+
+ /**
+ * Get the nodeEnablePublicIpAccess property: If public IP is requested or not for a node.
+ *
+ * @return the nodeEnablePublicIpAccess value.
+ */
+ public Boolean nodeEnablePublicIpAccess() {
+ return this.nodeEnablePublicIpAccess;
+ }
+
+ /**
+ * Set the nodeEnablePublicIpAccess property: If public IP is requested or not for a node.
+ *
+ * @param nodeEnablePublicIpAccess the nodeEnablePublicIpAccess value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withNodeEnablePublicIpAccess(Boolean nodeEnablePublicIpAccess) {
+ this.nodeEnablePublicIpAccess = nodeEnablePublicIpAccess;
+ return this;
+ }
+
+ /**
+ * Get the maintenanceWindow property: Maintenance window of a cluster.
+ *
+ * @return the maintenanceWindow value.
+ */
+ public MaintenanceWindow maintenanceWindow() {
+ return this.maintenanceWindow;
+ }
+
+ /**
+ * Set the maintenanceWindow property: Maintenance window of a cluster.
+ *
+ * @param maintenanceWindow the maintenanceWindow value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
+ this.maintenanceWindow = maintenanceWindow;
+ return this;
+ }
+
+ /**
+ * Get the sourceResourceId property: The source resource id to restore from. It's required for 'PointInTimeRestore'
+ * or 'ReadReplica' operations.
+ *
+ * @return the sourceResourceId value.
+ */
+ public String sourceResourceId() {
+ return this.sourceResourceId;
+ }
+
+ /**
+ * Set the sourceResourceId property: The source resource id to restore from. It's required for 'PointInTimeRestore'
+ * or 'ReadReplica' operations.
+ *
+ * @param sourceResourceId the sourceResourceId value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withSourceResourceId(String sourceResourceId) {
+ this.sourceResourceId = sourceResourceId;
+ return this;
+ }
+
+ /**
+ * Get the sourceLocation property: The source cluster location to restore from. It's required for
+ * 'PointInTimeRestore' or 'ReadReplica' operations.
+ *
+ * @return the sourceLocation value.
+ */
+ public String sourceLocation() {
+ return this.sourceLocation;
+ }
+
+ /**
+ * Set the sourceLocation property: The source cluster location to restore from. It's required for
+ * 'PointInTimeRestore' or 'ReadReplica' operations.
+ *
+ * @param sourceLocation the sourceLocation value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withSourceLocation(String sourceLocation) {
+ this.sourceLocation = sourceLocation;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (maintenanceWindow() != null) {
+ maintenanceWindow().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterPropertiesForUpdate.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterPropertiesForUpdate.java
new file mode 100644
index 0000000000000..c8b49143023ad
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterPropertiesForUpdate.java
@@ -0,0 +1,433 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.postgresqlhsc.models.MaintenanceWindow;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties used to update a cluster. */
+@Fluent
+public final class ClusterPropertiesForUpdate {
+ /*
+ * The password of the administrator login.
+ */
+ @JsonProperty(value = "administratorLoginPassword")
+ private String administratorLoginPassword;
+
+ /*
+ * The PostgreSQL version of the cluster.
+ */
+ @JsonProperty(value = "postgresqlVersion")
+ private String postgresqlVersion;
+
+ /*
+ * The Citus version of the cluster.
+ */
+ @JsonProperty(value = "citusVersion")
+ private String citusVersion;
+
+ /*
+ * If shards on coordinator is enabled or not for the cluster.
+ */
+ @JsonProperty(value = "enableShardsOnCoordinator")
+ private Boolean enableShardsOnCoordinator;
+
+ /*
+ * If high availability is enabled or not for the cluster.
+ */
+ @JsonProperty(value = "enableHa")
+ private Boolean enableHa;
+
+ /*
+ * Preferred primary zone for the cluster
+ */
+ @JsonProperty(value = "preferredPrimaryZone")
+ private String preferredPrimaryZone;
+
+ /*
+ * The edition of the coordinator (default: GeneralPurpose).
+ */
+ @JsonProperty(value = "coordinatorServerEdition")
+ private String coordinatorServerEdition;
+
+ /*
+ * The storage of the coordinator in MB.
+ */
+ @JsonProperty(value = "coordinatorStorageQuotaInMb")
+ private Long coordinatorStorageQuotaInMb;
+
+ /*
+ * The vCores count of the coordinator (max: 64).
+ */
+ @JsonProperty(value = "coordinatorVCores")
+ private Long coordinatorVCores;
+
+ /*
+ * If public IP is requested or not for the coordinator.
+ */
+ @JsonProperty(value = "coordinatorEnablePublicIpAccess")
+ private Boolean coordinatorEnablePublicIpAccess;
+
+ /*
+ * The edition of a node (default: MemoryOptimized).
+ */
+ @JsonProperty(value = "nodeServerEdition")
+ private String nodeServerEdition;
+
+ /*
+ * Worker node count of the cluster
+ */
+ @JsonProperty(value = "nodeCount")
+ private Long nodeCount;
+
+ /*
+ * The storage of a node in MB.
+ */
+ @JsonProperty(value = "nodeStorageQuotaInMb")
+ private Long nodeStorageQuotaInMb;
+
+ /*
+ * The vCores count of a node (max: 64).
+ */
+ @JsonProperty(value = "nodeVCores")
+ private Long nodeVCores;
+
+ /*
+ * If public IP is requested or not for a node.
+ */
+ @JsonProperty(value = "nodeEnablePublicIpAccess", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean nodeEnablePublicIpAccess;
+
+ /*
+ * Maintenance window of a cluster.
+ */
+ @JsonProperty(value = "maintenanceWindow")
+ private MaintenanceWindow maintenanceWindow;
+
+ /** Creates an instance of ClusterPropertiesForUpdate class. */
+ public ClusterPropertiesForUpdate() {
+ }
+
+ /**
+ * 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 ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withAdministratorLoginPassword(String administratorLoginPassword) {
+ this.administratorLoginPassword = administratorLoginPassword;
+ return this;
+ }
+
+ /**
+ * Get the postgresqlVersion property: The PostgreSQL version of the cluster.
+ *
+ * @return the postgresqlVersion value.
+ */
+ public String postgresqlVersion() {
+ return this.postgresqlVersion;
+ }
+
+ /**
+ * Set the postgresqlVersion property: The PostgreSQL version of the cluster.
+ *
+ * @param postgresqlVersion the postgresqlVersion value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withPostgresqlVersion(String postgresqlVersion) {
+ this.postgresqlVersion = postgresqlVersion;
+ return this;
+ }
+
+ /**
+ * Get the citusVersion property: The Citus version of the cluster.
+ *
+ * @return the citusVersion value.
+ */
+ public String citusVersion() {
+ return this.citusVersion;
+ }
+
+ /**
+ * Set the citusVersion property: The Citus version of the cluster.
+ *
+ * @param citusVersion the citusVersion value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withCitusVersion(String citusVersion) {
+ this.citusVersion = citusVersion;
+ return this;
+ }
+
+ /**
+ * Get the enableShardsOnCoordinator property: If shards on coordinator is enabled or not for the cluster.
+ *
+ * @return the enableShardsOnCoordinator value.
+ */
+ public Boolean enableShardsOnCoordinator() {
+ return this.enableShardsOnCoordinator;
+ }
+
+ /**
+ * Set the enableShardsOnCoordinator property: If shards on coordinator is enabled or not for the cluster.
+ *
+ * @param enableShardsOnCoordinator the enableShardsOnCoordinator value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withEnableShardsOnCoordinator(Boolean enableShardsOnCoordinator) {
+ this.enableShardsOnCoordinator = enableShardsOnCoordinator;
+ return this;
+ }
+
+ /**
+ * Get the enableHa property: If high availability is enabled or not for the cluster.
+ *
+ * @return the enableHa value.
+ */
+ public Boolean enableHa() {
+ return this.enableHa;
+ }
+
+ /**
+ * Set the enableHa property: If high availability is enabled or not for the cluster.
+ *
+ * @param enableHa the enableHa value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withEnableHa(Boolean enableHa) {
+ this.enableHa = enableHa;
+ return this;
+ }
+
+ /**
+ * Get the preferredPrimaryZone property: Preferred primary zone for the cluster.
+ *
+ * @return the preferredPrimaryZone value.
+ */
+ public String preferredPrimaryZone() {
+ return this.preferredPrimaryZone;
+ }
+
+ /**
+ * Set the preferredPrimaryZone property: Preferred primary zone for the cluster.
+ *
+ * @param preferredPrimaryZone the preferredPrimaryZone value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withPreferredPrimaryZone(String preferredPrimaryZone) {
+ this.preferredPrimaryZone = preferredPrimaryZone;
+ return this;
+ }
+
+ /**
+ * Get the coordinatorServerEdition property: The edition of the coordinator (default: GeneralPurpose).
+ *
+ * @return the coordinatorServerEdition value.
+ */
+ public String coordinatorServerEdition() {
+ return this.coordinatorServerEdition;
+ }
+
+ /**
+ * Set the coordinatorServerEdition property: The edition of the coordinator (default: GeneralPurpose).
+ *
+ * @param coordinatorServerEdition the coordinatorServerEdition value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withCoordinatorServerEdition(String coordinatorServerEdition) {
+ this.coordinatorServerEdition = coordinatorServerEdition;
+ return this;
+ }
+
+ /**
+ * Get the coordinatorStorageQuotaInMb property: The storage of the coordinator in MB.
+ *
+ * @return the coordinatorStorageQuotaInMb value.
+ */
+ public Long coordinatorStorageQuotaInMb() {
+ return this.coordinatorStorageQuotaInMb;
+ }
+
+ /**
+ * Set the coordinatorStorageQuotaInMb property: The storage of the coordinator in MB.
+ *
+ * @param coordinatorStorageQuotaInMb the coordinatorStorageQuotaInMb value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withCoordinatorStorageQuotaInMb(Long coordinatorStorageQuotaInMb) {
+ this.coordinatorStorageQuotaInMb = coordinatorStorageQuotaInMb;
+ return this;
+ }
+
+ /**
+ * Get the coordinatorVCores property: The vCores count of the coordinator (max: 64).
+ *
+ * @return the coordinatorVCores value.
+ */
+ public Long coordinatorVCores() {
+ return this.coordinatorVCores;
+ }
+
+ /**
+ * Set the coordinatorVCores property: The vCores count of the coordinator (max: 64).
+ *
+ * @param coordinatorVCores the coordinatorVCores value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withCoordinatorVCores(Long coordinatorVCores) {
+ this.coordinatorVCores = coordinatorVCores;
+ return this;
+ }
+
+ /**
+ * Get the coordinatorEnablePublicIpAccess property: If public IP is requested or not for the coordinator.
+ *
+ * @return the coordinatorEnablePublicIpAccess value.
+ */
+ public Boolean coordinatorEnablePublicIpAccess() {
+ return this.coordinatorEnablePublicIpAccess;
+ }
+
+ /**
+ * Set the coordinatorEnablePublicIpAccess property: If public IP is requested or not for the coordinator.
+ *
+ * @param coordinatorEnablePublicIpAccess the coordinatorEnablePublicIpAccess value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withCoordinatorEnablePublicIpAccess(Boolean coordinatorEnablePublicIpAccess) {
+ this.coordinatorEnablePublicIpAccess = coordinatorEnablePublicIpAccess;
+ return this;
+ }
+
+ /**
+ * Get the nodeServerEdition property: The edition of a node (default: MemoryOptimized).
+ *
+ * @return the nodeServerEdition value.
+ */
+ public String nodeServerEdition() {
+ return this.nodeServerEdition;
+ }
+
+ /**
+ * Set the nodeServerEdition property: The edition of a node (default: MemoryOptimized).
+ *
+ * @param nodeServerEdition the nodeServerEdition value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withNodeServerEdition(String nodeServerEdition) {
+ this.nodeServerEdition = nodeServerEdition;
+ return this;
+ }
+
+ /**
+ * Get the nodeCount property: Worker node count of the cluster.
+ *
+ * @return the nodeCount value.
+ */
+ public Long nodeCount() {
+ return this.nodeCount;
+ }
+
+ /**
+ * Set the nodeCount property: Worker node count of the cluster.
+ *
+ * @param nodeCount the nodeCount value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withNodeCount(Long nodeCount) {
+ this.nodeCount = nodeCount;
+ return this;
+ }
+
+ /**
+ * Get the nodeStorageQuotaInMb property: The storage of a node in MB.
+ *
+ * @return the nodeStorageQuotaInMb value.
+ */
+ public Long nodeStorageQuotaInMb() {
+ return this.nodeStorageQuotaInMb;
+ }
+
+ /**
+ * Set the nodeStorageQuotaInMb property: The storage of a node in MB.
+ *
+ * @param nodeStorageQuotaInMb the nodeStorageQuotaInMb value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withNodeStorageQuotaInMb(Long nodeStorageQuotaInMb) {
+ this.nodeStorageQuotaInMb = nodeStorageQuotaInMb;
+ return this;
+ }
+
+ /**
+ * Get the nodeVCores property: The vCores count of a node (max: 64).
+ *
+ * @return the nodeVCores value.
+ */
+ public Long nodeVCores() {
+ return this.nodeVCores;
+ }
+
+ /**
+ * Set the nodeVCores property: The vCores count of a node (max: 64).
+ *
+ * @param nodeVCores the nodeVCores value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withNodeVCores(Long nodeVCores) {
+ this.nodeVCores = nodeVCores;
+ return this;
+ }
+
+ /**
+ * Get the nodeEnablePublicIpAccess property: If public IP is requested or not for a node.
+ *
+ * @return the nodeEnablePublicIpAccess value.
+ */
+ public Boolean nodeEnablePublicIpAccess() {
+ return this.nodeEnablePublicIpAccess;
+ }
+
+ /**
+ * Get the maintenanceWindow property: Maintenance window of a cluster.
+ *
+ * @return the maintenanceWindow value.
+ */
+ public MaintenanceWindow maintenanceWindow() {
+ return this.maintenanceWindow;
+ }
+
+ /**
+ * Set the maintenanceWindow property: Maintenance window of a cluster.
+ *
+ * @param maintenanceWindow the maintenanceWindow value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
+ this.maintenanceWindow = maintenanceWindow;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (maintenanceWindow() != null) {
+ maintenanceWindow().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterResponseInner.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterResponseInner.java
new file mode 100644
index 0000000000000..58095540b2503
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterResponseInner.java
@@ -0,0 +1,482 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.postgresqlhsc.models.MaintenanceWindow;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.postgresqlhsc.models.ServerNameItem;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+import java.util.Map;
+
+/** Represents a cluster in response body. */
+@Fluent
+public final class ClusterResponseInner extends Resource {
+ /*
+ * Properties of the cluster response body.
+ */
+ @JsonProperty(value = "properties")
+ private ClusterResponseProperties 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 ClusterResponseInner class. */
+ public ClusterResponseInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Properties of the cluster response body.
+ *
+ * @return the innerProperties value.
+ */
+ private ClusterResponseProperties 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 ClusterResponseInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ClusterResponseInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the cluster.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the state property: A state of a cluster/server that is visible to user.
+ *
+ * @return the state value.
+ */
+ public String state() {
+ return this.innerProperties() == null ? null : this.innerProperties().state();
+ }
+
+ /**
+ * Get the postgresqlVersion property: The PostgreSQL version of cluster.
+ *
+ * @return the postgresqlVersion value.
+ */
+ public String postgresqlVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().postgresqlVersion();
+ }
+
+ /**
+ * Set the postgresqlVersion property: The PostgreSQL version of cluster.
+ *
+ * @param postgresqlVersion the postgresqlVersion value to set.
+ * @return the ClusterResponseInner object itself.
+ */
+ public ClusterResponseInner withPostgresqlVersion(String postgresqlVersion) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterResponseProperties();
+ }
+ this.innerProperties().withPostgresqlVersion(postgresqlVersion);
+ return this;
+ }
+
+ /**
+ * Get the citusVersion property: The Citus version of cluster.
+ *
+ * @return the citusVersion value.
+ */
+ public String citusVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().citusVersion();
+ }
+
+ /**
+ * Set the citusVersion property: The Citus version of cluster.
+ *
+ * @param citusVersion the citusVersion value to set.
+ * @return the ClusterResponseInner object itself.
+ */
+ public ClusterResponseInner withCitusVersion(String citusVersion) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterResponseProperties();
+ }
+ this.innerProperties().withCitusVersion(citusVersion);
+ return this;
+ }
+
+ /**
+ * Get the maintenanceWindow property: Maintenance window of a cluster.
+ *
+ * @return the maintenanceWindow value.
+ */
+ public MaintenanceWindow maintenanceWindow() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenanceWindow();
+ }
+
+ /**
+ * Set the maintenanceWindow property: Maintenance window of a cluster.
+ *
+ * @param maintenanceWindow the maintenanceWindow value to set.
+ * @return the ClusterResponseInner object itself.
+ */
+ public ClusterResponseInner withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterResponseProperties();
+ }
+ this.innerProperties().withMaintenanceWindow(maintenanceWindow);
+ return this;
+ }
+
+ /**
+ * Get the preferredPrimaryZone property: Preferred primary zone for the cluster.
+ *
+ * @return the preferredPrimaryZone value.
+ */
+ public String preferredPrimaryZone() {
+ return this.innerProperties() == null ? null : this.innerProperties().preferredPrimaryZone();
+ }
+
+ /**
+ * Set the preferredPrimaryZone property: Preferred primary zone for the cluster.
+ *
+ * @param preferredPrimaryZone the preferredPrimaryZone value to set.
+ * @return the ClusterResponseInner object itself.
+ */
+ public ClusterResponseInner withPreferredPrimaryZone(String preferredPrimaryZone) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterResponseProperties();
+ }
+ this.innerProperties().withPreferredPrimaryZone(preferredPrimaryZone);
+ return this;
+ }
+
+ /**
+ * Get the enableShardsOnCoordinator property: If shards on coordinator is enabled or not for the cluster.
+ *
+ * @return the enableShardsOnCoordinator value.
+ */
+ public Boolean enableShardsOnCoordinator() {
+ return this.innerProperties() == null ? null : this.innerProperties().enableShardsOnCoordinator();
+ }
+
+ /**
+ * Set the enableShardsOnCoordinator property: If shards on coordinator is enabled or not for the cluster.
+ *
+ * @param enableShardsOnCoordinator the enableShardsOnCoordinator value to set.
+ * @return the ClusterResponseInner object itself.
+ */
+ public ClusterResponseInner withEnableShardsOnCoordinator(Boolean enableShardsOnCoordinator) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterResponseProperties();
+ }
+ this.innerProperties().withEnableShardsOnCoordinator(enableShardsOnCoordinator);
+ return this;
+ }
+
+ /**
+ * Get the enableHa property: If high availability is enabled or not for the server.
+ *
+ * @return the enableHa value.
+ */
+ public Boolean enableHa() {
+ return this.innerProperties() == null ? null : this.innerProperties().enableHa();
+ }
+
+ /**
+ * Set the enableHa property: If high availability is enabled or not for the server.
+ *
+ * @param enableHa the enableHa value to set.
+ * @return the ClusterResponseInner object itself.
+ */
+ public ClusterResponseInner withEnableHa(Boolean enableHa) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterResponseProperties();
+ }
+ this.innerProperties().withEnableHa(enableHa);
+ return this;
+ }
+
+ /**
+ * Get the coordinatorServerEdition property: The edition of a coordinator server (default: GeneralPurpose).
+ *
+ * @return the coordinatorServerEdition value.
+ */
+ public String coordinatorServerEdition() {
+ return this.innerProperties() == null ? null : this.innerProperties().coordinatorServerEdition();
+ }
+
+ /**
+ * Set the coordinatorServerEdition property: The edition of a coordinator server (default: GeneralPurpose).
+ *
+ * @param coordinatorServerEdition the coordinatorServerEdition value to set.
+ * @return the ClusterResponseInner object itself.
+ */
+ public ClusterResponseInner withCoordinatorServerEdition(String coordinatorServerEdition) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterResponseProperties();
+ }
+ this.innerProperties().withCoordinatorServerEdition(coordinatorServerEdition);
+ return this;
+ }
+
+ /**
+ * Get the coordinatorStorageQuotaInMb property: The storage of a server in MB.
+ *
+ * @return the coordinatorStorageQuotaInMb value.
+ */
+ public Long coordinatorStorageQuotaInMb() {
+ return this.innerProperties() == null ? null : this.innerProperties().coordinatorStorageQuotaInMb();
+ }
+
+ /**
+ * Set the coordinatorStorageQuotaInMb property: The storage of a server in MB.
+ *
+ * @param coordinatorStorageQuotaInMb the coordinatorStorageQuotaInMb value to set.
+ * @return the ClusterResponseInner object itself.
+ */
+ public ClusterResponseInner withCoordinatorStorageQuotaInMb(Long coordinatorStorageQuotaInMb) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterResponseProperties();
+ }
+ this.innerProperties().withCoordinatorStorageQuotaInMb(coordinatorStorageQuotaInMb);
+ return this;
+ }
+
+ /**
+ * Get the coordinatorVCores property: The vCores count of a server (max: 64).
+ *
+ * @return the coordinatorVCores value.
+ */
+ public Long coordinatorVCores() {
+ return this.innerProperties() == null ? null : this.innerProperties().coordinatorVCores();
+ }
+
+ /**
+ * Set the coordinatorVCores property: The vCores count of a server (max: 64).
+ *
+ * @param coordinatorVCores the coordinatorVCores value to set.
+ * @return the ClusterResponseInner object itself.
+ */
+ public ClusterResponseInner withCoordinatorVCores(Long coordinatorVCores) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterResponseProperties();
+ }
+ this.innerProperties().withCoordinatorVCores(coordinatorVCores);
+ return this;
+ }
+
+ /**
+ * Get the coordinatorEnablePublicIpAccess property: If public IP is requested or not for a server.
+ *
+ * @return the coordinatorEnablePublicIpAccess value.
+ */
+ public Boolean coordinatorEnablePublicIpAccess() {
+ return this.innerProperties() == null ? null : this.innerProperties().coordinatorEnablePublicIpAccess();
+ }
+
+ /**
+ * Set the coordinatorEnablePublicIpAccess property: If public IP is requested or not for a server.
+ *
+ * @param coordinatorEnablePublicIpAccess the coordinatorEnablePublicIpAccess value to set.
+ * @return the ClusterResponseInner object itself.
+ */
+ public ClusterResponseInner withCoordinatorEnablePublicIpAccess(Boolean coordinatorEnablePublicIpAccess) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterResponseProperties();
+ }
+ this.innerProperties().withCoordinatorEnablePublicIpAccess(coordinatorEnablePublicIpAccess);
+ return this;
+ }
+
+ /**
+ * Get the nodeServerEdition property: The edition of a node server (default: MemoryOptimized).
+ *
+ * @return the nodeServerEdition value.
+ */
+ public String nodeServerEdition() {
+ return this.innerProperties() == null ? null : this.innerProperties().nodeServerEdition();
+ }
+
+ /**
+ * Set the nodeServerEdition property: The edition of a node server (default: MemoryOptimized).
+ *
+ * @param nodeServerEdition the nodeServerEdition value to set.
+ * @return the ClusterResponseInner object itself.
+ */
+ public ClusterResponseInner withNodeServerEdition(String nodeServerEdition) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterResponseProperties();
+ }
+ this.innerProperties().withNodeServerEdition(nodeServerEdition);
+ return this;
+ }
+
+ /**
+ * Get the nodeCount property: Worker node count of the cluster.
+ *
+ * @return the nodeCount value.
+ */
+ public Long nodeCount() {
+ return this.innerProperties() == null ? null : this.innerProperties().nodeCount();
+ }
+
+ /**
+ * Set the nodeCount property: Worker node count of the cluster.
+ *
+ * @param nodeCount the nodeCount value to set.
+ * @return the ClusterResponseInner object itself.
+ */
+ public ClusterResponseInner withNodeCount(Long nodeCount) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterResponseProperties();
+ }
+ this.innerProperties().withNodeCount(nodeCount);
+ return this;
+ }
+
+ /**
+ * Get the nodeStorageQuotaInMb property: The storage of a server in MB.
+ *
+ * @return the nodeStorageQuotaInMb value.
+ */
+ public Long nodeStorageQuotaInMb() {
+ return this.innerProperties() == null ? null : this.innerProperties().nodeStorageQuotaInMb();
+ }
+
+ /**
+ * Set the nodeStorageQuotaInMb property: The storage of a server in MB.
+ *
+ * @param nodeStorageQuotaInMb the nodeStorageQuotaInMb value to set.
+ * @return the ClusterResponseInner object itself.
+ */
+ public ClusterResponseInner withNodeStorageQuotaInMb(Long nodeStorageQuotaInMb) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterResponseProperties();
+ }
+ this.innerProperties().withNodeStorageQuotaInMb(nodeStorageQuotaInMb);
+ return this;
+ }
+
+ /**
+ * Get the nodeVCores property: The vCores count of a server (max: 64).
+ *
+ * @return the nodeVCores value.
+ */
+ public Long nodeVCores() {
+ return this.innerProperties() == null ? null : this.innerProperties().nodeVCores();
+ }
+
+ /**
+ * Set the nodeVCores property: The vCores count of a server (max: 64).
+ *
+ * @param nodeVCores the nodeVCores value to set.
+ * @return the ClusterResponseInner object itself.
+ */
+ public ClusterResponseInner withNodeVCores(Long nodeVCores) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterResponseProperties();
+ }
+ this.innerProperties().withNodeVCores(nodeVCores);
+ return this;
+ }
+
+ /**
+ * Get the nodeEnablePublicIpAccess property: If public IP is requested or not for a server.
+ *
+ * @return the nodeEnablePublicIpAccess value.
+ */
+ public Boolean nodeEnablePublicIpAccess() {
+ return this.innerProperties() == null ? null : this.innerProperties().nodeEnablePublicIpAccess();
+ }
+
+ /**
+ * Get the serverNames property: The list of server names in the cluster.
+ *
+ * @return the serverNames value.
+ */
+ public List serverNames() {
+ return this.innerProperties() == null ? null : this.innerProperties().serverNames();
+ }
+
+ /**
+ * Get the sourceResourceId property: The resource id of source cluster for read replica clusters.
+ *
+ * @return the sourceResourceId value.
+ */
+ public String sourceResourceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().sourceResourceId();
+ }
+
+ /**
+ * Get the sourceLocation property: The location of source cluster for read replica clusters.
+ *
+ * @return the sourceLocation value.
+ */
+ public String sourceLocation() {
+ return this.innerProperties() == null ? null : this.innerProperties().sourceLocation();
+ }
+
+ /**
+ * Get the readReplicas property: The array of read replica clusters.
+ *
+ * @return the readReplicas value.
+ */
+ public List readReplicas() {
+ return this.innerProperties() == null ? null : this.innerProperties().readReplicas();
+ }
+
+ /**
+ * Get the earliestRestoreTime property: The earliest restore point time (ISO8601 format) for the cluster.
+ *
+ * @return the earliestRestoreTime value.
+ */
+ public OffsetDateTime earliestRestoreTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().earliestRestoreTime();
+ }
+
+ /**
+ * Get the privateEndpointConnections property: The private endpoint connections for a cluster.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterResponseProperties.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterResponseProperties.java
new file mode 100644
index 0000000000000..28be7123bf56e
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterResponseProperties.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.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.postgresqlhsc.models.MaintenanceWindow;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.postgresqlhsc.models.ServerNameItem;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+
+/** Properties of the cluster response body. */
+@Fluent
+public final class ClusterResponseProperties {
+ /*
+ * Provisioning state of the cluster
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private String provisioningState;
+
+ /*
+ * A state of a cluster/server that is visible to user.
+ */
+ @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
+ private String state;
+
+ /*
+ * The PostgreSQL version of cluster.
+ */
+ @JsonProperty(value = "postgresqlVersion")
+ private String postgresqlVersion;
+
+ /*
+ * The Citus version of cluster.
+ */
+ @JsonProperty(value = "citusVersion")
+ private String citusVersion;
+
+ /*
+ * Maintenance window of a cluster.
+ */
+ @JsonProperty(value = "maintenanceWindow")
+ private MaintenanceWindow maintenanceWindow;
+
+ /*
+ * Preferred primary zone for the cluster
+ */
+ @JsonProperty(value = "preferredPrimaryZone")
+ private String preferredPrimaryZone;
+
+ /*
+ * If shards on coordinator is enabled or not for the cluster.
+ */
+ @JsonProperty(value = "enableShardsOnCoordinator")
+ private Boolean enableShardsOnCoordinator;
+
+ /*
+ * If high availability is enabled or not for the server.
+ */
+ @JsonProperty(value = "enableHa")
+ private Boolean enableHa;
+
+ /*
+ * The edition of a coordinator server (default: GeneralPurpose).
+ */
+ @JsonProperty(value = "coordinatorServerEdition")
+ private String coordinatorServerEdition;
+
+ /*
+ * The storage of a server in MB.
+ */
+ @JsonProperty(value = "coordinatorStorageQuotaInMb")
+ private Long coordinatorStorageQuotaInMb;
+
+ /*
+ * The vCores count of a server (max: 64).
+ */
+ @JsonProperty(value = "coordinatorVCores")
+ private Long coordinatorVCores;
+
+ /*
+ * If public IP is requested or not for a server.
+ */
+ @JsonProperty(value = "coordinatorEnablePublicIpAccess")
+ private Boolean coordinatorEnablePublicIpAccess;
+
+ /*
+ * The edition of a node server (default: MemoryOptimized).
+ */
+ @JsonProperty(value = "nodeServerEdition")
+ private String nodeServerEdition;
+
+ /*
+ * Worker node count of the cluster
+ */
+ @JsonProperty(value = "nodeCount")
+ private Long nodeCount;
+
+ /*
+ * The storage of a server in MB.
+ */
+ @JsonProperty(value = "nodeStorageQuotaInMb")
+ private Long nodeStorageQuotaInMb;
+
+ /*
+ * The vCores count of a server (max: 64).
+ */
+ @JsonProperty(value = "nodeVCores")
+ private Long nodeVCores;
+
+ /*
+ * If public IP is requested or not for a server.
+ */
+ @JsonProperty(value = "nodeEnablePublicIpAccess", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean nodeEnablePublicIpAccess;
+
+ /*
+ * The list of server names in the cluster
+ */
+ @JsonProperty(value = "serverNames", access = JsonProperty.Access.WRITE_ONLY)
+ private List serverNames;
+
+ /*
+ * The resource id of source cluster for read replica clusters.
+ */
+ @JsonProperty(value = "sourceResourceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String sourceResourceId;
+
+ /*
+ * The location of source cluster for read replica clusters.
+ */
+ @JsonProperty(value = "sourceLocation", access = JsonProperty.Access.WRITE_ONLY)
+ private String sourceLocation;
+
+ /*
+ * The array of read replica clusters.
+ */
+ @JsonProperty(value = "readReplicas", access = JsonProperty.Access.WRITE_ONLY)
+ private List readReplicas;
+
+ /*
+ * The earliest restore point time (ISO8601 format) for the cluster.
+ */
+ @JsonProperty(value = "earliestRestoreTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime earliestRestoreTime;
+
+ /*
+ * The private endpoint connections for a cluster.
+ */
+ @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
+ private List privateEndpointConnections;
+
+ /** Creates an instance of ClusterResponseProperties class. */
+ public ClusterResponseProperties() {
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the cluster.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the state property: A state of a cluster/server that is visible to user.
+ *
+ * @return the state value.
+ */
+ public String state() {
+ return this.state;
+ }
+
+ /**
+ * Get the postgresqlVersion property: The PostgreSQL version of cluster.
+ *
+ * @return the postgresqlVersion value.
+ */
+ public String postgresqlVersion() {
+ return this.postgresqlVersion;
+ }
+
+ /**
+ * Set the postgresqlVersion property: The PostgreSQL version of cluster.
+ *
+ * @param postgresqlVersion the postgresqlVersion value to set.
+ * @return the ClusterResponseProperties object itself.
+ */
+ public ClusterResponseProperties withPostgresqlVersion(String postgresqlVersion) {
+ this.postgresqlVersion = postgresqlVersion;
+ return this;
+ }
+
+ /**
+ * Get the citusVersion property: The Citus version of cluster.
+ *
+ * @return the citusVersion value.
+ */
+ public String citusVersion() {
+ return this.citusVersion;
+ }
+
+ /**
+ * Set the citusVersion property: The Citus version of cluster.
+ *
+ * @param citusVersion the citusVersion value to set.
+ * @return the ClusterResponseProperties object itself.
+ */
+ public ClusterResponseProperties withCitusVersion(String citusVersion) {
+ this.citusVersion = citusVersion;
+ return this;
+ }
+
+ /**
+ * Get the maintenanceWindow property: Maintenance window of a cluster.
+ *
+ * @return the maintenanceWindow value.
+ */
+ public MaintenanceWindow maintenanceWindow() {
+ return this.maintenanceWindow;
+ }
+
+ /**
+ * Set the maintenanceWindow property: Maintenance window of a cluster.
+ *
+ * @param maintenanceWindow the maintenanceWindow value to set.
+ * @return the ClusterResponseProperties object itself.
+ */
+ public ClusterResponseProperties withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
+ this.maintenanceWindow = maintenanceWindow;
+ return this;
+ }
+
+ /**
+ * Get the preferredPrimaryZone property: Preferred primary zone for the cluster.
+ *
+ * @return the preferredPrimaryZone value.
+ */
+ public String preferredPrimaryZone() {
+ return this.preferredPrimaryZone;
+ }
+
+ /**
+ * Set the preferredPrimaryZone property: Preferred primary zone for the cluster.
+ *
+ * @param preferredPrimaryZone the preferredPrimaryZone value to set.
+ * @return the ClusterResponseProperties object itself.
+ */
+ public ClusterResponseProperties withPreferredPrimaryZone(String preferredPrimaryZone) {
+ this.preferredPrimaryZone = preferredPrimaryZone;
+ return this;
+ }
+
+ /**
+ * Get the enableShardsOnCoordinator property: If shards on coordinator is enabled or not for the cluster.
+ *
+ * @return the enableShardsOnCoordinator value.
+ */
+ public Boolean enableShardsOnCoordinator() {
+ return this.enableShardsOnCoordinator;
+ }
+
+ /**
+ * Set the enableShardsOnCoordinator property: If shards on coordinator is enabled or not for the cluster.
+ *
+ * @param enableShardsOnCoordinator the enableShardsOnCoordinator value to set.
+ * @return the ClusterResponseProperties object itself.
+ */
+ public ClusterResponseProperties withEnableShardsOnCoordinator(Boolean enableShardsOnCoordinator) {
+ this.enableShardsOnCoordinator = enableShardsOnCoordinator;
+ return this;
+ }
+
+ /**
+ * Get the enableHa property: If high availability is enabled or not for the server.
+ *
+ * @return the enableHa value.
+ */
+ public Boolean enableHa() {
+ return this.enableHa;
+ }
+
+ /**
+ * Set the enableHa property: If high availability is enabled or not for the server.
+ *
+ * @param enableHa the enableHa value to set.
+ * @return the ClusterResponseProperties object itself.
+ */
+ public ClusterResponseProperties withEnableHa(Boolean enableHa) {
+ this.enableHa = enableHa;
+ return this;
+ }
+
+ /**
+ * Get the coordinatorServerEdition property: The edition of a coordinator server (default: GeneralPurpose).
+ *
+ * @return the coordinatorServerEdition value.
+ */
+ public String coordinatorServerEdition() {
+ return this.coordinatorServerEdition;
+ }
+
+ /**
+ * Set the coordinatorServerEdition property: The edition of a coordinator server (default: GeneralPurpose).
+ *
+ * @param coordinatorServerEdition the coordinatorServerEdition value to set.
+ * @return the ClusterResponseProperties object itself.
+ */
+ public ClusterResponseProperties withCoordinatorServerEdition(String coordinatorServerEdition) {
+ this.coordinatorServerEdition = coordinatorServerEdition;
+ return this;
+ }
+
+ /**
+ * Get the coordinatorStorageQuotaInMb property: The storage of a server in MB.
+ *
+ * @return the coordinatorStorageQuotaInMb value.
+ */
+ public Long coordinatorStorageQuotaInMb() {
+ return this.coordinatorStorageQuotaInMb;
+ }
+
+ /**
+ * Set the coordinatorStorageQuotaInMb property: The storage of a server in MB.
+ *
+ * @param coordinatorStorageQuotaInMb the coordinatorStorageQuotaInMb value to set.
+ * @return the ClusterResponseProperties object itself.
+ */
+ public ClusterResponseProperties withCoordinatorStorageQuotaInMb(Long coordinatorStorageQuotaInMb) {
+ this.coordinatorStorageQuotaInMb = coordinatorStorageQuotaInMb;
+ return this;
+ }
+
+ /**
+ * Get the coordinatorVCores property: The vCores count of a server (max: 64).
+ *
+ * @return the coordinatorVCores value.
+ */
+ public Long coordinatorVCores() {
+ return this.coordinatorVCores;
+ }
+
+ /**
+ * Set the coordinatorVCores property: The vCores count of a server (max: 64).
+ *
+ * @param coordinatorVCores the coordinatorVCores value to set.
+ * @return the ClusterResponseProperties object itself.
+ */
+ public ClusterResponseProperties withCoordinatorVCores(Long coordinatorVCores) {
+ this.coordinatorVCores = coordinatorVCores;
+ return this;
+ }
+
+ /**
+ * Get the coordinatorEnablePublicIpAccess property: If public IP is requested or not for a server.
+ *
+ * @return the coordinatorEnablePublicIpAccess value.
+ */
+ public Boolean coordinatorEnablePublicIpAccess() {
+ return this.coordinatorEnablePublicIpAccess;
+ }
+
+ /**
+ * Set the coordinatorEnablePublicIpAccess property: If public IP is requested or not for a server.
+ *
+ * @param coordinatorEnablePublicIpAccess the coordinatorEnablePublicIpAccess value to set.
+ * @return the ClusterResponseProperties object itself.
+ */
+ public ClusterResponseProperties withCoordinatorEnablePublicIpAccess(Boolean coordinatorEnablePublicIpAccess) {
+ this.coordinatorEnablePublicIpAccess = coordinatorEnablePublicIpAccess;
+ return this;
+ }
+
+ /**
+ * Get the nodeServerEdition property: The edition of a node server (default: MemoryOptimized).
+ *
+ * @return the nodeServerEdition value.
+ */
+ public String nodeServerEdition() {
+ return this.nodeServerEdition;
+ }
+
+ /**
+ * Set the nodeServerEdition property: The edition of a node server (default: MemoryOptimized).
+ *
+ * @param nodeServerEdition the nodeServerEdition value to set.
+ * @return the ClusterResponseProperties object itself.
+ */
+ public ClusterResponseProperties withNodeServerEdition(String nodeServerEdition) {
+ this.nodeServerEdition = nodeServerEdition;
+ return this;
+ }
+
+ /**
+ * Get the nodeCount property: Worker node count of the cluster.
+ *
+ * @return the nodeCount value.
+ */
+ public Long nodeCount() {
+ return this.nodeCount;
+ }
+
+ /**
+ * Set the nodeCount property: Worker node count of the cluster.
+ *
+ * @param nodeCount the nodeCount value to set.
+ * @return the ClusterResponseProperties object itself.
+ */
+ public ClusterResponseProperties withNodeCount(Long nodeCount) {
+ this.nodeCount = nodeCount;
+ return this;
+ }
+
+ /**
+ * Get the nodeStorageQuotaInMb property: The storage of a server in MB.
+ *
+ * @return the nodeStorageQuotaInMb value.
+ */
+ public Long nodeStorageQuotaInMb() {
+ return this.nodeStorageQuotaInMb;
+ }
+
+ /**
+ * Set the nodeStorageQuotaInMb property: The storage of a server in MB.
+ *
+ * @param nodeStorageQuotaInMb the nodeStorageQuotaInMb value to set.
+ * @return the ClusterResponseProperties object itself.
+ */
+ public ClusterResponseProperties withNodeStorageQuotaInMb(Long nodeStorageQuotaInMb) {
+ this.nodeStorageQuotaInMb = nodeStorageQuotaInMb;
+ return this;
+ }
+
+ /**
+ * Get the nodeVCores property: The vCores count of a server (max: 64).
+ *
+ * @return the nodeVCores value.
+ */
+ public Long nodeVCores() {
+ return this.nodeVCores;
+ }
+
+ /**
+ * Set the nodeVCores property: The vCores count of a server (max: 64).
+ *
+ * @param nodeVCores the nodeVCores value to set.
+ * @return the ClusterResponseProperties object itself.
+ */
+ public ClusterResponseProperties withNodeVCores(Long nodeVCores) {
+ this.nodeVCores = nodeVCores;
+ return this;
+ }
+
+ /**
+ * Get the nodeEnablePublicIpAccess property: If public IP is requested or not for a server.
+ *
+ * @return the nodeEnablePublicIpAccess value.
+ */
+ public Boolean nodeEnablePublicIpAccess() {
+ return this.nodeEnablePublicIpAccess;
+ }
+
+ /**
+ * Get the serverNames property: The list of server names in the cluster.
+ *
+ * @return the serverNames value.
+ */
+ public List serverNames() {
+ return this.serverNames;
+ }
+
+ /**
+ * Get the sourceResourceId property: The resource id of source cluster for read replica clusters.
+ *
+ * @return the sourceResourceId value.
+ */
+ public String sourceResourceId() {
+ return this.sourceResourceId;
+ }
+
+ /**
+ * Get the sourceLocation property: The location of source cluster for read replica clusters.
+ *
+ * @return the sourceLocation value.
+ */
+ public String sourceLocation() {
+ return this.sourceLocation;
+ }
+
+ /**
+ * Get the readReplicas property: The array of read replica clusters.
+ *
+ * @return the readReplicas value.
+ */
+ public List readReplicas() {
+ return this.readReplicas;
+ }
+
+ /**
+ * Get the earliestRestoreTime property: The earliest restore point time (ISO8601 format) for the cluster.
+ *
+ * @return the earliestRestoreTime value.
+ */
+ public OffsetDateTime earliestRestoreTime() {
+ return this.earliestRestoreTime;
+ }
+
+ /**
+ * Get the privateEndpointConnections property: The private endpoint connections for a cluster.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (maintenanceWindow() != null) {
+ maintenanceWindow().validate();
+ }
+ if (serverNames() != null) {
+ serverNames().forEach(e -> e.validate());
+ }
+ if (privateEndpointConnections() != null) {
+ privateEndpointConnections().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterServerInner.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterServerInner.java
new file mode 100644
index 0000000000000..c9e118728d233
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterServerInner.java
@@ -0,0 +1,280 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.postgresqlhsc.models.ServerRole;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents a server in a cluster. */
+@Fluent
+public final class ClusterServerInner extends ProxyResource {
+ /*
+ * The properties of a server in a cluster.
+ */
+ @JsonProperty(value = "properties")
+ private ClusterServerProperties 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 ClusterServerInner class. */
+ public ClusterServerInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of a server in a cluster.
+ *
+ * @return the innerProperties value.
+ */
+ private ClusterServerProperties 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 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 role property: The role of server in the cluster.
+ *
+ * @return the role value.
+ */
+ public ServerRole role() {
+ return this.innerProperties() == null ? null : this.innerProperties().role();
+ }
+
+ /**
+ * Set the role property: The role of server in the cluster.
+ *
+ * @param role the role value to set.
+ * @return the ClusterServerInner object itself.
+ */
+ public ClusterServerInner withRole(ServerRole role) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterServerProperties();
+ }
+ this.innerProperties().withRole(role);
+ return this;
+ }
+
+ /**
+ * Get the state property: A state of a cluster/server that is visible to user.
+ *
+ * @return the state value.
+ */
+ public String state() {
+ return this.innerProperties() == null ? null : this.innerProperties().state();
+ }
+
+ /**
+ * Get the haState property: A state of HA feature for the cluster.
+ *
+ * @return the haState value.
+ */
+ public String haState() {
+ return this.innerProperties() == null ? null : this.innerProperties().haState();
+ }
+
+ /**
+ * 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 ClusterServerInner object itself.
+ */
+ public ClusterServerInner withAvailabilityZone(String availabilityZone) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterServerProperties();
+ }
+ this.innerProperties().withAvailabilityZone(availabilityZone);
+ return this;
+ }
+
+ /**
+ * Get the postgresqlVersion property: The PostgreSQL version of server.
+ *
+ * @return the postgresqlVersion value.
+ */
+ public String postgresqlVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().postgresqlVersion();
+ }
+
+ /**
+ * Set the postgresqlVersion property: The PostgreSQL version of server.
+ *
+ * @param postgresqlVersion the postgresqlVersion value to set.
+ * @return the ClusterServerInner object itself.
+ */
+ public ClusterServerInner withPostgresqlVersion(String postgresqlVersion) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterServerProperties();
+ }
+ this.innerProperties().withPostgresqlVersion(postgresqlVersion);
+ return this;
+ }
+
+ /**
+ * Get the citusVersion property: The Citus version of server.
+ *
+ * @return the citusVersion value.
+ */
+ public String citusVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().citusVersion();
+ }
+
+ /**
+ * Set the citusVersion property: The Citus version of server.
+ *
+ * @param citusVersion the citusVersion value to set.
+ * @return the ClusterServerInner object itself.
+ */
+ public ClusterServerInner withCitusVersion(String citusVersion) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterServerProperties();
+ }
+ this.innerProperties().withCitusVersion(citusVersion);
+ return this;
+ }
+
+ /**
+ * Get the serverEdition property: The edition of a server.
+ *
+ * @return the serverEdition value.
+ */
+ public String serverEdition() {
+ return this.innerProperties() == null ? null : this.innerProperties().serverEdition();
+ }
+
+ /**
+ * Set the serverEdition property: The edition of a server.
+ *
+ * @param serverEdition the serverEdition value to set.
+ * @return the ClusterServerInner object itself.
+ */
+ public ClusterServerInner withServerEdition(String serverEdition) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterServerProperties();
+ }
+ this.innerProperties().withServerEdition(serverEdition);
+ return this;
+ }
+
+ /**
+ * Get the storageQuotaInMb property: The storage of a server in MB.
+ *
+ * @return the storageQuotaInMb value.
+ */
+ public Long storageQuotaInMb() {
+ return this.innerProperties() == null ? null : this.innerProperties().storageQuotaInMb();
+ }
+
+ /**
+ * Set the storageQuotaInMb property: The storage of a server in MB.
+ *
+ * @param storageQuotaInMb the storageQuotaInMb value to set.
+ * @return the ClusterServerInner object itself.
+ */
+ public ClusterServerInner withStorageQuotaInMb(Long storageQuotaInMb) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterServerProperties();
+ }
+ this.innerProperties().withStorageQuotaInMb(storageQuotaInMb);
+ return this;
+ }
+
+ /**
+ * Get the vCores property: The vCores count of a server (max: 64).
+ *
+ * @return the vCores value.
+ */
+ public Long vCores() {
+ return this.innerProperties() == null ? null : this.innerProperties().vCores();
+ }
+
+ /**
+ * Set the vCores property: The vCores count of a server (max: 64).
+ *
+ * @param vCores the vCores value to set.
+ * @return the ClusterServerInner object itself.
+ */
+ public ClusterServerInner withVCores(Long vCores) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterServerProperties();
+ }
+ this.innerProperties().withVCores(vCores);
+ return this;
+ }
+
+ /**
+ * Get the enableHa property: If high availability is enabled or not for the server.
+ *
+ * @return the enableHa value.
+ */
+ public Boolean enableHa() {
+ return this.innerProperties() == null ? null : this.innerProperties().enableHa();
+ }
+
+ /**
+ * Set the enableHa property: If high availability is enabled or not for the server.
+ *
+ * @param enableHa the enableHa value to set.
+ * @return the ClusterServerInner object itself.
+ */
+ public ClusterServerInner withEnableHa(Boolean enableHa) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterServerProperties();
+ }
+ this.innerProperties().withEnableHa(enableHa);
+ return this;
+ }
+
+ /**
+ * Get the enablePublicIp property: If public IP is requested or not for a server.
+ *
+ * @return the enablePublicIp value.
+ */
+ public Boolean enablePublicIp() {
+ return this.innerProperties() == null ? null : this.innerProperties().enablePublicIp();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterServerProperties.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterServerProperties.java
new file mode 100644
index 0000000000000..11b010b05ccd6
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterServerProperties.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.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.postgresqlhsc.models.ServerProperties;
+import com.azure.resourcemanager.postgresqlhsc.models.ServerRole;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties of a server in cluster. */
+@Fluent
+public final class ClusterServerProperties extends ServerProperties {
+ /*
+ * The fully qualified domain name of a server.
+ */
+ @JsonProperty(value = "fullyQualifiedDomainName", access = JsonProperty.Access.WRITE_ONLY)
+ private String fullyQualifiedDomainName;
+
+ /*
+ * The role of server in the cluster.
+ */
+ @JsonProperty(value = "role")
+ private ServerRole role;
+
+ /*
+ * A state of a cluster/server that is visible to user.
+ */
+ @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
+ private String state;
+
+ /*
+ * A state of HA feature for the cluster.
+ */
+ @JsonProperty(value = "haState", access = JsonProperty.Access.WRITE_ONLY)
+ private String haState;
+
+ /*
+ * Availability Zone information of the server.
+ */
+ @JsonProperty(value = "availabilityZone")
+ private String availabilityZone;
+
+ /*
+ * The PostgreSQL version of server.
+ */
+ @JsonProperty(value = "postgresqlVersion")
+ private String postgresqlVersion;
+
+ /*
+ * The Citus version of server.
+ */
+ @JsonProperty(value = "citusVersion")
+ private String citusVersion;
+
+ /** Creates an instance of ClusterServerProperties class. */
+ public ClusterServerProperties() {
+ }
+
+ /**
+ * Get the fullyQualifiedDomainName property: The fully qualified domain name of a server.
+ *
+ * @return the fullyQualifiedDomainName value.
+ */
+ public String fullyQualifiedDomainName() {
+ return this.fullyQualifiedDomainName;
+ }
+
+ /**
+ * Get the role property: The role of server in the cluster.
+ *
+ * @return the role value.
+ */
+ public ServerRole role() {
+ return this.role;
+ }
+
+ /**
+ * Set the role property: The role of server in the cluster.
+ *
+ * @param role the role value to set.
+ * @return the ClusterServerProperties object itself.
+ */
+ public ClusterServerProperties withRole(ServerRole role) {
+ this.role = role;
+ return this;
+ }
+
+ /**
+ * Get the state property: A state of a cluster/server that is visible to user.
+ *
+ * @return the state value.
+ */
+ public String state() {
+ return this.state;
+ }
+
+ /**
+ * Get the haState property: A state of HA feature for the cluster.
+ *
+ * @return the haState value.
+ */
+ public String haState() {
+ return this.haState;
+ }
+
+ /**
+ * 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 ClusterServerProperties object itself.
+ */
+ public ClusterServerProperties withAvailabilityZone(String availabilityZone) {
+ this.availabilityZone = availabilityZone;
+ return this;
+ }
+
+ /**
+ * Get the postgresqlVersion property: The PostgreSQL version of server.
+ *
+ * @return the postgresqlVersion value.
+ */
+ public String postgresqlVersion() {
+ return this.postgresqlVersion;
+ }
+
+ /**
+ * Set the postgresqlVersion property: The PostgreSQL version of server.
+ *
+ * @param postgresqlVersion the postgresqlVersion value to set.
+ * @return the ClusterServerProperties object itself.
+ */
+ public ClusterServerProperties withPostgresqlVersion(String postgresqlVersion) {
+ this.postgresqlVersion = postgresqlVersion;
+ return this;
+ }
+
+ /**
+ * Get the citusVersion property: The Citus version of server.
+ *
+ * @return the citusVersion value.
+ */
+ public String citusVersion() {
+ return this.citusVersion;
+ }
+
+ /**
+ * Set the citusVersion property: The Citus version of server.
+ *
+ * @param citusVersion the citusVersion value to set.
+ * @return the ClusterServerProperties object itself.
+ */
+ public ClusterServerProperties withCitusVersion(String citusVersion) {
+ this.citusVersion = citusVersion;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ClusterServerProperties withServerEdition(String serverEdition) {
+ super.withServerEdition(serverEdition);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ClusterServerProperties withStorageQuotaInMb(Long storageQuotaInMb) {
+ super.withStorageQuotaInMb(storageQuotaInMb);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ClusterServerProperties withVCores(Long vCores) {
+ super.withVCores(vCores);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ClusterServerProperties withEnableHa(Boolean enableHa) {
+ super.withEnableHa(enableHa);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ConfigurationInner.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ConfigurationInner.java
new file mode 100644
index 0000000000000..1b4decb898b4f
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ConfigurationInner.java
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.postgresqlhsc.models.ConfigurationDataType;
+import com.azure.resourcemanager.postgresqlhsc.models.ServerRoleGroupConfiguration;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Represents configuration details for coordinator and node. */
+@Fluent
+public final class ConfigurationInner extends ProxyResource {
+ /*
+ * The properties of 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 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 description property: Description of the configuration.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * 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 requiresRestart property: If configuration change requires restart.
+ *
+ * @return the requiresRestart value.
+ */
+ public Boolean requiresRestart() {
+ return this.innerProperties() == null ? null : this.innerProperties().requiresRestart();
+ }
+
+ /**
+ * Set the requiresRestart property: If configuration change requires restart.
+ *
+ * @param requiresRestart the requiresRestart value to set.
+ * @return the ConfigurationInner object itself.
+ */
+ public ConfigurationInner withRequiresRestart(Boolean requiresRestart) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ConfigurationProperties();
+ }
+ this.innerProperties().withRequiresRestart(requiresRestart);
+ return this;
+ }
+
+ /**
+ * Get the serverRoleGroupConfigurations property: The list of server role group configuration values.
+ *
+ * @return the serverRoleGroupConfigurations value.
+ */
+ public List serverRoleGroupConfigurations() {
+ return this.innerProperties() == null ? null : this.innerProperties().serverRoleGroupConfigurations();
+ }
+
+ /**
+ * Set the serverRoleGroupConfigurations property: The list of server role group configuration values.
+ *
+ * @param serverRoleGroupConfigurations the serverRoleGroupConfigurations value to set.
+ * @return the ConfigurationInner object itself.
+ */
+ public ConfigurationInner withServerRoleGroupConfigurations(
+ List serverRoleGroupConfigurations) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ConfigurationProperties();
+ }
+ this.innerProperties().withServerRoleGroupConfigurations(serverRoleGroupConfigurations);
+ 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/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ConfigurationProperties.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ConfigurationProperties.java
new file mode 100644
index 0000000000000..b49f16657679f
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ConfigurationProperties.java
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.postgresqlhsc.models.ConfigurationDataType;
+import com.azure.resourcemanager.postgresqlhsc.models.ServerRoleGroupConfiguration;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The properties of configuration. */
+@Fluent
+public final class ConfigurationProperties {
+ /*
+ * Description of the configuration.
+ */
+ @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
+ private String description;
+
+ /*
+ * 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;
+
+ /*
+ * If configuration change requires restart.
+ */
+ @JsonProperty(value = "requiresRestart")
+ private Boolean requiresRestart;
+
+ /*
+ * The list of server role group configuration values.
+ */
+ @JsonProperty(value = "serverRoleGroupConfigurations", required = true)
+ private List serverRoleGroupConfigurations;
+
+ /** Creates an instance of ConfigurationProperties class. */
+ public ConfigurationProperties() {
+ }
+
+ /**
+ * Get the description property: Description of the configuration.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * 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 requiresRestart property: If configuration change requires restart.
+ *
+ * @return the requiresRestart value.
+ */
+ public Boolean requiresRestart() {
+ return this.requiresRestart;
+ }
+
+ /**
+ * Set the requiresRestart property: If configuration change requires restart.
+ *
+ * @param requiresRestart the requiresRestart value to set.
+ * @return the ConfigurationProperties object itself.
+ */
+ public ConfigurationProperties withRequiresRestart(Boolean requiresRestart) {
+ this.requiresRestart = requiresRestart;
+ return this;
+ }
+
+ /**
+ * Get the serverRoleGroupConfigurations property: The list of server role group configuration values.
+ *
+ * @return the serverRoleGroupConfigurations value.
+ */
+ public List serverRoleGroupConfigurations() {
+ return this.serverRoleGroupConfigurations;
+ }
+
+ /**
+ * Set the serverRoleGroupConfigurations property: The list of server role group configuration values.
+ *
+ * @param serverRoleGroupConfigurations the serverRoleGroupConfigurations value to set.
+ * @return the ConfigurationProperties object itself.
+ */
+ public ConfigurationProperties withServerRoleGroupConfigurations(
+ List serverRoleGroupConfigurations) {
+ this.serverRoleGroupConfigurations = serverRoleGroupConfigurations;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (serverRoleGroupConfigurations() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property serverRoleGroupConfigurations in model ConfigurationProperties"));
+ } else {
+ serverRoleGroupConfigurations().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ConfigurationProperties.class);
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/FirewallRuleInner.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/FirewallRuleInner.java
new file mode 100644
index 0000000000000..87b49cda67b69
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/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.postgresqlhsc.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 cluster 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 cluster 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 cluster 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 cluster 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 cluster 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/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/FirewallRuleProperties.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/FirewallRuleProperties.java
new file mode 100644
index 0000000000000..051c3a86b0f66
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/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.postgresqlhsc.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 cluster firewall rule. */
+@Fluent
+public final class FirewallRuleProperties {
+ /*
+ * The start IP address of the cluster firewall rule. Must be IPv4 format.
+ */
+ @JsonProperty(value = "startIpAddress", required = true)
+ private String startIpAddress;
+
+ /*
+ * The end IP address of the cluster 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 cluster 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 cluster 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 cluster 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 cluster 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/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/NameAvailabilityInner.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/NameAvailabilityInner.java
new file mode 100644
index 0000000000000..29f4d3af15e55
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/NameAvailabilityInner.java
@@ -0,0 +1,128 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents a resource name availability. */
+@Fluent
+public final class NameAvailabilityInner {
+ /*
+ * Error Message.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /*
+ * Indicates whether the resource name is available.
+ */
+ @JsonProperty(value = "nameAvailable")
+ private Boolean nameAvailable;
+
+ /*
+ * name of the cluster.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * type of the cluster
+ */
+ @JsonProperty(value = "type")
+ private String type;
+
+ /** Creates an instance of NameAvailabilityInner class. */
+ public NameAvailabilityInner() {
+ }
+
+ /**
+ * Get the message property: Error Message.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set the message property: Error Message.
+ *
+ * @param message the message value to set.
+ * @return the NameAvailabilityInner object itself.
+ */
+ public NameAvailabilityInner withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get the nameAvailable property: Indicates whether the resource name is available.
+ *
+ * @return the nameAvailable value.
+ */
+ public Boolean nameAvailable() {
+ return this.nameAvailable;
+ }
+
+ /**
+ * Set the nameAvailable property: Indicates whether the resource name is available.
+ *
+ * @param nameAvailable the nameAvailable value to set.
+ * @return the NameAvailabilityInner object itself.
+ */
+ public NameAvailabilityInner withNameAvailable(Boolean nameAvailable) {
+ this.nameAvailable = nameAvailable;
+ return this;
+ }
+
+ /**
+ * Get the name property: name of the cluster.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: name of the cluster.
+ *
+ * @param name the name value to set.
+ * @return the NameAvailabilityInner object itself.
+ */
+ public NameAvailabilityInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the type property: type of the cluster.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: type of the cluster.
+ *
+ * @param type the type value to set.
+ * @return the NameAvailabilityInner object itself.
+ */
+ public NameAvailabilityInner withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/OperationInner.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/OperationInner.java
new file mode 100644
index 0000000000000..0a1571c1fea5c
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/OperationInner.java
@@ -0,0 +1,118 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.postgresqlhsc.models.OperationDisplay;
+import com.azure.resourcemanager.postgresqlhsc.models.OperationOrigin;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** REST API operation definition. */
+@Fluent
+public final class OperationInner {
+ /*
+ * The name of the operation being performed on this particular object.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The localized display information for this particular operation or action.
+ */
+ @JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY)
+ private OperationDisplay display;
+
+ /*
+ * Indicates whether the operation is a data action
+ */
+ @JsonProperty(value = "isDataAction")
+ private Boolean isDataAction;
+
+ /*
+ * The intended executor of the operation.
+ */
+ @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
+ private OperationOrigin origin;
+
+ /*
+ * Additional descriptions for the operation.
+ */
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map properties;
+
+ /** Creates an instance of OperationInner class. */
+ public OperationInner() {
+ }
+
+ /**
+ * Get the name property: The name of the operation being performed on this particular object.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the display property: The localized display information for this particular operation or action.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Get the isDataAction property: Indicates whether the operation is a data action.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Set the isDataAction property: Indicates whether the operation is a data action.
+ *
+ * @param isDataAction the isDataAction value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withIsDataAction(Boolean isDataAction) {
+ this.isDataAction = isDataAction;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation.
+ *
+ * @return the origin value.
+ */
+ public OperationOrigin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the properties property: Additional descriptions for the operation.
+ *
+ * @return the properties value.
+ */
+ public Map properties() {
+ return this.properties;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateEndpointConnectionActionRequestProperties.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateEndpointConnectionActionRequestProperties.java
new file mode 100644
index 0000000000000..4be3dcf224b90
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateEndpointConnectionActionRequestProperties.java
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties used to create a private endpoint connection. */
+@Fluent
+public final class PrivateEndpointConnectionActionRequestProperties {
+ /*
+ * Private endpoint which the connection belongs to.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Connection state of the private endpoint connection.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState")
+ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /** Creates an instance of PrivateEndpointConnectionActionRequestProperties class. */
+ public PrivateEndpointConnectionActionRequestProperties() {
+ }
+
+ /**
+ * Get the id property: Private endpoint which the connection belongs to.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Private endpoint which the connection belongs to.
+ *
+ * @param id the id value to set.
+ * @return the PrivateEndpointConnectionActionRequestProperties object itself.
+ */
+ public PrivateEndpointConnectionActionRequestProperties withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: Connection state of the private endpoint connection.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: Connection state of the private endpoint connection.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionActionRequestProperties object itself.
+ */
+ public PrivateEndpointConnectionActionRequestProperties withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateLinkServiceConnectionState() != null) {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateEndpointConnectionProperties.java
new file mode 100644
index 0000000000000..c4ca6fb6243a4
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateEndpointConnectionProperties.java
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateEndpointProperty;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateLinkServiceConnectionStateProperty;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The properties in private endpoint connection. */
+@Fluent
+public final class PrivateEndpointConnectionProperties {
+ /*
+ * Private endpoint which the connection belongs to.
+ */
+ @JsonProperty(value = "privateEndpoint")
+ private PrivateEndpointProperty privateEndpoint;
+
+ /*
+ * Group ids of the private endpoint connection.
+ */
+ @JsonProperty(value = "groupIds")
+ private List groupIds;
+
+ /*
+ * Connection state of the private endpoint connection.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState")
+ private PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState;
+
+ /*
+ * State of the private endpoint connection.
+ */
+ @JsonProperty(value = "provisioningState")
+ private String provisioningState;
+
+ /** Creates an instance of PrivateEndpointConnectionProperties class. */
+ public PrivateEndpointConnectionProperties() {
+ }
+
+ /**
+ * Get the privateEndpoint property: Private endpoint which the connection belongs to.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpointProperty privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint property: Private endpoint which the connection belongs to.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpointProperty privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the groupIds property: Group ids of the private endpoint connection.
+ *
+ * @return the groupIds value.
+ */
+ public List groupIds() {
+ return this.groupIds;
+ }
+
+ /**
+ * Set the groupIds property: Group ids of the private endpoint connection.
+ *
+ * @param groupIds the groupIds value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withGroupIds(List groupIds) {
+ this.groupIds = groupIds;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: Connection state of the private endpoint connection.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: Connection state of the private endpoint connection.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: State of the private endpoint connection.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Set the provisioningState property: State of the private endpoint connection.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withProvisioningState(String provisioningState) {
+ this.provisioningState = provisioningState;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpoint() != null) {
+ privateEndpoint().validate();
+ }
+ if (privateLinkServiceConnectionState() != null) {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateEndpointConnectionPropertyInner.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateEndpointConnectionPropertyInner.java
new file mode 100644
index 0000000000000..fb56917d9d56d
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateEndpointConnectionPropertyInner.java
@@ -0,0 +1,155 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateEndpointProperty;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateLinkServiceConnectionStateProperty;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A private endpoint connection property. */
+@Fluent
+public final class PrivateEndpointConnectionPropertyInner extends ProxyResource {
+ /*
+ * Properties of the private endpoint connection.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateEndpointConnectionProperties 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 PrivateEndpointConnectionPropertyInner class. */
+ public PrivateEndpointConnectionPropertyInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Properties of the private endpoint connection.
+ *
+ * @return the innerProperties value.
+ */
+ private PrivateEndpointConnectionProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the privateEndpoint property: Private endpoint which the connection belongs to.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpointProperty privateEndpoint() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint();
+ }
+
+ /**
+ * Set the privateEndpoint property: Private endpoint which the connection belongs to.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionPropertyInner object itself.
+ */
+ public PrivateEndpointConnectionPropertyInner withPrivateEndpoint(PrivateEndpointProperty privateEndpoint) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateEndpoint(privateEndpoint);
+ return this;
+ }
+
+ /**
+ * Get the groupIds property: Group ids of the private endpoint connection.
+ *
+ * @return the groupIds value.
+ */
+ public List groupIds() {
+ return this.innerProperties() == null ? null : this.innerProperties().groupIds();
+ }
+
+ /**
+ * Set the groupIds property: Group ids of the private endpoint connection.
+ *
+ * @param groupIds the groupIds value to set.
+ * @return the PrivateEndpointConnectionPropertyInner object itself.
+ */
+ public PrivateEndpointConnectionPropertyInner withGroupIds(List groupIds) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withGroupIds(groupIds);
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: Connection state of the private endpoint connection.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState();
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: Connection state of the private endpoint connection.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionPropertyInner object itself.
+ */
+ public PrivateEndpointConnectionPropertyInner withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: State of the private endpoint connection.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Set the provisioningState property: State of the private endpoint connection.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the PrivateEndpointConnectionPropertyInner object itself.
+ */
+ public PrivateEndpointConnectionPropertyInner withProvisioningState(String provisioningState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withProvisioningState(provisioningState);
+ 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/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateEndpointConnectionSimpleProperties.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateEndpointConnectionSimpleProperties.java
new file mode 100644
index 0000000000000..256fe3e8b42dc
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateEndpointConnectionSimpleProperties.java
@@ -0,0 +1,112 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateEndpointProperty;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateLinkServiceConnectionStateProperty;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The properties in private endpoint connection. */
+@Fluent
+public final class PrivateEndpointConnectionSimpleProperties {
+ /*
+ * Private endpoint which the connection belongs to.
+ */
+ @JsonProperty(value = "privateEndpoint")
+ private PrivateEndpointProperty privateEndpoint;
+
+ /*
+ * Group ids of the private endpoint connection.
+ */
+ @JsonProperty(value = "groupIds")
+ private List groupIds;
+
+ /*
+ * Connection state of the private endpoint connection.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState")
+ private PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState;
+
+ /** Creates an instance of PrivateEndpointConnectionSimpleProperties class. */
+ public PrivateEndpointConnectionSimpleProperties() {
+ }
+
+ /**
+ * Get the privateEndpoint property: Private endpoint which the connection belongs to.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpointProperty privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint property: Private endpoint which the connection belongs to.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionSimpleProperties object itself.
+ */
+ public PrivateEndpointConnectionSimpleProperties withPrivateEndpoint(PrivateEndpointProperty privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the groupIds property: Group ids of the private endpoint connection.
+ *
+ * @return the groupIds value.
+ */
+ public List groupIds() {
+ return this.groupIds;
+ }
+
+ /**
+ * Set the groupIds property: Group ids of the private endpoint connection.
+ *
+ * @param groupIds the groupIds value to set.
+ * @return the PrivateEndpointConnectionSimpleProperties object itself.
+ */
+ public PrivateEndpointConnectionSimpleProperties withGroupIds(List groupIds) {
+ this.groupIds = groupIds;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: Connection state of the private endpoint connection.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: Connection state of the private endpoint connection.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionSimpleProperties object itself.
+ */
+ public PrivateEndpointConnectionSimpleProperties withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpoint() != null) {
+ privateEndpoint().validate();
+ }
+ if (privateLinkServiceConnectionState() != null) {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateLinkResourceInner.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateLinkResourceInner.java
new file mode 100644
index 0000000000000..aba3f7ede812d
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateLinkResourceInner.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.postgresqlhsc.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;
+import java.util.List;
+
+/** A private link resource. */
+@Fluent
+public final class PrivateLinkResourceInner extends ProxyResource {
+ /*
+ * Properties of the private link resource.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateLinkResourceProperties 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 PrivateLinkResourceInner class. */
+ public PrivateLinkResourceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Properties of the private link resource.
+ *
+ * @return the innerProperties value.
+ */
+ private PrivateLinkResourceProperties 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 groupId property: The private link resource group id.
+ *
+ * @return the groupId value.
+ */
+ public String groupId() {
+ return this.innerProperties() == null ? null : this.innerProperties().groupId();
+ }
+
+ /**
+ * Set the groupId property: The private link resource group id.
+ *
+ * @param groupId the groupId value to set.
+ * @return the PrivateLinkResourceInner object itself.
+ */
+ public PrivateLinkResourceInner withGroupId(String groupId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateLinkResourceProperties();
+ }
+ this.innerProperties().withGroupId(groupId);
+ return this;
+ }
+
+ /**
+ * Get the requiredMembers property: The private link resource required member names.
+ *
+ * @return the requiredMembers value.
+ */
+ public List requiredMembers() {
+ return this.innerProperties() == null ? null : this.innerProperties().requiredMembers();
+ }
+
+ /**
+ * Set the requiredMembers property: The private link resource required member names.
+ *
+ * @param requiredMembers the requiredMembers value to set.
+ * @return the PrivateLinkResourceInner object itself.
+ */
+ public PrivateLinkResourceInner withRequiredMembers(List requiredMembers) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateLinkResourceProperties();
+ }
+ this.innerProperties().withRequiredMembers(requiredMembers);
+ return this;
+ }
+
+ /**
+ * Get the requiredZoneNames property: The private link resource zone names.
+ *
+ * @return the requiredZoneNames value.
+ */
+ public List requiredZoneNames() {
+ return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames();
+ }
+
+ /**
+ * Set the requiredZoneNames property: The private link resource zone names.
+ *
+ * @param requiredZoneNames the requiredZoneNames value to set.
+ * @return the PrivateLinkResourceInner object itself.
+ */
+ public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateLinkResourceProperties();
+ }
+ this.innerProperties().withRequiredZoneNames(requiredZoneNames);
+ 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/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateLinkResourceProperties.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateLinkResourceProperties.java
new file mode 100644
index 0000000000000..6d8f2643600fe
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateLinkResourceProperties.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.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of a private link resource. */
+@Fluent
+public final class PrivateLinkResourceProperties {
+ /*
+ * The private link resource group id.
+ */
+ @JsonProperty(value = "groupId")
+ private String groupId;
+
+ /*
+ * The private link resource required member names.
+ */
+ @JsonProperty(value = "requiredMembers")
+ private List requiredMembers;
+
+ /*
+ * The private link resource zone names.
+ */
+ @JsonProperty(value = "requiredZoneNames")
+ private List requiredZoneNames;
+
+ /** Creates an instance of PrivateLinkResourceProperties class. */
+ public PrivateLinkResourceProperties() {
+ }
+
+ /**
+ * Get the groupId property: The private link resource group id.
+ *
+ * @return the groupId value.
+ */
+ public String groupId() {
+ return this.groupId;
+ }
+
+ /**
+ * Set the groupId property: The private link resource group id.
+ *
+ * @param groupId the groupId value to set.
+ * @return the PrivateLinkResourceProperties object itself.
+ */
+ public PrivateLinkResourceProperties withGroupId(String groupId) {
+ this.groupId = groupId;
+ return this;
+ }
+
+ /**
+ * Get the requiredMembers property: The private link resource required member names.
+ *
+ * @return the requiredMembers value.
+ */
+ public List requiredMembers() {
+ return this.requiredMembers;
+ }
+
+ /**
+ * Set the requiredMembers property: The private link resource required member names.
+ *
+ * @param requiredMembers the requiredMembers value to set.
+ * @return the PrivateLinkResourceProperties object itself.
+ */
+ public PrivateLinkResourceProperties withRequiredMembers(List requiredMembers) {
+ this.requiredMembers = requiredMembers;
+ return this;
+ }
+
+ /**
+ * Get the requiredZoneNames property: The private link resource zone names.
+ *
+ * @return the requiredZoneNames value.
+ */
+ public List requiredZoneNames() {
+ return this.requiredZoneNames;
+ }
+
+ /**
+ * Set the requiredZoneNames property: The private link resource zone names.
+ *
+ * @param requiredZoneNames the requiredZoneNames value to set.
+ * @return the PrivateLinkResourceProperties object itself.
+ */
+ public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) {
+ this.requiredZoneNames = requiredZoneNames;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/RoleInner.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/RoleInner.java
new file mode 100644
index 0000000000000..f6d515acbe9a6
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/RoleInner.java
@@ -0,0 +1,82 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.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 cluster role. */
+@Fluent
+public final class RoleInner extends ProxyResource {
+ /*
+ * The properties of a role.
+ */
+ @JsonProperty(value = "properties")
+ private RoleProperties 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 RoleInner class. */
+ public RoleInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of a role.
+ *
+ * @return the innerProperties value.
+ */
+ private RoleProperties 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 password property: The password of the cluster role.
+ *
+ * @return the password value.
+ */
+ public String password() {
+ return this.innerProperties() == null ? null : this.innerProperties().password();
+ }
+
+ /**
+ * Set the password property: The password of the cluster role.
+ *
+ * @param password the password value to set.
+ * @return the RoleInner object itself.
+ */
+ public RoleInner withPassword(String password) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new RoleProperties();
+ }
+ this.innerProperties().withPassword(password);
+ 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/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/RoleProperties.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/RoleProperties.java
new file mode 100644
index 0000000000000..2ca871e57f790
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/RoleProperties.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.postgresqlhsc.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 cluster role. */
+@Fluent
+public final class RoleProperties {
+ /*
+ * The password of the cluster role.
+ */
+ @JsonProperty(value = "password", required = true)
+ private String password;
+
+ /** Creates an instance of RoleProperties class. */
+ public RoleProperties() {
+ }
+
+ /**
+ * Get the password property: The password of the cluster role.
+ *
+ * @return the password value.
+ */
+ public String password() {
+ return this.password;
+ }
+
+ /**
+ * Set the password property: The password of the cluster role.
+ *
+ * @param password the password value to set.
+ * @return the RoleProperties object itself.
+ */
+ public RoleProperties withPassword(String password) {
+ this.password = password;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (password() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property password in model RoleProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(RoleProperties.class);
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ServerConfigurationInner.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ServerConfigurationInner.java
new file mode 100644
index 0000000000000..c3f3d7a0840fb
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ServerConfigurationInner.java
@@ -0,0 +1,151 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.postgresqlhsc.models.ConfigurationDataType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents a configuration. */
+@Fluent
+public final class ServerConfigurationInner extends ProxyResource {
+ /*
+ * The properties of a configuration.
+ */
+ @JsonProperty(value = "properties")
+ private ServerConfigurationProperties 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 ServerConfigurationInner class. */
+ public ServerConfigurationInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of a configuration.
+ *
+ * @return the innerProperties value.
+ */
+ private ServerConfigurationProperties 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 ServerConfigurationInner object itself.
+ */
+ public ServerConfigurationInner withValue(String value) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerConfigurationProperties();
+ }
+ this.innerProperties().withValue(value);
+ return this;
+ }
+
+ /**
+ * Get the source property: Source of the configuration.
+ *
+ * @return the source value.
+ */
+ public String source() {
+ return this.innerProperties() == null ? null : this.innerProperties().source();
+ }
+
+ /**
+ * 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 requiresRestart property: If configuration change requires restart.
+ *
+ * @return the requiresRestart value.
+ */
+ public Boolean requiresRestart() {
+ return this.innerProperties() == null ? null : this.innerProperties().requiresRestart();
+ }
+
+ /**
+ * Set the requiresRestart property: If configuration change requires restart.
+ *
+ * @param requiresRestart the requiresRestart value to set.
+ * @return the ServerConfigurationInner object itself.
+ */
+ public ServerConfigurationInner withRequiresRestart(Boolean requiresRestart) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerConfigurationProperties();
+ }
+ this.innerProperties().withRequiresRestart(requiresRestart);
+ 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/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ServerConfigurationProperties.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ServerConfigurationProperties.java
new file mode 100644
index 0000000000000..bab818005e4f3
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ServerConfigurationProperties.java
@@ -0,0 +1,161 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.postgresqlhsc.models.ConfigurationDataType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties of a configuration. */
+@Fluent
+public final class ServerConfigurationProperties {
+ /*
+ * Value of the configuration.
+ */
+ @JsonProperty(value = "value", required = true)
+ private String value;
+
+ /*
+ * Source of the configuration.
+ */
+ @JsonProperty(value = "source", access = JsonProperty.Access.WRITE_ONLY)
+ private String source;
+
+ /*
+ * 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;
+
+ /*
+ * If configuration change requires restart.
+ */
+ @JsonProperty(value = "requiresRestart")
+ private Boolean requiresRestart;
+
+ /** Creates an instance of ServerConfigurationProperties class. */
+ public ServerConfigurationProperties() {
+ }
+
+ /**
+ * 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 ServerConfigurationProperties object itself.
+ */
+ public ServerConfigurationProperties withValue(String value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the source property: Source of the configuration.
+ *
+ * @return the source value.
+ */
+ public String source() {
+ return this.source;
+ }
+
+ /**
+ * 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 requiresRestart property: If configuration change requires restart.
+ *
+ * @return the requiresRestart value.
+ */
+ public Boolean requiresRestart() {
+ return this.requiresRestart;
+ }
+
+ /**
+ * Set the requiresRestart property: If configuration change requires restart.
+ *
+ * @param requiresRestart the requiresRestart value to set.
+ * @return the ServerConfigurationProperties object itself.
+ */
+ public ServerConfigurationProperties withRequiresRestart(Boolean requiresRestart) {
+ this.requiresRestart = requiresRestart;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property value in model ServerConfigurationProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ServerConfigurationProperties.class);
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ServerConfigurationRequestProperties.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ServerConfigurationRequestProperties.java
new file mode 100644
index 0000000000000..baf4c1cd14aae
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ServerConfigurationRequestProperties.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Represents a configuration properties. */
+@Fluent
+public final class ServerConfigurationRequestProperties {
+ /*
+ * Represents the value of a configuration.
+ */
+ @JsonProperty(value = "value")
+ private String value;
+
+ /** Creates an instance of ServerConfigurationRequestProperties class. */
+ public ServerConfigurationRequestProperties() {
+ }
+
+ /**
+ * Get the value property: Represents the value of a configuration.
+ *
+ * @return the value value.
+ */
+ public String value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Represents the value of a configuration.
+ *
+ * @param value the value value to set.
+ * @return the ServerConfigurationRequestProperties object itself.
+ */
+ public ServerConfigurationRequestProperties withValue(String value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/package-info.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/package-info.java
new file mode 100644
index 0000000000000..e9294895cb1c4
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/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 CosmosDBForPostgreSql. The Microsoft Azure management API provides
+ * create, read, update, and delete functionality for Cosmos DB for PostgreSQL resources including clusters, servers,
+ * databases, firewall rules, VNET rules, security alert policies, log files and configurations.
+ */
+package com.azure.resourcemanager.postgresqlhsc.fluent.models;
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/package-info.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/package-info.java
new file mode 100644
index 0000000000000..0897f0c8ed953
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/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 CosmosDBForPostgreSql. The Microsoft Azure management API provides create,
+ * read, update, and delete functionality for Cosmos DB for PostgreSQL resources including clusters, servers, databases,
+ * firewall rules, VNET rules, security alert policies, log files and configurations.
+ */
+package com.azure.resourcemanager.postgresqlhsc.fluent;
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClusterResponseImpl.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClusterResponseImpl.java
new file mode 100644
index 0000000000000..472648d4e1bd0
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClusterResponseImpl.java
@@ -0,0 +1,492 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.ClusterResponseInner;
+import com.azure.resourcemanager.postgresqlhsc.models.Cluster;
+import com.azure.resourcemanager.postgresqlhsc.models.ClusterForUpdate;
+import com.azure.resourcemanager.postgresqlhsc.models.ClusterResponse;
+import com.azure.resourcemanager.postgresqlhsc.models.MaintenanceWindow;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.postgresqlhsc.models.ServerNameItem;
+import java.time.OffsetDateTime;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class ClusterResponseImpl implements ClusterResponse, ClusterResponse.Definition, ClusterResponse.Update {
+ private ClusterResponseInner innerObject;
+
+ private final com.azure.resourcemanager.postgresqlhsc.PostgresqlhscManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public String state() {
+ return this.innerModel().state();
+ }
+
+ public String postgresqlVersion() {
+ return this.innerModel().postgresqlVersion();
+ }
+
+ public String citusVersion() {
+ return this.innerModel().citusVersion();
+ }
+
+ public MaintenanceWindow maintenanceWindow() {
+ return this.innerModel().maintenanceWindow();
+ }
+
+ public String preferredPrimaryZone() {
+ return this.innerModel().preferredPrimaryZone();
+ }
+
+ public Boolean enableShardsOnCoordinator() {
+ return this.innerModel().enableShardsOnCoordinator();
+ }
+
+ public Boolean enableHa() {
+ return this.innerModel().enableHa();
+ }
+
+ public String coordinatorServerEdition() {
+ return this.innerModel().coordinatorServerEdition();
+ }
+
+ public Long coordinatorStorageQuotaInMb() {
+ return this.innerModel().coordinatorStorageQuotaInMb();
+ }
+
+ public Long coordinatorVCores() {
+ return this.innerModel().coordinatorVCores();
+ }
+
+ public Boolean coordinatorEnablePublicIpAccess() {
+ return this.innerModel().coordinatorEnablePublicIpAccess();
+ }
+
+ public String nodeServerEdition() {
+ return this.innerModel().nodeServerEdition();
+ }
+
+ public Long nodeCount() {
+ return this.innerModel().nodeCount();
+ }
+
+ public Long nodeStorageQuotaInMb() {
+ return this.innerModel().nodeStorageQuotaInMb();
+ }
+
+ public Long nodeVCores() {
+ return this.innerModel().nodeVCores();
+ }
+
+ public Boolean nodeEnablePublicIpAccess() {
+ return this.innerModel().nodeEnablePublicIpAccess();
+ }
+
+ public List serverNames() {
+ List inner = this.innerModel().serverNames();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public String sourceResourceId() {
+ return this.innerModel().sourceResourceId();
+ }
+
+ public String sourceLocation() {
+ return this.innerModel().sourceLocation();
+ }
+
+ public List readReplicas() {
+ List inner = this.innerModel().readReplicas();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public OffsetDateTime earliestRestoreTime() {
+ return this.innerModel().earliestRestoreTime();
+ }
+
+ public List privateEndpointConnections() {
+ List inner = this.innerModel().privateEndpointConnections();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public ClusterResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.postgresqlhsc.PostgresqlhscManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String clusterName;
+
+ private Cluster createParameters;
+
+ private ClusterForUpdate updateParameters;
+
+ public ClusterResponseImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public ClusterResponse create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .createOrUpdate(resourceGroupName, clusterName, createParameters, Context.NONE);
+ return this;
+ }
+
+ public ClusterResponse create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .createOrUpdate(resourceGroupName, clusterName, createParameters, context);
+ return this;
+ }
+
+ ClusterResponseImpl(String name, com.azure.resourcemanager.postgresqlhsc.PostgresqlhscManager serviceManager) {
+ this.innerObject = new ClusterResponseInner();
+ this.serviceManager = serviceManager;
+ this.clusterName = name;
+ this.createParameters = new Cluster();
+ }
+
+ public ClusterResponseImpl update() {
+ this.updateParameters = new ClusterForUpdate();
+ return this;
+ }
+
+ public ClusterResponse apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .update(resourceGroupName, clusterName, updateParameters, Context.NONE);
+ return this;
+ }
+
+ public ClusterResponse apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .update(resourceGroupName, clusterName, updateParameters, context);
+ return this;
+ }
+
+ ClusterResponseImpl(
+ ClusterResponseInner innerObject, com.azure.resourcemanager.postgresqlhsc.PostgresqlhscManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "serverGroupsv2");
+ }
+
+ public ClusterResponse refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ClusterResponse refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .getByResourceGroupWithResponse(resourceGroupName, clusterName, context)
+ .getValue();
+ return this;
+ }
+
+ public void restart() {
+ serviceManager.clusters().restart(resourceGroupName, clusterName);
+ }
+
+ public void restart(Context context) {
+ serviceManager.clusters().restart(resourceGroupName, clusterName, context);
+ }
+
+ public void start() {
+ serviceManager.clusters().start(resourceGroupName, clusterName);
+ }
+
+ public void start(Context context) {
+ serviceManager.clusters().start(resourceGroupName, clusterName, context);
+ }
+
+ public void stop() {
+ serviceManager.clusters().stop(resourceGroupName, clusterName);
+ }
+
+ public void stop(Context context) {
+ serviceManager.clusters().stop(resourceGroupName, clusterName, context);
+ }
+
+ public void promoteReadReplica() {
+ serviceManager.clusters().promoteReadReplica(resourceGroupName, clusterName);
+ }
+
+ public void promoteReadReplica(Context context) {
+ serviceManager.clusters().promoteReadReplica(resourceGroupName, clusterName, context);
+ }
+
+ public ClusterResponseImpl withRegion(Region location) {
+ this.createParameters.withLocation(location.toString());
+ return this;
+ }
+
+ public ClusterResponseImpl withRegion(String location) {
+ this.createParameters.withLocation(location);
+ return this;
+ }
+
+ public ClusterResponseImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.createParameters.withTags(tags);
+ return this;
+ } else {
+ this.updateParameters.withTags(tags);
+ return this;
+ }
+ }
+
+ public ClusterResponseImpl withAdministratorLoginPassword(String administratorLoginPassword) {
+ if (isInCreateMode()) {
+ this.createParameters.withAdministratorLoginPassword(administratorLoginPassword);
+ return this;
+ } else {
+ this.updateParameters.withAdministratorLoginPassword(administratorLoginPassword);
+ return this;
+ }
+ }
+
+ public ClusterResponseImpl withPostgresqlVersion(String postgresqlVersion) {
+ if (isInCreateMode()) {
+ this.createParameters.withPostgresqlVersion(postgresqlVersion);
+ return this;
+ } else {
+ this.updateParameters.withPostgresqlVersion(postgresqlVersion);
+ return this;
+ }
+ }
+
+ public ClusterResponseImpl withCitusVersion(String citusVersion) {
+ if (isInCreateMode()) {
+ this.createParameters.withCitusVersion(citusVersion);
+ return this;
+ } else {
+ this.updateParameters.withCitusVersion(citusVersion);
+ return this;
+ }
+ }
+
+ public ClusterResponseImpl withEnableShardsOnCoordinator(Boolean enableShardsOnCoordinator) {
+ if (isInCreateMode()) {
+ this.createParameters.withEnableShardsOnCoordinator(enableShardsOnCoordinator);
+ return this;
+ } else {
+ this.updateParameters.withEnableShardsOnCoordinator(enableShardsOnCoordinator);
+ return this;
+ }
+ }
+
+ public ClusterResponseImpl withEnableHa(Boolean enableHa) {
+ if (isInCreateMode()) {
+ this.createParameters.withEnableHa(enableHa);
+ return this;
+ } else {
+ this.updateParameters.withEnableHa(enableHa);
+ return this;
+ }
+ }
+
+ public ClusterResponseImpl withPreferredPrimaryZone(String preferredPrimaryZone) {
+ if (isInCreateMode()) {
+ this.createParameters.withPreferredPrimaryZone(preferredPrimaryZone);
+ return this;
+ } else {
+ this.updateParameters.withPreferredPrimaryZone(preferredPrimaryZone);
+ return this;
+ }
+ }
+
+ public ClusterResponseImpl withCoordinatorServerEdition(String coordinatorServerEdition) {
+ if (isInCreateMode()) {
+ this.createParameters.withCoordinatorServerEdition(coordinatorServerEdition);
+ return this;
+ } else {
+ this.updateParameters.withCoordinatorServerEdition(coordinatorServerEdition);
+ return this;
+ }
+ }
+
+ public ClusterResponseImpl withCoordinatorStorageQuotaInMb(Long coordinatorStorageQuotaInMb) {
+ if (isInCreateMode()) {
+ this.createParameters.withCoordinatorStorageQuotaInMb(coordinatorStorageQuotaInMb);
+ return this;
+ } else {
+ this.updateParameters.withCoordinatorStorageQuotaInMb(coordinatorStorageQuotaInMb);
+ return this;
+ }
+ }
+
+ public ClusterResponseImpl withCoordinatorVCores(Long coordinatorVCores) {
+ if (isInCreateMode()) {
+ this.createParameters.withCoordinatorVCores(coordinatorVCores);
+ return this;
+ } else {
+ this.updateParameters.withCoordinatorVCores(coordinatorVCores);
+ return this;
+ }
+ }
+
+ public ClusterResponseImpl withCoordinatorEnablePublicIpAccess(Boolean coordinatorEnablePublicIpAccess) {
+ if (isInCreateMode()) {
+ this.createParameters.withCoordinatorEnablePublicIpAccess(coordinatorEnablePublicIpAccess);
+ return this;
+ } else {
+ this.updateParameters.withCoordinatorEnablePublicIpAccess(coordinatorEnablePublicIpAccess);
+ return this;
+ }
+ }
+
+ public ClusterResponseImpl withNodeServerEdition(String nodeServerEdition) {
+ if (isInCreateMode()) {
+ this.createParameters.withNodeServerEdition(nodeServerEdition);
+ return this;
+ } else {
+ this.updateParameters.withNodeServerEdition(nodeServerEdition);
+ return this;
+ }
+ }
+
+ public ClusterResponseImpl withNodeCount(Long nodeCount) {
+ if (isInCreateMode()) {
+ this.createParameters.withNodeCount(nodeCount);
+ return this;
+ } else {
+ this.updateParameters.withNodeCount(nodeCount);
+ return this;
+ }
+ }
+
+ public ClusterResponseImpl withNodeStorageQuotaInMb(Long nodeStorageQuotaInMb) {
+ if (isInCreateMode()) {
+ this.createParameters.withNodeStorageQuotaInMb(nodeStorageQuotaInMb);
+ return this;
+ } else {
+ this.updateParameters.withNodeStorageQuotaInMb(nodeStorageQuotaInMb);
+ return this;
+ }
+ }
+
+ public ClusterResponseImpl withNodeVCores(Long nodeVCores) {
+ if (isInCreateMode()) {
+ this.createParameters.withNodeVCores(nodeVCores);
+ return this;
+ } else {
+ this.updateParameters.withNodeVCores(nodeVCores);
+ return this;
+ }
+ }
+
+ public ClusterResponseImpl withNodeEnablePublicIpAccess(Boolean nodeEnablePublicIpAccess) {
+ this.createParameters.withNodeEnablePublicIpAccess(nodeEnablePublicIpAccess);
+ return this;
+ }
+
+ public ClusterResponseImpl withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
+ if (isInCreateMode()) {
+ this.createParameters.withMaintenanceWindow(maintenanceWindow);
+ return this;
+ } else {
+ this.updateParameters.withMaintenanceWindow(maintenanceWindow);
+ return this;
+ }
+ }
+
+ public ClusterResponseImpl withSourceResourceId(String sourceResourceId) {
+ this.createParameters.withSourceResourceId(sourceResourceId);
+ return this;
+ }
+
+ public ClusterResponseImpl withSourceLocation(String sourceLocation) {
+ this.createParameters.withSourceLocation(sourceLocation);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClusterServerImpl.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClusterServerImpl.java
new file mode 100644
index 0000000000000..53c8ee3a80a80
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClusterServerImpl.java
@@ -0,0 +1,94 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.ClusterServerInner;
+import com.azure.resourcemanager.postgresqlhsc.models.ClusterServer;
+import com.azure.resourcemanager.postgresqlhsc.models.ServerRole;
+
+public final class ClusterServerImpl implements ClusterServer {
+ private ClusterServerInner innerObject;
+
+ private final com.azure.resourcemanager.postgresqlhsc.PostgresqlhscManager serviceManager;
+
+ ClusterServerImpl(
+ ClusterServerInner innerObject, com.azure.resourcemanager.postgresqlhsc.PostgresqlhscManager 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 String fullyQualifiedDomainName() {
+ return this.innerModel().fullyQualifiedDomainName();
+ }
+
+ public ServerRole role() {
+ return this.innerModel().role();
+ }
+
+ public String state() {
+ return this.innerModel().state();
+ }
+
+ public String haState() {
+ return this.innerModel().haState();
+ }
+
+ public String availabilityZone() {
+ return this.innerModel().availabilityZone();
+ }
+
+ public String postgresqlVersion() {
+ return this.innerModel().postgresqlVersion();
+ }
+
+ public String citusVersion() {
+ return this.innerModel().citusVersion();
+ }
+
+ public String serverEdition() {
+ return this.innerModel().serverEdition();
+ }
+
+ public Long storageQuotaInMb() {
+ return this.innerModel().storageQuotaInMb();
+ }
+
+ public Long vCores() {
+ return this.innerModel().vCores();
+ }
+
+ public Boolean enableHa() {
+ return this.innerModel().enableHa();
+ }
+
+ public Boolean enablePublicIp() {
+ return this.innerModel().enablePublicIp();
+ }
+
+ public ClusterServerInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.postgresqlhsc.PostgresqlhscManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClustersClientImpl.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClustersClientImpl.java
new file mode 100644
index 0000000000000..953be74ac9a3d
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClustersClientImpl.java
@@ -0,0 +1,2666 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.postgresqlhsc.fluent.ClustersClient;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.ClusterResponseInner;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.NameAvailabilityInner;
+import com.azure.resourcemanager.postgresqlhsc.models.Cluster;
+import com.azure.resourcemanager.postgresqlhsc.models.ClusterForUpdate;
+import com.azure.resourcemanager.postgresqlhsc.models.ClusterListResult;
+import com.azure.resourcemanager.postgresqlhsc.models.NameAvailabilityRequest;
+import java.nio.ByteBuffer;
+import java.util.UUID;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ClustersClient. */
+public final class ClustersClientImpl implements ClustersClient {
+ /** The proxy service used to perform REST calls. */
+ private final ClustersService service;
+
+ /** The service client containing this operation class. */
+ private final CosmosDBForPostgreSqlImpl client;
+
+ /**
+ * Initializes an instance of ClustersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ClustersClientImpl(CosmosDBForPostgreSqlImpl client) {
+ this.service = RestProxy.create(ClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for CosmosDBForPostgreSqlClusters to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "CosmosDBForPostgreSq")
+ public interface ClustersService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") UUID subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/serverGroupsv2")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") UUID subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/serverGroupsv2/{clusterName}")
+ @ExpectedResponses({201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") UUID subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @BodyParam("application/json") Cluster parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/serverGroupsv2/{clusterName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") UUID subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/serverGroupsv2/{clusterName}")
+ @ExpectedResponses({202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") UUID subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/serverGroupsv2/{clusterName}")
+ @ExpectedResponses({202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") UUID subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @BodyParam("application/json") ClusterForUpdate parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/serverGroupsv2/{clusterName}/restart")
+ @ExpectedResponses({202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> restart(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") UUID subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/serverGroupsv2/{clusterName}/start")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> start(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") UUID subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/serverGroupsv2/{clusterName}/stop")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> stop(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") UUID subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/serverGroupsv2/{clusterName}/promote")
+ @ExpectedResponses({202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> promoteReadReplica(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") UUID subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> checkNameAvailability(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") UUID subscriptionId,
+ @BodyParam("application/json") NameAvailabilityRequest nameAvailabilityRequest,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List all the clusters in a given subscription.
+ *
+ * @throws ManagementException 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 clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ 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."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ 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 clusters in a given subscription.
+ *
+ * @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 clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(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."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List all the clusters in a given subscription.
+ *
+ * @throws ManagementException 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 clusters as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List all the clusters in a given subscription.
+ *
+ * @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 clusters as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List all the clusters in a given subscription.
+ *
+ * @throws ManagementException 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 clusters as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List all the clusters in a given subscription.
+ *
+ * @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 clusters as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * List all the clusters 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 ManagementException 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 clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ 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."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ 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 clusters 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 ManagementException 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 clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, 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."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List all the clusters 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 ManagementException 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 clusters as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List all the clusters 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 ManagementException 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 clusters as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List all the clusters 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 ManagementException 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 clusters as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * List all the clusters 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 ManagementException 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 clusters as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Creates a new cluster with servers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The required parameters for creating or updating a cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cluster in response body along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String clusterName, Cluster 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates a new cluster with servers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The required parameters for creating or updating a cluster.
+ * @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 cluster in response body along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String clusterName, Cluster 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates a new cluster with servers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The required parameters for creating or updating a cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ClusterResponseInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String clusterName, Cluster parameters) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ClusterResponseInner.class,
+ ClusterResponseInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Creates a new cluster with servers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The required parameters for creating or updating a cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of represents a cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ClusterResponseInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String clusterName, Cluster parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ClusterResponseInner.class, ClusterResponseInner.class, context);
+ }
+
+ /**
+ * Creates a new cluster with servers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The required parameters for creating or updating a cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ClusterResponseInner> beginCreateOrUpdate(
+ String resourceGroupName, String clusterName, Cluster parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Creates a new cluster with servers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The required parameters for creating or updating a cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ClusterResponseInner> beginCreateOrUpdate(
+ String resourceGroupName, String clusterName, Cluster parameters, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Creates a new cluster with servers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The required parameters for creating or updating a cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cluster in response body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String clusterName, Cluster parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a new cluster with servers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The required parameters for creating or updating a cluster.
+ * @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 cluster in response body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String clusterName, Cluster parameters, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates a new cluster with servers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The required parameters for creating or updating a cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterResponseInner createOrUpdate(String resourceGroupName, String clusterName, Cluster parameters) {
+ return createOrUpdateAsync(resourceGroupName, clusterName, parameters).block();
+ }
+
+ /**
+ * Creates a new cluster with servers.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The required parameters for creating or updating a cluster.
+ * @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 cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterResponseInner createOrUpdate(
+ String resourceGroupName, String clusterName, Cluster parameters, Context context) {
+ return createOrUpdateAsync(resourceGroupName, clusterName, parameters, context).block();
+ }
+
+ /**
+ * Gets information about a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cluster along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String clusterName) {
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets information about a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 cluster along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String clusterName, 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ accept,
+ context);
+ }
+
+ /**
+ * Gets information about a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cluster on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets information about a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 cluster along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String clusterName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName, context).block();
+ }
+
+ /**
+ * Gets information about a cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cluster.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterResponseInner getByResourceGroup(String resourceGroupName, String clusterName) {
+ return getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue();
+ }
+
+ /**
+ * Deletes a cluster together with servers in it.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 clusterName) {
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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,
+ clusterName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes a cluster together with servers in it.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 clusterName, 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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,
+ clusterName,
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes a cluster together with servers in it.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 clusterName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Deletes a cluster together with servers in it.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 clusterName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes a cluster together with servers in it.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 clusterName) {
+ return beginDeleteAsync(resourceGroupName, clusterName).getSyncPoller();
+ }
+
+ /**
+ * Deletes a cluster together with servers in it.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 clusterName, Context context) {
+ return beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes a cluster together with servers in it.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 clusterName) {
+ return beginDeleteAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a cluster together with servers in it.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 clusterName, Context context) {
+ return beginDeleteAsync(resourceGroupName, clusterName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a cluster together with servers in it.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 clusterName) {
+ deleteAsync(resourceGroupName, clusterName).block();
+ }
+
+ /**
+ * Deletes a cluster together with servers in it.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 clusterName, Context context) {
+ deleteAsync(resourceGroupName, clusterName, context).block();
+ }
+
+ /**
+ * Updates an existing cluster. The request body can contain one to many of the properties present in the normal
+ * cluster definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters for updating a cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cluster in response body along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName, String clusterName, ClusterForUpdate 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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
+ .update(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates an existing cluster. The request body can contain one to many of the properties present in the normal
+ * cluster definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters for updating a cluster.
+ * @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 cluster in response body along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName, String clusterName, ClusterForUpdate 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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
+ .update(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates an existing cluster. The request body can contain one to many of the properties present in the normal
+ * cluster definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters for updating a cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ClusterResponseInner> beginUpdateAsync(
+ String resourceGroupName, String clusterName, ClusterForUpdate parameters) {
+ Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ ClusterResponseInner.class,
+ ClusterResponseInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Updates an existing cluster. The request body can contain one to many of the properties present in the normal
+ * cluster definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters for updating a cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of represents a cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ClusterResponseInner> beginUpdateAsync(
+ String resourceGroupName, String clusterName, ClusterForUpdate parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, clusterName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ClusterResponseInner.class, ClusterResponseInner.class, context);
+ }
+
+ /**
+ * Updates an existing cluster. The request body can contain one to many of the properties present in the normal
+ * cluster definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters for updating a cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ClusterResponseInner> beginUpdate(
+ String resourceGroupName, String clusterName, ClusterForUpdate parameters) {
+ return beginUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Updates an existing cluster. The request body can contain one to many of the properties present in the normal
+ * cluster definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters for updating a cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ClusterResponseInner> beginUpdate(
+ String resourceGroupName, String clusterName, ClusterForUpdate parameters, Context context) {
+ return beginUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Updates an existing cluster. The request body can contain one to many of the properties present in the normal
+ * cluster definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters for updating a cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cluster in response body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String clusterName, ClusterForUpdate parameters) {
+ return beginUpdateAsync(resourceGroupName, clusterName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates an existing cluster. The request body can contain one to many of the properties present in the normal
+ * cluster definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters for updating a cluster.
+ * @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 cluster in response body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String clusterName, ClusterForUpdate parameters, Context context) {
+ return beginUpdateAsync(resourceGroupName, clusterName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates an existing cluster. The request body can contain one to many of the properties present in the normal
+ * cluster definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters for updating a cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterResponseInner update(String resourceGroupName, String clusterName, ClusterForUpdate parameters) {
+ return updateAsync(resourceGroupName, clusterName, parameters).block();
+ }
+
+ /**
+ * Updates an existing cluster. The request body can contain one to many of the properties present in the normal
+ * cluster definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters for updating a cluster.
+ * @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 cluster in response body.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterResponseInner update(
+ String resourceGroupName, String clusterName, ClusterForUpdate parameters, Context context) {
+ return updateAsync(resourceGroupName, clusterName, parameters, context).block();
+ }
+
+ /**
+ * Restarts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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>> restartWithResponseAsync(String resourceGroupName, String clusterName) {
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .restart(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Restarts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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>> restartWithResponseAsync(
+ String resourceGroupName, String clusterName, 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .restart(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ accept,
+ context);
+ }
+
+ /**
+ * Restarts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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> beginRestartAsync(String resourceGroupName, String clusterName) {
+ Mono>> mono = restartWithResponseAsync(resourceGroupName, clusterName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Restarts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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> beginRestartAsync(
+ String resourceGroupName, String clusterName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = restartWithResponseAsync(resourceGroupName, clusterName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Restarts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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> beginRestart(String resourceGroupName, String clusterName) {
+ return beginRestartAsync(resourceGroupName, clusterName).getSyncPoller();
+ }
+
+ /**
+ * Restarts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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> beginRestart(
+ String resourceGroupName, String clusterName, Context context) {
+ return beginRestartAsync(resourceGroupName, clusterName, context).getSyncPoller();
+ }
+
+ /**
+ * Restarts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 restartAsync(String resourceGroupName, String clusterName) {
+ return beginRestartAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Restarts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 restartAsync(String resourceGroupName, String clusterName, Context context) {
+ return beginRestartAsync(resourceGroupName, clusterName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Restarts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 restart(String resourceGroupName, String clusterName) {
+ restartAsync(resourceGroupName, clusterName).block();
+ }
+
+ /**
+ * Restarts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 restart(String resourceGroupName, String clusterName, Context context) {
+ restartAsync(resourceGroupName, clusterName, context).block();
+ }
+
+ /**
+ * Starts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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>> startWithResponseAsync(String resourceGroupName, String clusterName) {
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .start(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Starts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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>> startWithResponseAsync(
+ String resourceGroupName, String clusterName, 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .start(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ accept,
+ context);
+ }
+
+ /**
+ * Starts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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> beginStartAsync(String resourceGroupName, String clusterName) {
+ Mono>> mono = startWithResponseAsync(resourceGroupName, clusterName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Starts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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> beginStartAsync(
+ String resourceGroupName, String clusterName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = startWithResponseAsync(resourceGroupName, clusterName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Starts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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> beginStart(String resourceGroupName, String clusterName) {
+ return beginStartAsync(resourceGroupName, clusterName).getSyncPoller();
+ }
+
+ /**
+ * Starts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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> beginStart(
+ String resourceGroupName, String clusterName, Context context) {
+ return beginStartAsync(resourceGroupName, clusterName, context).getSyncPoller();
+ }
+
+ /**
+ * Starts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 startAsync(String resourceGroupName, String clusterName) {
+ return beginStartAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Starts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 startAsync(String resourceGroupName, String clusterName, Context context) {
+ return beginStartAsync(resourceGroupName, clusterName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Starts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 start(String resourceGroupName, String clusterName) {
+ startAsync(resourceGroupName, clusterName).block();
+ }
+
+ /**
+ * Starts the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 start(String resourceGroupName, String clusterName, Context context) {
+ startAsync(resourceGroupName, clusterName, context).block();
+ }
+
+ /**
+ * Stops the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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>> stopWithResponseAsync(String resourceGroupName, String clusterName) {
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .stop(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Stops the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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>> stopWithResponseAsync(
+ String resourceGroupName, String clusterName, 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .stop(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ accept,
+ context);
+ }
+
+ /**
+ * Stops the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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> beginStopAsync(String resourceGroupName, String clusterName) {
+ Mono>> mono = stopWithResponseAsync(resourceGroupName, clusterName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Stops the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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> beginStopAsync(
+ String resourceGroupName, String clusterName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = stopWithResponseAsync(resourceGroupName, clusterName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Stops the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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> beginStop(String resourceGroupName, String clusterName) {
+ return beginStopAsync(resourceGroupName, clusterName).getSyncPoller();
+ }
+
+ /**
+ * Stops the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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> beginStop(String resourceGroupName, String clusterName, Context context) {
+ return beginStopAsync(resourceGroupName, clusterName, context).getSyncPoller();
+ }
+
+ /**
+ * Stops the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 stopAsync(String resourceGroupName, String clusterName) {
+ return beginStopAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Stops the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 stopAsync(String resourceGroupName, String clusterName, Context context) {
+ return beginStopAsync(resourceGroupName, clusterName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Stops the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 stop(String resourceGroupName, String clusterName) {
+ stopAsync(resourceGroupName, clusterName).block();
+ }
+
+ /**
+ * Stops the cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 stop(String resourceGroupName, String clusterName, Context context) {
+ stopAsync(resourceGroupName, clusterName, context).block();
+ }
+
+ /**
+ * Promote the read replica cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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>> promoteReadReplicaWithResponseAsync(
+ String resourceGroupName, String clusterName) {
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .promoteReadReplica(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Promote the read replica cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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>> promoteReadReplicaWithResponseAsync(
+ String resourceGroupName, String clusterName, 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .promoteReadReplica(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ clusterName,
+ accept,
+ context);
+ }
+
+ /**
+ * Promote the read replica cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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> beginPromoteReadReplicaAsync(
+ String resourceGroupName, String clusterName) {
+ Mono>> mono = promoteReadReplicaWithResponseAsync(resourceGroupName, clusterName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Promote the read replica cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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> beginPromoteReadReplicaAsync(
+ String resourceGroupName, String clusterName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ promoteReadReplicaWithResponseAsync(resourceGroupName, clusterName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Promote the read replica cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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> beginPromoteReadReplica(String resourceGroupName, String clusterName) {
+ return beginPromoteReadReplicaAsync(resourceGroupName, clusterName).getSyncPoller();
+ }
+
+ /**
+ * Promote the read replica cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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> beginPromoteReadReplica(
+ String resourceGroupName, String clusterName, Context context) {
+ return beginPromoteReadReplicaAsync(resourceGroupName, clusterName, context).getSyncPoller();
+ }
+
+ /**
+ * Promote the read replica cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 promoteReadReplicaAsync(String resourceGroupName, String clusterName) {
+ return beginPromoteReadReplicaAsync(resourceGroupName, clusterName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Promote the read replica cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 promoteReadReplicaAsync(String resourceGroupName, String clusterName, Context context) {
+ return beginPromoteReadReplicaAsync(resourceGroupName, clusterName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Promote the read replica cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 promoteReadReplica(String resourceGroupName, String clusterName) {
+ promoteReadReplicaAsync(resourceGroupName, clusterName).block();
+ }
+
+ /**
+ * Promote the read replica cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @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 promoteReadReplica(String resourceGroupName, String clusterName, Context context) {
+ promoteReadReplicaAsync(resourceGroupName, clusterName, 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 along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> checkNameAvailabilityWithResponseAsync(
+ NameAvailabilityRequest nameAvailabilityRequest) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (nameAvailabilityRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null."));
+ } else {
+ nameAvailabilityRequest.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .checkNameAvailability(
+ 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> checkNameAvailabilityWithResponseAsync(
+ NameAvailabilityRequest nameAvailabilityRequest, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (nameAvailabilityRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null."));
+ } else {
+ nameAvailabilityRequest.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .checkNameAvailability(
+ 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)
+ private Mono checkNameAvailabilityAsync(NameAvailabilityRequest nameAvailabilityRequest) {
+ return checkNameAvailabilityWithResponseAsync(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 checkNameAvailabilityWithResponse(
+ NameAvailabilityRequest nameAvailabilityRequest, Context context) {
+ return checkNameAvailabilityWithResponseAsync(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 checkNameAvailability(NameAvailabilityRequest nameAvailabilityRequest) {
+ return checkNameAvailabilityWithResponse(nameAvailabilityRequest, Context.NONE).getValue();
+ }
+
+ /**
+ * 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 clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(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.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * 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 clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(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
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * 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 clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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 clusters along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(
+ 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
+ .listByResourceGroupNext(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/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClustersImpl.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClustersImpl.java
new file mode 100644
index 0000000000000..221eff82b23b3
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClustersImpl.java
@@ -0,0 +1,233 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.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.postgresqlhsc.fluent.ClustersClient;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.ClusterResponseInner;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.NameAvailabilityInner;
+import com.azure.resourcemanager.postgresqlhsc.models.ClusterResponse;
+import com.azure.resourcemanager.postgresqlhsc.models.Clusters;
+import com.azure.resourcemanager.postgresqlhsc.models.NameAvailability;
+import com.azure.resourcemanager.postgresqlhsc.models.NameAvailabilityRequest;
+
+public final class ClustersImpl implements Clusters {
+ private static final ClientLogger LOGGER = new ClientLogger(ClustersImpl.class);
+
+ private final ClustersClient innerClient;
+
+ private final com.azure.resourcemanager.postgresqlhsc.PostgresqlhscManager serviceManager;
+
+ public ClustersImpl(
+ ClustersClient innerClient, com.azure.resourcemanager.postgresqlhsc.PostgresqlhscManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new ClusterResponseImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new ClusterResponseImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new ClusterResponseImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new ClusterResponseImpl(inner1, this.manager()));
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String clusterName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ClusterResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ClusterResponse getByResourceGroup(String resourceGroupName, String clusterName) {
+ ClusterResponseInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName);
+ if (inner != null) {
+ return new ClusterResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String clusterName) {
+ this.serviceClient().delete(resourceGroupName, clusterName);
+ }
+
+ public void delete(String resourceGroupName, String clusterName, Context context) {
+ this.serviceClient().delete(resourceGroupName, clusterName, context);
+ }
+
+ public void restart(String resourceGroupName, String clusterName) {
+ this.serviceClient().restart(resourceGroupName, clusterName);
+ }
+
+ public void restart(String resourceGroupName, String clusterName, Context context) {
+ this.serviceClient().restart(resourceGroupName, clusterName, context);
+ }
+
+ public void start(String resourceGroupName, String clusterName) {
+ this.serviceClient().start(resourceGroupName, clusterName);
+ }
+
+ public void start(String resourceGroupName, String clusterName, Context context) {
+ this.serviceClient().start(resourceGroupName, clusterName, context);
+ }
+
+ public void stop(String resourceGroupName, String clusterName) {
+ this.serviceClient().stop(resourceGroupName, clusterName);
+ }
+
+ public void stop(String resourceGroupName, String clusterName, Context context) {
+ this.serviceClient().stop(resourceGroupName, clusterName, context);
+ }
+
+ public void promoteReadReplica(String resourceGroupName, String clusterName) {
+ this.serviceClient().promoteReadReplica(resourceGroupName, clusterName);
+ }
+
+ public void promoteReadReplica(String resourceGroupName, String clusterName, Context context) {
+ this.serviceClient().promoteReadReplica(resourceGroupName, clusterName, context);
+ }
+
+ public Response checkNameAvailabilityWithResponse(
+ NameAvailabilityRequest nameAvailabilityRequest, Context context) {
+ Response inner =
+ this.serviceClient().checkNameAvailabilityWithResponse(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 checkNameAvailability(NameAvailabilityRequest nameAvailabilityRequest) {
+ NameAvailabilityInner inner = this.serviceClient().checkNameAvailability(nameAvailabilityRequest);
+ if (inner != null) {
+ return new NameAvailabilityImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public ClusterResponse 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 clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2");
+ if (clusterName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, clusterName, 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 clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2");
+ if (clusterName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, clusterName, 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 clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2");
+ if (clusterName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id)));
+ }
+ this.delete(resourceGroupName, clusterName, 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 clusterName = Utils.getValueFromIdByName(id, "serverGroupsv2");
+ if (clusterName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'serverGroupsv2'.", id)));
+ }
+ this.delete(resourceGroupName, clusterName, context);
+ }
+
+ private ClustersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.postgresqlhsc.PostgresqlhscManager manager() {
+ return this.serviceManager;
+ }
+
+ public ClusterResponseImpl define(String name) {
+ return new ClusterResponseImpl(name, this.manager());
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ConfigurationImpl.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ConfigurationImpl.java
new file mode 100644
index 0000000000000..fab980a8e163f
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ConfigurationImpl.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.postgresqlhsc.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.ConfigurationInner;
+import com.azure.resourcemanager.postgresqlhsc.models.Configuration;
+import com.azure.resourcemanager.postgresqlhsc.models.ConfigurationDataType;
+import com.azure.resourcemanager.postgresqlhsc.models.ServerRoleGroupConfiguration;
+import java.util.Collections;
+import java.util.List;
+
+public final class ConfigurationImpl implements Configuration {
+ private ConfigurationInner innerObject;
+
+ private final com.azure.resourcemanager.postgresqlhsc.PostgresqlhscManager serviceManager;
+
+ ConfigurationImpl(
+ ConfigurationInner innerObject, com.azure.resourcemanager.postgresqlhsc.PostgresqlhscManager 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 String description() {
+ return this.innerModel().description();
+ }
+
+ public ConfigurationDataType dataType() {
+ return this.innerModel().dataType();
+ }
+
+ public String allowedValues() {
+ return this.innerModel().allowedValues();
+ }
+
+ public Boolean requiresRestart() {
+ return this.innerModel().requiresRestart();
+ }
+
+ public List serverRoleGroupConfigurations() {
+ List inner = this.innerModel().serverRoleGroupConfigurations();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public ConfigurationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.postgresqlhsc.PostgresqlhscManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ConfigurationsClientImpl.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ConfigurationsClientImpl.java
new file mode 100644
index 0000000000000..4fa4ff9234e9d
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ConfigurationsClientImpl.java
@@ -0,0 +1,1486 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.postgresqlhsc.fluent.ConfigurationsClient;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.ConfigurationInner;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.ServerConfigurationInner;
+import com.azure.resourcemanager.postgresqlhsc.models.ClusterConfigurationListResult;
+import com.azure.resourcemanager.postgresqlhsc.models.ServerConfigurationListResult;
+import com.azure.resourcemanager.postgresqlhsc.models.ServerConfigurationRequest;
+import java.nio.ByteBuffer;
+import java.util.UUID;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ConfigurationsClient. */
+public final class ConfigurationsClientImpl implements ConfigurationsClient {
+ /** The proxy service used to perform REST calls. */
+ private final ConfigurationsService service;
+
+ /** The service client containing this operation class. */
+ private final CosmosDBForPostgreSqlImpl client;
+
+ /**
+ * Initializes an instance of ConfigurationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ConfigurationsClientImpl(CosmosDBForPostgreSqlImpl client) {
+ this.service =
+ RestProxy.create(ConfigurationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for CosmosDBForPostgreSqlConfigurations to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "CosmosDBForPostgreSq")
+ public interface ConfigurationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/serverGroupsv2/{clusterName}/servers/{serverName}/configurations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByServer(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") UUID subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("serverName") String serverName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/serverGroupsv2/{clusterName}/configurations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByCluster(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") UUID subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/serverGroupsv2/{clusterName}/configurations/{configurationName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono