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 Cluster.
+ *
+ * @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 PrivateEndpointConnection.
+ *
+ * @return Resource collection API of PrivateEndpointConnections.
+ */
+ public PrivateEndpointConnections privateEndpointConnections() {
+ if (this.privateEndpointConnections == null) {
+ this.privateEndpointConnections =
+ new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
+ }
+ return privateEndpointConnections;
+ }
+
+ /**
+ * Gets the resource collection API of PrivateLinkResources.
+ *
+ * @return Resource collection API of PrivateLinkResources.
+ */
+ public PrivateLinkResources privateLinkResources() {
+ if (this.privateLinkResources == null) {
+ this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
+ }
+ return privateLinkResources;
+ }
+
+ /**
+ * @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..cf284381a1f9f
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/ClustersClient.java
@@ -0,0 +1,510 @@
+// 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.ClusterInner;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.NameAvailabilityInner;
+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 {
+ /**
+ * Lists all clusters in a subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of clusters as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all clusters in a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of clusters as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Lists all clusters in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of clusters as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Lists all clusters in a 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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ClusterInner> beginCreate(
+ String resourceGroupName, String clusterName, ClusterInner 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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ClusterInner> beginCreate(
+ String resourceGroupName, String clusterName, ClusterInner 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterInner create(String resourceGroupName, String clusterName, ClusterInner 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterInner create(String resourceGroupName, String clusterName, ClusterInner parameters, Context context);
+
+ /**
+ * Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as
+ * cluster creation date and time.
+ *
+ * @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 such as compute and storage configuration and cluster lifecycle metadata such
+ * as cluster creation date and time along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String clusterName, Context context);
+
+ /**
+ * Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as
+ * cluster creation date and time.
+ *
+ * @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 such as compute and storage configuration and cluster lifecycle metadata such
+ * as cluster creation date and time.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterInner 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 or several properties from the 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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ClusterInner> beginUpdate(
+ String resourceGroupName, String clusterName, ClusterForUpdate parameters);
+
+ /**
+ * Updates an existing cluster. The request body can contain one or several properties from the 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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ClusterInner> beginUpdate(
+ String resourceGroupName, String clusterName, ClusterForUpdate parameters, Context context);
+
+ /**
+ * Updates an existing cluster. The request body can contain one or several properties from the 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterInner update(String resourceGroupName, String clusterName, ClusterForUpdate parameters);
+
+ /**
+ * Updates an existing cluster. The request body can contain one or several properties from the 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ClusterInner update(String resourceGroupName, String clusterName, ClusterForUpdate parameters, Context context);
+
+ /**
+ * Restarts all nodes in 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 all nodes in 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 all nodes in 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 all nodes in 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 stopped compute on all cluster nodes.
+ *
+ * @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 stopped compute on all cluster nodes.
+ *
+ * @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 stopped compute on all cluster nodes.
+ *
+ * @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 stopped compute on all cluster nodes.
+ *
+ * @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 compute on all cluster nodes.
+ *
+ * @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 compute on all cluster nodes.
+ *
+ * @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 compute on all cluster nodes.
+ *
+ * @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 compute on all cluster nodes.
+ *
+ * @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);
+
+ /**
+ * Promotes read replica cluster to an independent read-write 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);
+
+ /**
+ * Promotes read replica cluster to an independent read-write 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);
+
+ /**
+ * Promotes read replica cluster to an independent read-write 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);
+
+ /**
+ * Promotes read replica cluster to an independent read-write 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);
+
+ /**
+ * Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most
+ * 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end
+ * with a hyphen.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if cluster 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 cluster name availability along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response checkNameAvailabilityWithResponse(
+ NameAvailabilityRequest nameAvailabilityRequest, Context context);
+
+ /**
+ * Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most
+ * 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end
+ * with a hyphen.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if cluster 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 cluster 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..60f8ca632e232
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/ConfigurationsClient.java
@@ -0,0 +1,314 @@
+// 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;
+
+/** 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);
+
+ /**
+ * Gets information of a configuration for coordinator.
+ *
+ * @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 along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getCoordinatorWithResponse(
+ String resourceGroupName, String clusterName, String configurationName, Context context);
+
+ /**
+ * Gets information of a configuration for coordinator.
+ *
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerConfigurationInner getCoordinator(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> beginUpdateOnCoordinator(
+ String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner 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> beginUpdateOnCoordinator(
+ String resourceGroupName,
+ String clusterName,
+ String configurationName,
+ ServerConfigurationInner 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 updateOnCoordinator(
+ String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner 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 updateOnCoordinator(
+ String resourceGroupName,
+ String clusterName,
+ String configurationName,
+ ServerConfigurationInner parameters,
+ Context context);
+
+ /**
+ * Gets information of a configuration for worker 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 worker nodes along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getNodeWithResponse(
+ String resourceGroupName, String clusterName, String configurationName, Context context);
+
+ /**
+ * Gets information of a configuration for worker 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 worker nodes.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerConfigurationInner getNode(String resourceGroupName, String clusterName, String configurationName);
+
+ /**
+ * Updates configuration of worker 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> beginUpdateOnNode(
+ String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters);
+
+ /**
+ * Updates configuration of worker 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> beginUpdateOnNode(
+ String resourceGroupName,
+ String clusterName,
+ String configurationName,
+ ServerConfigurationInner parameters,
+ Context context);
+
+ /**
+ * Updates configuration of worker 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 updateOnNode(
+ String resourceGroupName, String clusterName, String configurationName, ServerConfigurationInner parameters);
+
+ /**
+ * Updates configuration of worker 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 updateOnNode(
+ String resourceGroupName,
+ String clusterName,
+ String configurationName,
+ ServerConfigurationInner 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..fe18b415dced3
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/CosmosDBForPostgreSql.java
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlhsc.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** 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.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the 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..54561ed6681b0
--- /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 cluster firewall rule or updates an existing 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 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 cluster firewall rule or updates an existing 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 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 cluster firewall rule or updates an existing 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 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 cluster firewall rule or updates an existing 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 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);
+
+ /**
+ * Lists all the firewall rules on 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);
+
+ /**
+ * Lists all the firewall rules on 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..c9a66dff88808
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/PrivateEndpointConnectionsClient.java
@@ -0,0 +1,214 @@
+// 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.PrivateEndpointConnectionInner;
+
+/** 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 associated with 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 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 associated with 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 private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner get(
+ String resourceGroupName, String clusterName, String privateEndpointConnectionName);
+
+ /**
+ * Approves or Rejects 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 associated with the cluster.
+ * @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 the {@link SyncPoller} for polling of the private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters);
+
+ /**
+ * Approves or Rejects 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 associated with the cluster.
+ * @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 the {@link SyncPoller} for polling of the private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters,
+ Context context);
+
+ /**
+ * Approves or Rejects 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 associated with the cluster.
+ * @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 the private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner createOrUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters);
+
+ /**
+ * Approves or Rejects 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 associated with the cluster.
+ * @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 the private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner createOrUpdate(
+ String resourceGroupName,
+ String clusterName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters,
+ Context context);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the cluster.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with 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, 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 associated with 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, 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 associated with 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, 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 associated with 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, 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..bae33b407cbd9
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/RolesClient.java
@@ -0,0 +1,195 @@
+// 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.RoleInner;
+
+/** An instance of this class provides access to all the operations defined in RolesClient. */
+public interface RolesClient {
+ /**
+ * Gets information about 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 information about a cluster role along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String clusterName, String roleName, Context context);
+
+ /**
+ * Gets information about 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 information about a cluster role.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RoleInner get(String resourceGroupName, String clusterName, String roleName);
+
+ /**
+ * 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/ClusterInner.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterInner.java
new file mode 100644
index 0000000000000..409032101aa6b
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterInner.java
@@ -0,0 +1,593 @@
+// 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.ServerNameItem;
+import com.azure.resourcemanager.postgresqlhsc.models.SimplePrivateEndpointConnection;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+import java.util.Map;
+
+/** Represents a cluster. */
+@Fluent
+public final class ClusterInner extends Resource {
+ /*
+ * Properties of the cluster.
+ */
+ @JsonProperty(value = "properties")
+ private ClusterProperties 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 ClusterInner class. */
+ public ClusterInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Properties of the cluster.
+ *
+ * @return the innerProperties value.
+ */
+ private ClusterProperties 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 ClusterInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ClusterInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the administratorLogin property: The administrator's login name of the servers in the cluster.
+ *
+ * @return the administratorLogin value.
+ */
+ public String administratorLogin() {
+ return this.innerProperties() == null ? null : this.innerProperties().administratorLogin();
+ }
+
+ /**
+ * Get the administratorLoginPassword property: The password of the administrator login. Required for creation.
+ *
+ * @return the administratorLoginPassword value.
+ */
+ public String administratorLoginPassword() {
+ return this.innerProperties() == null ? null : this.innerProperties().administratorLoginPassword();
+ }
+
+ /**
+ * Set the administratorLoginPassword property: The password of the administrator login. Required for creation.
+ *
+ * @param administratorLoginPassword the administratorLoginPassword value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withAdministratorLoginPassword(String administratorLoginPassword) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withAdministratorLoginPassword(administratorLoginPassword);
+ 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 major PostgreSQL version on all cluster servers.
+ *
+ * @return the postgresqlVersion value.
+ */
+ public String postgresqlVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().postgresqlVersion();
+ }
+
+ /**
+ * Set the postgresqlVersion property: The major PostgreSQL version on all cluster servers.
+ *
+ * @param postgresqlVersion the postgresqlVersion value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withPostgresqlVersion(String postgresqlVersion) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withPostgresqlVersion(postgresqlVersion);
+ return this;
+ }
+
+ /**
+ * Get the citusVersion property: The Citus extension version on all cluster servers.
+ *
+ * @return the citusVersion value.
+ */
+ public String citusVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().citusVersion();
+ }
+
+ /**
+ * Set the citusVersion property: The Citus extension version on all cluster servers.
+ *
+ * @param citusVersion the citusVersion value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withCitusVersion(String citusVersion) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ 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 ClusterInner object itself.
+ */
+ public ClusterInner withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withMaintenanceWindow(maintenanceWindow);
+ return this;
+ }
+
+ /**
+ * Get the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster servers.
+ *
+ * @return the preferredPrimaryZone value.
+ */
+ public String preferredPrimaryZone() {
+ return this.innerProperties() == null ? null : this.innerProperties().preferredPrimaryZone();
+ }
+
+ /**
+ * Set the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster servers.
+ *
+ * @param preferredPrimaryZone the preferredPrimaryZone value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withPreferredPrimaryZone(String preferredPrimaryZone) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ 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 ClusterInner object itself.
+ */
+ public ClusterInner withEnableShardsOnCoordinator(Boolean enableShardsOnCoordinator) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withEnableShardsOnCoordinator(enableShardsOnCoordinator);
+ return this;
+ }
+
+ /**
+ * Get the enableHa property: If high availability (HA) is enabled or not for the cluster.
+ *
+ * @return the enableHa value.
+ */
+ public Boolean enableHa() {
+ return this.innerProperties() == null ? null : this.innerProperties().enableHa();
+ }
+
+ /**
+ * Set the enableHa property: If high availability (HA) is enabled or not for the cluster.
+ *
+ * @param enableHa the enableHa value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withEnableHa(Boolean enableHa) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withEnableHa(enableHa);
+ return this;
+ }
+
+ /**
+ * Get the coordinatorServerEdition property: The edition of a coordinator server (default: GeneralPurpose).
+ * Required for creation.
+ *
+ * @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).
+ * Required for creation.
+ *
+ * @param coordinatorServerEdition the coordinatorServerEdition value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withCoordinatorServerEdition(String coordinatorServerEdition) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withCoordinatorServerEdition(coordinatorServerEdition);
+ return this;
+ }
+
+ /**
+ * Get the coordinatorStorageQuotaInMb property: The storage of a server in MB. Required for creation. See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ *
+ * @return the coordinatorStorageQuotaInMb value.
+ */
+ public Integer coordinatorStorageQuotaInMb() {
+ return this.innerProperties() == null ? null : this.innerProperties().coordinatorStorageQuotaInMb();
+ }
+
+ /**
+ * Set the coordinatorStorageQuotaInMb property: The storage of a server in MB. Required for creation. See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ *
+ * @param coordinatorStorageQuotaInMb the coordinatorStorageQuotaInMb value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withCoordinatorStorageQuotaInMb(Integer coordinatorStorageQuotaInMb) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withCoordinatorStorageQuotaInMb(coordinatorStorageQuotaInMb);
+ return this;
+ }
+
+ /**
+ * Get the coordinatorVCores property: The vCores count of a server (max: 96). Required for creation. See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ *
+ * @return the coordinatorVCores value.
+ */
+ public Integer coordinatorVCores() {
+ return this.innerProperties() == null ? null : this.innerProperties().coordinatorVCores();
+ }
+
+ /**
+ * Set the coordinatorVCores property: The vCores count of a server (max: 96). Required for creation. See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ *
+ * @param coordinatorVCores the coordinatorVCores value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withCoordinatorVCores(Integer coordinatorVCores) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withCoordinatorVCores(coordinatorVCores);
+ return this;
+ }
+
+ /**
+ * Get the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator.
+ *
+ * @return the coordinatorEnablePublicIpAccess value.
+ */
+ public Boolean coordinatorEnablePublicIpAccess() {
+ return this.innerProperties() == null ? null : this.innerProperties().coordinatorEnablePublicIpAccess();
+ }
+
+ /**
+ * Set the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator.
+ *
+ * @param coordinatorEnablePublicIpAccess the coordinatorEnablePublicIpAccess value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withCoordinatorEnablePublicIpAccess(Boolean coordinatorEnablePublicIpAccess) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ 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 ClusterInner object itself.
+ */
+ public ClusterInner withNodeServerEdition(String nodeServerEdition) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withNodeServerEdition(nodeServerEdition);
+ return this;
+ }
+
+ /**
+ * Get the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a single node
+ * configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent
+ * multi-node configuration. Node count value cannot be 1. Required for creation.
+ *
+ * @return the nodeCount value.
+ */
+ public Integer nodeCount() {
+ return this.innerProperties() == null ? null : this.innerProperties().nodeCount();
+ }
+
+ /**
+ * Set the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a single node
+ * configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent
+ * multi-node configuration. Node count value cannot be 1. Required for creation.
+ *
+ * @param nodeCount the nodeCount value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withNodeCount(Integer nodeCount) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withNodeCount(nodeCount);
+ return this;
+ }
+
+ /**
+ * Get the nodeStorageQuotaInMb property: The storage in MB on each worker node. See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ *
+ * @return the nodeStorageQuotaInMb value.
+ */
+ public Integer nodeStorageQuotaInMb() {
+ return this.innerProperties() == null ? null : this.innerProperties().nodeStorageQuotaInMb();
+ }
+
+ /**
+ * Set the nodeStorageQuotaInMb property: The storage in MB on each worker node. See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ *
+ * @param nodeStorageQuotaInMb the nodeStorageQuotaInMb value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withNodeStorageQuotaInMb(Integer nodeStorageQuotaInMb) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withNodeStorageQuotaInMb(nodeStorageQuotaInMb);
+ return this;
+ }
+
+ /**
+ * Get the nodeVCores property: The compute in vCores on each worker node (max: 104). See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ *
+ * @return the nodeVCores value.
+ */
+ public Integer nodeVCores() {
+ return this.innerProperties() == null ? null : this.innerProperties().nodeVCores();
+ }
+
+ /**
+ * Set the nodeVCores property: The compute in vCores on each worker node (max: 104). See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ *
+ * @param nodeVCores the nodeVCores value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withNodeVCores(Integer nodeVCores) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withNodeVCores(nodeVCores);
+ return this;
+ }
+
+ /**
+ * Get the nodeEnablePublicIpAccess property: If public access is enabled on worker nodes.
+ *
+ * @return the nodeEnablePublicIpAccess value.
+ */
+ public Boolean nodeEnablePublicIpAccess() {
+ return this.innerProperties() == null ? null : this.innerProperties().nodeEnablePublicIpAccess();
+ }
+
+ /**
+ * Set the nodeEnablePublicIpAccess property: If public access is enabled on worker nodes.
+ *
+ * @param nodeEnablePublicIpAccess the nodeEnablePublicIpAccess value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withNodeEnablePublicIpAccess(Boolean nodeEnablePublicIpAccess) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withNodeEnablePublicIpAccess(nodeEnablePublicIpAccess);
+ return this;
+ }
+
+ /**
+ * 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();
+ }
+
+ /**
+ * Set the sourceResourceId property: The resource id of source cluster for read replica clusters.
+ *
+ * @param sourceResourceId the sourceResourceId value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withSourceResourceId(String sourceResourceId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withSourceResourceId(sourceResourceId);
+ return this;
+ }
+
+ /**
+ * Get the sourceLocation property: The Azure region of source cluster for read replica clusters.
+ *
+ * @return the sourceLocation value.
+ */
+ public String sourceLocation() {
+ return this.innerProperties() == null ? null : this.innerProperties().sourceLocation();
+ }
+
+ /**
+ * Set the sourceLocation property: The Azure region of source cluster for read replica clusters.
+ *
+ * @param sourceLocation the sourceLocation value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withSourceLocation(String sourceLocation) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withSourceLocation(sourceLocation);
+ return this;
+ }
+
+ /**
+ * Get the pointInTimeUtc property: Date and time in UTC (ISO8601 format) for cluster restore.
+ *
+ * @return the pointInTimeUtc value.
+ */
+ public OffsetDateTime pointInTimeUtc() {
+ return this.innerProperties() == null ? null : this.innerProperties().pointInTimeUtc();
+ }
+
+ /**
+ * Set the pointInTimeUtc property: Date and time in UTC (ISO8601 format) for cluster restore.
+ *
+ * @param pointInTimeUtc the pointInTimeUtc value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withPointInTimeUtc(OffsetDateTime pointInTimeUtc) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withPointInTimeUtc(pointInTimeUtc);
+ return this;
+ }
+
+ /**
+ * 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/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..8200ea81f4f7a
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterProperties.java
@@ -0,0 +1,657 @@
+// 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.ServerNameItem;
+import com.azure.resourcemanager.postgresqlhsc.models.SimplePrivateEndpointConnection;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+
+/** Properties of the cluster. */
+@Fluent
+public final class ClusterProperties {
+ /*
+ * The administrator's login name of the servers in the cluster.
+ */
+ @JsonProperty(value = "administratorLogin", access = JsonProperty.Access.WRITE_ONLY)
+ private String administratorLogin;
+
+ /*
+ * The password of the administrator login. Required for creation.
+ */
+ @JsonProperty(value = "administratorLoginPassword")
+ private String administratorLoginPassword;
+
+ /*
+ * 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 major PostgreSQL version on all cluster servers.
+ */
+ @JsonProperty(value = "postgresqlVersion")
+ private String postgresqlVersion;
+
+ /*
+ * The Citus extension version on all cluster servers.
+ */
+ @JsonProperty(value = "citusVersion")
+ private String citusVersion;
+
+ /*
+ * Maintenance window of a cluster.
+ */
+ @JsonProperty(value = "maintenanceWindow")
+ private MaintenanceWindow maintenanceWindow;
+
+ /*
+ * Preferred primary availability zone (AZ) for all cluster servers.
+ */
+ @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 (HA) is enabled or not for the cluster.
+ */
+ @JsonProperty(value = "enableHa")
+ private Boolean enableHa;
+
+ /*
+ * The edition of a coordinator server (default: GeneralPurpose). Required for creation.
+ */
+ @JsonProperty(value = "coordinatorServerEdition")
+ private String coordinatorServerEdition;
+
+ /*
+ * The storage of a server in MB. Required for creation. See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ */
+ @JsonProperty(value = "coordinatorStorageQuotaInMb")
+ private Integer coordinatorStorageQuotaInMb;
+
+ /*
+ * The vCores count of a server (max: 96). Required for creation. See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ */
+ @JsonProperty(value = "coordinatorVCores")
+ private Integer coordinatorVCores;
+
+ /*
+ * If public access is enabled on coordinator.
+ */
+ @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. When node count is 0, it represents a single node configuration with the
+ * ability to create distributed tables on that node. 2 or more worker nodes represent multi-node configuration.
+ * Node count value cannot be 1. Required for creation.
+ */
+ @JsonProperty(value = "nodeCount")
+ private Integer nodeCount;
+
+ /*
+ * The storage in MB on each worker node. See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ */
+ @JsonProperty(value = "nodeStorageQuotaInMb")
+ private Integer nodeStorageQuotaInMb;
+
+ /*
+ * The compute in vCores on each worker node (max: 104). See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ */
+ @JsonProperty(value = "nodeVCores")
+ private Integer nodeVCores;
+
+ /*
+ * If public access is enabled on worker nodes.
+ */
+ @JsonProperty(value = "nodeEnablePublicIpAccess")
+ 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")
+ private String sourceResourceId;
+
+ /*
+ * The Azure region of source cluster for read replica clusters.
+ */
+ @JsonProperty(value = "sourceLocation")
+ private String sourceLocation;
+
+ /*
+ * Date and time in UTC (ISO8601 format) for cluster restore.
+ */
+ @JsonProperty(value = "pointInTimeUTC")
+ private OffsetDateTime pointInTimeUtc;
+
+ /*
+ * 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 ClusterProperties class. */
+ public ClusterProperties() {
+ }
+
+ /**
+ * Get the administratorLogin property: The administrator's login name of the servers in the cluster.
+ *
+ * @return the administratorLogin value.
+ */
+ public String administratorLogin() {
+ return this.administratorLogin;
+ }
+
+ /**
+ * 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 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 major PostgreSQL version on all cluster servers.
+ *
+ * @return the postgresqlVersion value.
+ */
+ public String postgresqlVersion() {
+ return this.postgresqlVersion;
+ }
+
+ /**
+ * Set the postgresqlVersion property: The major PostgreSQL version on all cluster servers.
+ *
+ * @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 extension version on all cluster servers.
+ *
+ * @return the citusVersion value.
+ */
+ public String citusVersion() {
+ return this.citusVersion;
+ }
+
+ /**
+ * Set the citusVersion property: The Citus extension version on all cluster servers.
+ *
+ * @param citusVersion the citusVersion value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties 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 ClusterProperties object itself.
+ */
+ public ClusterProperties withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
+ this.maintenanceWindow = maintenanceWindow;
+ return this;
+ }
+
+ /**
+ * Get the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster servers.
+ *
+ * @return the preferredPrimaryZone value.
+ */
+ public String preferredPrimaryZone() {
+ return this.preferredPrimaryZone;
+ }
+
+ /**
+ * Set the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster servers.
+ *
+ * @param preferredPrimaryZone the preferredPrimaryZone value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties 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 ClusterProperties object itself.
+ */
+ public ClusterProperties withEnableShardsOnCoordinator(Boolean enableShardsOnCoordinator) {
+ this.enableShardsOnCoordinator = enableShardsOnCoordinator;
+ return this;
+ }
+
+ /**
+ * Get the enableHa property: If high availability (HA) is enabled or not for the cluster.
+ *
+ * @return the enableHa value.
+ */
+ public Boolean enableHa() {
+ return this.enableHa;
+ }
+
+ /**
+ * Set the enableHa property: If high availability (HA) 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 coordinatorServerEdition property: The edition of a coordinator server (default: GeneralPurpose).
+ * Required for creation.
+ *
+ * @return the coordinatorServerEdition value.
+ */
+ public String coordinatorServerEdition() {
+ return this.coordinatorServerEdition;
+ }
+
+ /**
+ * Set the coordinatorServerEdition property: The edition of a coordinator server (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 a server in MB. Required for creation. See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ *
+ * @return the coordinatorStorageQuotaInMb value.
+ */
+ public Integer coordinatorStorageQuotaInMb() {
+ return this.coordinatorStorageQuotaInMb;
+ }
+
+ /**
+ * Set the coordinatorStorageQuotaInMb property: The storage of a server in MB. Required for creation. See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ *
+ * @param coordinatorStorageQuotaInMb the coordinatorStorageQuotaInMb value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withCoordinatorStorageQuotaInMb(Integer coordinatorStorageQuotaInMb) {
+ this.coordinatorStorageQuotaInMb = coordinatorStorageQuotaInMb;
+ return this;
+ }
+
+ /**
+ * Get the coordinatorVCores property: The vCores count of a server (max: 96). Required for creation. See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ *
+ * @return the coordinatorVCores value.
+ */
+ public Integer coordinatorVCores() {
+ return this.coordinatorVCores;
+ }
+
+ /**
+ * Set the coordinatorVCores property: The vCores count of a server (max: 96). Required for creation. See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ *
+ * @param coordinatorVCores the coordinatorVCores value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withCoordinatorVCores(Integer coordinatorVCores) {
+ this.coordinatorVCores = coordinatorVCores;
+ return this;
+ }
+
+ /**
+ * Get the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator.
+ *
+ * @return the coordinatorEnablePublicIpAccess value.
+ */
+ public Boolean coordinatorEnablePublicIpAccess() {
+ return this.coordinatorEnablePublicIpAccess;
+ }
+
+ /**
+ * Set the coordinatorEnablePublicIpAccess property: If public access is enabled on 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 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 ClusterProperties object itself.
+ */
+ public ClusterProperties withNodeServerEdition(String nodeServerEdition) {
+ this.nodeServerEdition = nodeServerEdition;
+ return this;
+ }
+
+ /**
+ * Get the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a single node
+ * configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent
+ * multi-node configuration. Node count value cannot be 1. Required for creation.
+ *
+ * @return the nodeCount value.
+ */
+ public Integer nodeCount() {
+ return this.nodeCount;
+ }
+
+ /**
+ * Set the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a single node
+ * configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent
+ * multi-node configuration. Node count value cannot be 1. Required for creation.
+ *
+ * @param nodeCount the nodeCount value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withNodeCount(Integer nodeCount) {
+ this.nodeCount = nodeCount;
+ return this;
+ }
+
+ /**
+ * Get the nodeStorageQuotaInMb property: The storage in MB on each worker node. See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ *
+ * @return the nodeStorageQuotaInMb value.
+ */
+ public Integer nodeStorageQuotaInMb() {
+ return this.nodeStorageQuotaInMb;
+ }
+
+ /**
+ * Set the nodeStorageQuotaInMb property: The storage in MB on each worker node. See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ *
+ * @param nodeStorageQuotaInMb the nodeStorageQuotaInMb value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withNodeStorageQuotaInMb(Integer nodeStorageQuotaInMb) {
+ this.nodeStorageQuotaInMb = nodeStorageQuotaInMb;
+ return this;
+ }
+
+ /**
+ * Get the nodeVCores property: The compute in vCores on each worker node (max: 104). See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ *
+ * @return the nodeVCores value.
+ */
+ public Integer nodeVCores() {
+ return this.nodeVCores;
+ }
+
+ /**
+ * Set the nodeVCores property: The compute in vCores on each worker node (max: 104). See
+ * https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.
+ *
+ * @param nodeVCores the nodeVCores value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withNodeVCores(Integer nodeVCores) {
+ this.nodeVCores = nodeVCores;
+ return this;
+ }
+
+ /**
+ * Get the nodeEnablePublicIpAccess property: If public access is enabled on worker nodes.
+ *
+ * @return the nodeEnablePublicIpAccess value.
+ */
+ public Boolean nodeEnablePublicIpAccess() {
+ return this.nodeEnablePublicIpAccess;
+ }
+
+ /**
+ * Set the nodeEnablePublicIpAccess property: If public access is enabled on worker nodes.
+ *
+ * @param nodeEnablePublicIpAccess the nodeEnablePublicIpAccess value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withNodeEnablePublicIpAccess(Boolean nodeEnablePublicIpAccess) {
+ this.nodeEnablePublicIpAccess = nodeEnablePublicIpAccess;
+ return this;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Set the sourceResourceId property: The resource id of source cluster for read replica clusters.
+ *
+ * @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 Azure region of source cluster for read replica clusters.
+ *
+ * @return the sourceLocation value.
+ */
+ public String sourceLocation() {
+ return this.sourceLocation;
+ }
+
+ /**
+ * Set the sourceLocation property: The Azure region of source cluster for read replica clusters.
+ *
+ * @param sourceLocation the sourceLocation value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withSourceLocation(String sourceLocation) {
+ this.sourceLocation = sourceLocation;
+ return this;
+ }
+
+ /**
+ * Get the pointInTimeUtc property: Date and time in UTC (ISO8601 format) for cluster restore.
+ *
+ * @return the pointInTimeUtc value.
+ */
+ public OffsetDateTime pointInTimeUtc() {
+ return this.pointInTimeUtc;
+ }
+
+ /**
+ * Set the pointInTimeUtc property: Date and time in UTC (ISO8601 format) for cluster restore.
+ *
+ * @param pointInTimeUtc the pointInTimeUtc value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withPointInTimeUtc(OffsetDateTime pointInTimeUtc) {
+ this.pointInTimeUtc = pointInTimeUtc;
+ return this;
+ }
+
+ /**
+ * 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/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..4e9b2080b8bed
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterPropertiesForUpdate.java
@@ -0,0 +1,442 @@
+// 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. Each cluster is created with pre-defined administrative role called
+ * ‘citus’.
+ */
+ @JsonProperty(value = "administratorLoginPassword")
+ private String administratorLoginPassword;
+
+ /*
+ * The major PostgreSQL version on all cluster servers.
+ */
+ @JsonProperty(value = "postgresqlVersion")
+ private String postgresqlVersion;
+
+ /*
+ * The Citus extension version on all cluster servers.
+ */
+ @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 (HA) is enabled or not for the cluster.
+ */
+ @JsonProperty(value = "enableHa")
+ private Boolean enableHa;
+
+ /*
+ * Preferred primary availability zone (AZ) for all cluster servers.
+ */
+ @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 Integer coordinatorStorageQuotaInMb;
+
+ /*
+ * The vCores count of the coordinator (max: 96).
+ */
+ @JsonProperty(value = "coordinatorVCores")
+ private Integer coordinatorVCores;
+
+ /*
+ * If public access is enabled on 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. When node count is 0, it represents a single node configuration with the
+ * ability to create distributed tables on that node. 2 or more worker nodes represent multi-node configuration.
+ * Node count value cannot be 1.
+ */
+ @JsonProperty(value = "nodeCount")
+ private Integer nodeCount;
+
+ /*
+ * The storage in MB on each worker node.
+ */
+ @JsonProperty(value = "nodeStorageQuotaInMb")
+ private Integer nodeStorageQuotaInMb;
+
+ /*
+ * The compute in vCores on each worker node (max: 104).
+ */
+ @JsonProperty(value = "nodeVCores")
+ private Integer nodeVCores;
+
+ /*
+ * If public access is enabled on worker nodes.
+ */
+ @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. Each cluster is created
+ * with pre-defined administrative role called ‘citus’. .
+ *
+ * @return the administratorLoginPassword value.
+ */
+ public String administratorLoginPassword() {
+ return this.administratorLoginPassword;
+ }
+
+ /**
+ * Set the administratorLoginPassword property: The password of the administrator login. Each cluster is created
+ * with pre-defined administrative role called ‘citus’. .
+ *
+ * @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 major PostgreSQL version on all cluster servers.
+ *
+ * @return the postgresqlVersion value.
+ */
+ public String postgresqlVersion() {
+ return this.postgresqlVersion;
+ }
+
+ /**
+ * Set the postgresqlVersion property: The major PostgreSQL version on all cluster servers.
+ *
+ * @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 extension version on all cluster servers.
+ *
+ * @return the citusVersion value.
+ */
+ public String citusVersion() {
+ return this.citusVersion;
+ }
+
+ /**
+ * Set the citusVersion property: The Citus extension version on all cluster servers.
+ *
+ * @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 (HA) is enabled or not for the cluster.
+ *
+ * @return the enableHa value.
+ */
+ public Boolean enableHa() {
+ return this.enableHa;
+ }
+
+ /**
+ * Set the enableHa property: If high availability (HA) 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 availability zone (AZ) for all cluster servers.
+ *
+ * @return the preferredPrimaryZone value.
+ */
+ public String preferredPrimaryZone() {
+ return this.preferredPrimaryZone;
+ }
+
+ /**
+ * Set the preferredPrimaryZone property: Preferred primary availability zone (AZ) for all cluster servers.
+ *
+ * @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 Integer 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(Integer coordinatorStorageQuotaInMb) {
+ this.coordinatorStorageQuotaInMb = coordinatorStorageQuotaInMb;
+ return this;
+ }
+
+ /**
+ * Get the coordinatorVCores property: The vCores count of the coordinator (max: 96).
+ *
+ * @return the coordinatorVCores value.
+ */
+ public Integer coordinatorVCores() {
+ return this.coordinatorVCores;
+ }
+
+ /**
+ * Set the coordinatorVCores property: The vCores count of the coordinator (max: 96).
+ *
+ * @param coordinatorVCores the coordinatorVCores value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withCoordinatorVCores(Integer coordinatorVCores) {
+ this.coordinatorVCores = coordinatorVCores;
+ return this;
+ }
+
+ /**
+ * Get the coordinatorEnablePublicIpAccess property: If public access is enabled on coordinator.
+ *
+ * @return the coordinatorEnablePublicIpAccess value.
+ */
+ public Boolean coordinatorEnablePublicIpAccess() {
+ return this.coordinatorEnablePublicIpAccess;
+ }
+
+ /**
+ * Set the coordinatorEnablePublicIpAccess property: If public access is enabled on 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. When node count is 0, it represents a single node
+ * configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent
+ * multi-node configuration. Node count value cannot be 1.
+ *
+ * @return the nodeCount value.
+ */
+ public Integer nodeCount() {
+ return this.nodeCount;
+ }
+
+ /**
+ * Set the nodeCount property: Worker node count of the cluster. When node count is 0, it represents a single node
+ * configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent
+ * multi-node configuration. Node count value cannot be 1.
+ *
+ * @param nodeCount the nodeCount value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withNodeCount(Integer nodeCount) {
+ this.nodeCount = nodeCount;
+ return this;
+ }
+
+ /**
+ * Get the nodeStorageQuotaInMb property: The storage in MB on each worker node.
+ *
+ * @return the nodeStorageQuotaInMb value.
+ */
+ public Integer nodeStorageQuotaInMb() {
+ return this.nodeStorageQuotaInMb;
+ }
+
+ /**
+ * Set the nodeStorageQuotaInMb property: The storage in MB on each worker node.
+ *
+ * @param nodeStorageQuotaInMb the nodeStorageQuotaInMb value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withNodeStorageQuotaInMb(Integer nodeStorageQuotaInMb) {
+ this.nodeStorageQuotaInMb = nodeStorageQuotaInMb;
+ return this;
+ }
+
+ /**
+ * Get the nodeVCores property: The compute in vCores on each worker node (max: 104).
+ *
+ * @return the nodeVCores value.
+ */
+ public Integer nodeVCores() {
+ return this.nodeVCores;
+ }
+
+ /**
+ * Set the nodeVCores property: The compute in vCores on each worker node (max: 104).
+ *
+ * @param nodeVCores the nodeVCores value to set.
+ * @return the ClusterPropertiesForUpdate object itself.
+ */
+ public ClusterPropertiesForUpdate withNodeVCores(Integer nodeVCores) {
+ this.nodeVCores = nodeVCores;
+ return this;
+ }
+
+ /**
+ * Get the nodeEnablePublicIpAccess property: If public access is enabled on worker nodes.
+ *
+ * @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/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..6d52fc6673119
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ClusterServerInner.java
@@ -0,0 +1,299 @@
+// 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 major PostgreSQL version of server.
+ *
+ * @return the postgresqlVersion value.
+ */
+ public String postgresqlVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().postgresqlVersion();
+ }
+
+ /**
+ * Set the postgresqlVersion property: The major 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 extension version of server.
+ *
+ * @return the citusVersion value.
+ */
+ public String citusVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().citusVersion();
+ }
+
+ /**
+ * Set the citusVersion property: The Citus extension 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 Integer 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(Integer 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.
+ *
+ * @return the vCores value.
+ */
+ public Integer vCores() {
+ return this.innerProperties() == null ? null : this.innerProperties().vCores();
+ }
+
+ /**
+ * Set the vCores property: The vCores count of a server.
+ *
+ * @param vCores the vCores value to set.
+ * @return the ClusterServerInner object itself.
+ */
+ public ClusterServerInner withVCores(Integer vCores) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterServerProperties();
+ }
+ this.innerProperties().withVCores(vCores);
+ return this;
+ }
+
+ /**
+ * Get the enableHa property: If high availability (HA) 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 (HA) 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 enablePublicIpAccess property: If public access is enabled on server.
+ *
+ * @return the enablePublicIpAccess value.
+ */
+ public Boolean enablePublicIpAccess() {
+ return this.innerProperties() == null ? null : this.innerProperties().enablePublicIpAccess();
+ }
+
+ /**
+ * Get the isReadOnly property: If server database is set to read-only by system maintenance depending on high disk
+ * space usage.
+ *
+ * @return the isReadOnly value.
+ */
+ public Boolean isReadOnly() {
+ return this.innerProperties() == null ? null : this.innerProperties().isReadOnly();
+ }
+
+ /**
+ * Get the administratorLogin property: The administrator's login name of the servers in the cluster.
+ *
+ * @return the administratorLogin value.
+ */
+ public String administratorLogin() {
+ return this.innerProperties() == null ? null : this.innerProperties().administratorLogin();
+ }
+
+ /**
+ * 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..03e6a1ad7a4a3
--- /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 major PostgreSQL version of server.
+ */
+ @JsonProperty(value = "postgresqlVersion")
+ private String postgresqlVersion;
+
+ /*
+ * The Citus extension 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 major PostgreSQL version of server.
+ *
+ * @return the postgresqlVersion value.
+ */
+ public String postgresqlVersion() {
+ return this.postgresqlVersion;
+ }
+
+ /**
+ * Set the postgresqlVersion property: The major 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 extension version of server.
+ *
+ * @return the citusVersion value.
+ */
+ public String citusVersion() {
+ return this.citusVersion;
+ }
+
+ /**
+ * Set the citusVersion property: The Citus extension 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(Integer storageQuotaInMb) {
+ super.withStorageQuotaInMb(storageQuotaInMb);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ClusterServerProperties withVCores(Integer 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..a05fd6b2ea0ee
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ConfigurationInner.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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.ProvisioningState;
+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;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the configuration.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * 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..dd734c54f9b90
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ConfigurationProperties.java
@@ -0,0 +1,152 @@
+// 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.ProvisioningState;
+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;
+
+ /*
+ * Provisioning state of the configuration
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /** 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;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the configuration.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * 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..7477928c66a18
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/FirewallRuleInner.java
@@ -0,0 +1,123 @@
+// 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.azure.resourcemanager.postgresqlhsc.models.ProvisioningState;
+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;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the firewall rule.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * 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..46f31f29c1334
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/FirewallRuleProperties.java
@@ -0,0 +1,107 @@
+// 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.ProvisioningState;
+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;
+
+ /*
+ * Provisioning state of the firewall rule.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /** 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;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the firewall rule.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * 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..17efa12a1017e
--- /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 cluster name availability. */
+@Fluent
+public final class NameAvailabilityInner {
+ /*
+ * Error message.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /*
+ * Indicates whether the cluster 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 cluster name is available.
+ *
+ * @return the nameAvailable value.
+ */
+ public Boolean nameAvailable() {
+ return this.nameAvailable;
+ }
+
+ /**
+ * Set the nameAvailable property: Indicates whether the cluster 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..b5502a2034eb2
--- /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/PrivateEndpointConnectionInner.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateEndpointConnectionInner.java
new file mode 100644
index 0000000000000..65c3fb9577e1a
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateEndpointConnectionInner.java
@@ -0,0 +1,130 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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.PrivateEndpoint;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The private endpoint connection resource. */
+@Fluent
+public final class PrivateEndpointConnectionInner extends ProxyResource {
+ /*
+ * Resource properties.
+ */
+ @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 PrivateEndpointConnectionInner class. */
+ public PrivateEndpointConnectionInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private PrivateEndpointConnectionProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the groupIds property: The group ids for the private endpoint resource.
+ *
+ * @return the groupIds value.
+ */
+ public List groupIds() {
+ return this.innerProperties() == null ? null : this.innerProperties().groupIds();
+ }
+
+ /**
+ * Get the privateEndpoint property: The private endpoint resource.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint();
+ }
+
+ /**
+ * Set the privateEndpoint property: The private endpoint resource.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateEndpoint(privateEndpoint);
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState();
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the private endpoint connection resource.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * 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/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..0f1a423376d4a
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateEndpointConnectionProperties.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.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateEndpoint;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.postgresqlhsc.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of the private endpoint connection. */
+@Fluent
+public final class PrivateEndpointConnectionProperties {
+ /*
+ * The group ids for the private endpoint resource.
+ */
+ @JsonProperty(value = "groupIds", access = JsonProperty.Access.WRITE_ONLY)
+ private List groupIds;
+
+ /*
+ * The private endpoint resource.
+ */
+ @JsonProperty(value = "privateEndpoint")
+ private PrivateEndpoint privateEndpoint;
+
+ /*
+ * A collection of information about the state of the connection between service consumer and provider.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState", required = true)
+ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /*
+ * The provisioning state of the private endpoint connection resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private PrivateEndpointConnectionProvisioningState provisioningState;
+
+ /** Creates an instance of PrivateEndpointConnectionProperties class. */
+ public PrivateEndpointConnectionProperties() {
+ }
+
+ /**
+ * Get the groupIds property: The group ids for the private endpoint resource.
+ *
+ * @return the groupIds value.
+ */
+ public List groupIds() {
+ return this.groupIds;
+ }
+
+ /**
+ * Get the privateEndpoint property: The private endpoint resource.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint property: The private endpoint resource.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the private endpoint connection resource.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpoint() != null) {
+ privateEndpoint().validate();
+ }
+ if (privateLinkServiceConnectionState() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property privateLinkServiceConnectionState in model"
+ + " PrivateEndpointConnectionProperties"));
+ } else {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class);
+}
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..923554014c4b7
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateEndpointConnectionSimpleProperties.java
@@ -0,0 +1,114 @@
+// 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.PrivateLinkServiceConnectionState;
+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;
+
+ /*
+ * A collection of information about the state of the connection between service consumer and provider.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState")
+ private PrivateLinkServiceConnectionState 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: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionSimpleProperties object itself.
+ */
+ public PrivateEndpointConnectionSimpleProperties withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState 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..0b7f876216cef
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateLinkResourceInner.java
@@ -0,0 +1,101 @@
+// 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 {
+ /*
+ * Resource properties.
+ */
+ @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: Resource properties.
+ *
+ * @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();
+ }
+
+ /**
+ * 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();
+ }
+
+ /**
+ * Get the requiredZoneNames property: The private link resource private link DNS zone name.
+ *
+ * @return the requiredZoneNames value.
+ */
+ public List requiredZoneNames() {
+ return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames();
+ }
+
+ /**
+ * Set the requiredZoneNames property: The private link resource private link DNS zone name.
+ *
+ * @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..2d27a23f50823
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/PrivateLinkResourceProperties.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.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", access = JsonProperty.Access.WRITE_ONLY)
+ private String groupId;
+
+ /*
+ * The private link resource required member names.
+ */
+ @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY)
+ private List requiredMembers;
+
+ /*
+ * The private link resource private link DNS zone name.
+ */
+ @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;
+ }
+
+ /**
+ * Get the requiredMembers property: The private link resource required member names.
+ *
+ * @return the requiredMembers value.
+ */
+ public List requiredMembers() {
+ return this.requiredMembers;
+ }
+
+ /**
+ * Get the requiredZoneNames property: The private link resource private link DNS zone name.
+ *
+ * @return the requiredZoneNames value.
+ */
+ public List requiredZoneNames() {
+ return this.requiredZoneNames;
+ }
+
+ /**
+ * Set the requiredZoneNames property: The private link resource private link DNS zone name.
+ *
+ * @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..3208249d60aca
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/RoleInner.java
@@ -0,0 +1,99 @@
+// 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.azure.resourcemanager.postgresqlhsc.models.ProvisioningState;
+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", required = true)
+ private RoleProperties innerProperties = new RoleProperties();
+
+ /*
+ * 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;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the role.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * 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 RoleInner"));
+ } else {
+ innerProperties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(RoleInner.class);
+}
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..0d559f30ae0fc
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/RoleProperties.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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.postgresqlhsc.models.ProvisioningState;
+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;
+
+ /*
+ * Provisioning state of the role
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /** 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;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the role.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * 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..5adc984d446ab
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ServerConfigurationInner.java
@@ -0,0 +1,147 @@
+// 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.ProvisioningState;
+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();
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the configuration.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * 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..84a12ebe2c51c
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/ServerConfigurationProperties.java
@@ -0,0 +1,166 @@
+// 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.ProvisioningState;
+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", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean requiresRestart;
+
+ /*
+ * Provisioning state of the configuration.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /** 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;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the configuration.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * 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/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..35f087fea1112
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for CosmosDBForPostgreSql. Azure Cosmos DB for PostgreSQL database service
+ * resource provider REST APIs.
+ */
+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..86173d74ef83a
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for CosmosDBForPostgreSql. Azure Cosmos DB for PostgreSQL database service
+ * resource provider REST APIs.
+ */
+package com.azure.resourcemanager.postgresqlhsc.fluent;
diff --git a/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClusterImpl.java b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClusterImpl.java
new file mode 100644
index 0000000000000..ce3530c3e915d
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClusterImpl.java
@@ -0,0 +1,504 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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.ClusterInner;
+import com.azure.resourcemanager.postgresqlhsc.models.Cluster;
+import com.azure.resourcemanager.postgresqlhsc.models.ClusterForUpdate;
+import com.azure.resourcemanager.postgresqlhsc.models.MaintenanceWindow;
+import com.azure.resourcemanager.postgresqlhsc.models.ServerNameItem;
+import com.azure.resourcemanager.postgresqlhsc.models.SimplePrivateEndpointConnection;
+import java.time.OffsetDateTime;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class ClusterImpl implements Cluster, Cluster.Definition, Cluster.Update {
+ private ClusterInner 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 administratorLogin() {
+ return this.innerModel().administratorLogin();
+ }
+
+ public String administratorLoginPassword() {
+ return this.innerModel().administratorLoginPassword();
+ }
+
+ 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 Integer coordinatorStorageQuotaInMb() {
+ return this.innerModel().coordinatorStorageQuotaInMb();
+ }
+
+ public Integer coordinatorVCores() {
+ return this.innerModel().coordinatorVCores();
+ }
+
+ public Boolean coordinatorEnablePublicIpAccess() {
+ return this.innerModel().coordinatorEnablePublicIpAccess();
+ }
+
+ public String nodeServerEdition() {
+ return this.innerModel().nodeServerEdition();
+ }
+
+ public Integer nodeCount() {
+ return this.innerModel().nodeCount();
+ }
+
+ public Integer nodeStorageQuotaInMb() {
+ return this.innerModel().nodeStorageQuotaInMb();
+ }
+
+ public Integer 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 OffsetDateTime pointInTimeUtc() {
+ return this.innerModel().pointInTimeUtc();
+ }
+
+ 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 ClusterInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.postgresqlhsc.PostgresqlhscManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String clusterName;
+
+ private ClusterForUpdate updateParameters;
+
+ public ClusterImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public Cluster create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .create(resourceGroupName, clusterName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Cluster create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .create(resourceGroupName, clusterName, this.innerModel(), context);
+ return this;
+ }
+
+ ClusterImpl(String name, com.azure.resourcemanager.postgresqlhsc.PostgresqlhscManager serviceManager) {
+ this.innerObject = new ClusterInner();
+ this.serviceManager = serviceManager;
+ this.clusterName = name;
+ }
+
+ public ClusterImpl update() {
+ this.updateParameters = new ClusterForUpdate();
+ return this;
+ }
+
+ public Cluster apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .update(resourceGroupName, clusterName, updateParameters, Context.NONE);
+ return this;
+ }
+
+ public Cluster apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .update(resourceGroupName, clusterName, updateParameters, context);
+ return this;
+ }
+
+ ClusterImpl(ClusterInner 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 Cluster refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Cluster 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 ClusterImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public ClusterImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public ClusterImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateParameters.withTags(tags);
+ return this;
+ }
+ }
+
+ public ClusterImpl withAdministratorLoginPassword(String administratorLoginPassword) {
+ if (isInCreateMode()) {
+ this.innerModel().withAdministratorLoginPassword(administratorLoginPassword);
+ return this;
+ } else {
+ this.updateParameters.withAdministratorLoginPassword(administratorLoginPassword);
+ return this;
+ }
+ }
+
+ public ClusterImpl withPostgresqlVersion(String postgresqlVersion) {
+ if (isInCreateMode()) {
+ this.innerModel().withPostgresqlVersion(postgresqlVersion);
+ return this;
+ } else {
+ this.updateParameters.withPostgresqlVersion(postgresqlVersion);
+ return this;
+ }
+ }
+
+ public ClusterImpl withCitusVersion(String citusVersion) {
+ if (isInCreateMode()) {
+ this.innerModel().withCitusVersion(citusVersion);
+ return this;
+ } else {
+ this.updateParameters.withCitusVersion(citusVersion);
+ return this;
+ }
+ }
+
+ public ClusterImpl withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
+ if (isInCreateMode()) {
+ this.innerModel().withMaintenanceWindow(maintenanceWindow);
+ return this;
+ } else {
+ this.updateParameters.withMaintenanceWindow(maintenanceWindow);
+ return this;
+ }
+ }
+
+ public ClusterImpl withPreferredPrimaryZone(String preferredPrimaryZone) {
+ if (isInCreateMode()) {
+ this.innerModel().withPreferredPrimaryZone(preferredPrimaryZone);
+ return this;
+ } else {
+ this.updateParameters.withPreferredPrimaryZone(preferredPrimaryZone);
+ return this;
+ }
+ }
+
+ public ClusterImpl withEnableShardsOnCoordinator(Boolean enableShardsOnCoordinator) {
+ if (isInCreateMode()) {
+ this.innerModel().withEnableShardsOnCoordinator(enableShardsOnCoordinator);
+ return this;
+ } else {
+ this.updateParameters.withEnableShardsOnCoordinator(enableShardsOnCoordinator);
+ return this;
+ }
+ }
+
+ public ClusterImpl withEnableHa(Boolean enableHa) {
+ if (isInCreateMode()) {
+ this.innerModel().withEnableHa(enableHa);
+ return this;
+ } else {
+ this.updateParameters.withEnableHa(enableHa);
+ return this;
+ }
+ }
+
+ public ClusterImpl withCoordinatorServerEdition(String coordinatorServerEdition) {
+ if (isInCreateMode()) {
+ this.innerModel().withCoordinatorServerEdition(coordinatorServerEdition);
+ return this;
+ } else {
+ this.updateParameters.withCoordinatorServerEdition(coordinatorServerEdition);
+ return this;
+ }
+ }
+
+ public ClusterImpl withCoordinatorStorageQuotaInMb(Integer coordinatorStorageQuotaInMb) {
+ if (isInCreateMode()) {
+ this.innerModel().withCoordinatorStorageQuotaInMb(coordinatorStorageQuotaInMb);
+ return this;
+ } else {
+ this.updateParameters.withCoordinatorStorageQuotaInMb(coordinatorStorageQuotaInMb);
+ return this;
+ }
+ }
+
+ public ClusterImpl withCoordinatorVCores(Integer coordinatorVCores) {
+ if (isInCreateMode()) {
+ this.innerModel().withCoordinatorVCores(coordinatorVCores);
+ return this;
+ } else {
+ this.updateParameters.withCoordinatorVCores(coordinatorVCores);
+ return this;
+ }
+ }
+
+ public ClusterImpl withCoordinatorEnablePublicIpAccess(Boolean coordinatorEnablePublicIpAccess) {
+ if (isInCreateMode()) {
+ this.innerModel().withCoordinatorEnablePublicIpAccess(coordinatorEnablePublicIpAccess);
+ return this;
+ } else {
+ this.updateParameters.withCoordinatorEnablePublicIpAccess(coordinatorEnablePublicIpAccess);
+ return this;
+ }
+ }
+
+ public ClusterImpl withNodeServerEdition(String nodeServerEdition) {
+ if (isInCreateMode()) {
+ this.innerModel().withNodeServerEdition(nodeServerEdition);
+ return this;
+ } else {
+ this.updateParameters.withNodeServerEdition(nodeServerEdition);
+ return this;
+ }
+ }
+
+ public ClusterImpl withNodeCount(Integer nodeCount) {
+ if (isInCreateMode()) {
+ this.innerModel().withNodeCount(nodeCount);
+ return this;
+ } else {
+ this.updateParameters.withNodeCount(nodeCount);
+ return this;
+ }
+ }
+
+ public ClusterImpl withNodeStorageQuotaInMb(Integer nodeStorageQuotaInMb) {
+ if (isInCreateMode()) {
+ this.innerModel().withNodeStorageQuotaInMb(nodeStorageQuotaInMb);
+ return this;
+ } else {
+ this.updateParameters.withNodeStorageQuotaInMb(nodeStorageQuotaInMb);
+ return this;
+ }
+ }
+
+ public ClusterImpl withNodeVCores(Integer nodeVCores) {
+ if (isInCreateMode()) {
+ this.innerModel().withNodeVCores(nodeVCores);
+ return this;
+ } else {
+ this.updateParameters.withNodeVCores(nodeVCores);
+ return this;
+ }
+ }
+
+ public ClusterImpl withNodeEnablePublicIpAccess(Boolean nodeEnablePublicIpAccess) {
+ this.innerModel().withNodeEnablePublicIpAccess(nodeEnablePublicIpAccess);
+ return this;
+ }
+
+ public ClusterImpl withSourceResourceId(String sourceResourceId) {
+ this.innerModel().withSourceResourceId(sourceResourceId);
+ return this;
+ }
+
+ public ClusterImpl withSourceLocation(String sourceLocation) {
+ this.innerModel().withSourceLocation(sourceLocation);
+ return this;
+ }
+
+ public ClusterImpl withPointInTimeUtc(OffsetDateTime pointInTimeUtc) {
+ this.innerModel().withPointInTimeUtc(pointInTimeUtc);
+ 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..3e27519667f5f
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClusterServerImpl.java
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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 Integer storageQuotaInMb() {
+ return this.innerModel().storageQuotaInMb();
+ }
+
+ public Integer vCores() {
+ return this.innerModel().vCores();
+ }
+
+ public Boolean enableHa() {
+ return this.innerModel().enableHa();
+ }
+
+ public Boolean enablePublicIpAccess() {
+ return this.innerModel().enablePublicIpAccess();
+ }
+
+ public Boolean isReadOnly() {
+ return this.innerModel().isReadOnly();
+ }
+
+ public String administratorLogin() {
+ return this.innerModel().administratorLogin();
+ }
+
+ 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..d715e682b9ca6
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClustersClientImpl.java
@@ -0,0 +1,2648 @@
+// 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.ClusterInner;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.NameAvailabilityInner;
+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 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") String 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") String 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({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @BodyParam("application/json") ClusterInner 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") String 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({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("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({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String 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") String 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") String 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") String 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") String 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") String 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);
+ }
+
+ /**
+ * Lists all clusters in a 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()));
+ }
+
+ /**
+ * Lists all clusters in a 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));
+ }
+
+ /**
+ * Lists all clusters in a 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));
+ }
+
+ /**
+ * Lists all clusters in a 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));
+ }
+
+ /**
+ * Lists all clusters in a 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());
+ }
+
+ /**
+ * Lists all clusters in a 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));
+ }
+
+ /**
+ * Lists all clusters in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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()));
+ }
+
+ /**
+ * Lists all clusters in a 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));
+ }
+
+ /**
+ * Lists all clusters in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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));
+ }
+
+ /**
+ * Lists all clusters in a 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));
+ }
+
+ /**
+ * Lists all clusters in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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));
+ }
+
+ /**
+ * Lists all clusters in a 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 along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String clusterName, ClusterInner 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
+ .create(
+ 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 along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String clusterName, ClusterInner 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
+ .create(
+ 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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ClusterInner> beginCreateAsync(
+ String resourceGroupName, String clusterName, ClusterInner parameters) {
+ Mono>> mono = createWithResponseAsync(resourceGroupName, clusterName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ClusterInner> beginCreateAsync(
+ String resourceGroupName, String clusterName, ClusterInner parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, clusterName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ClusterInner> beginCreate(
+ String resourceGroupName, String clusterName, ClusterInner parameters) {
+ return this.beginCreateAsync(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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ClusterInner> beginCreate(
+ String resourceGroupName, String clusterName, ClusterInner parameters, Context context) {
+ return this.beginCreateAsync(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 on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String clusterName, ClusterInner parameters) {
+ return beginCreateAsync(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 on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String clusterName, ClusterInner parameters, Context context) {
+ return beginCreateAsync(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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterInner create(String resourceGroupName, String clusterName, ClusterInner parameters) {
+ return createAsync(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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterInner create(String resourceGroupName, String clusterName, ClusterInner parameters, Context context) {
+ return createAsync(resourceGroupName, clusterName, parameters, context).block();
+ }
+
+ /**
+ * Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as
+ * cluster creation date and time.
+ *
+ * @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 such as compute and storage configuration and cluster lifecycle metadata such
+ * as cluster creation date and time 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 such as compute and storage configuration and cluster lifecycle metadata such as
+ * cluster creation date and time.
+ *
+ * @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 such as compute and storage configuration and cluster lifecycle metadata such
+ * as cluster creation date and time 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 such as compute and storage configuration and cluster lifecycle metadata such as
+ * cluster creation date and time.
+ *
+ * @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 such as compute and storage configuration and cluster lifecycle metadata such
+ * as cluster creation date and time 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 such as compute and storage configuration and cluster lifecycle metadata such as
+ * cluster creation date and time.
+ *
+ * @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 such as compute and storage configuration and cluster lifecycle metadata such
+ * as cluster creation date and time 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 such as compute and storage configuration and cluster lifecycle metadata such as
+ * cluster creation date and time.
+ *
+ * @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 such as compute and storage configuration and cluster lifecycle metadata such
+ * as cluster creation date and time.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterInner 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 this.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 this.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 or several properties from the 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 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 or several properties from the 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 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 or several properties from the 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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ClusterInner> beginUpdateAsync(
+ String resourceGroupName, String clusterName, ClusterForUpdate parameters) {
+ Mono>> mono = updateWithResponseAsync(resourceGroupName, clusterName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, this.client.getContext());
+ }
+
+ /**
+ * Updates an existing cluster. The request body can contain one or several properties from the 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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ClusterInner> 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(), ClusterInner.class, ClusterInner.class, context);
+ }
+
+ /**
+ * Updates an existing cluster. The request body can contain one or several properties from the 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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ClusterInner> beginUpdate(
+ String resourceGroupName, String clusterName, ClusterForUpdate parameters) {
+ return this.beginUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Updates an existing cluster. The request body can contain one or several properties from the 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.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ClusterInner> beginUpdate(
+ String resourceGroupName, String clusterName, ClusterForUpdate parameters, Context context) {
+ return this.beginUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Updates an existing cluster. The request body can contain one or several properties from the 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 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 or several properties from the 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 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 or several properties from the 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterInner update(String resourceGroupName, String clusterName, ClusterForUpdate parameters) {
+ return updateAsync(resourceGroupName, clusterName, parameters).block();
+ }
+
+ /**
+ * Updates an existing cluster. The request body can contain one or several properties from the 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterInner update(
+ String resourceGroupName, String clusterName, ClusterForUpdate parameters, Context context) {
+ return updateAsync(resourceGroupName, clusterName, parameters, context).block();
+ }
+
+ /**
+ * Restarts all nodes in 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 all nodes in 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 all nodes in 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 all nodes in 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 all nodes in 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 this.beginRestartAsync(resourceGroupName, clusterName).getSyncPoller();
+ }
+
+ /**
+ * Restarts all nodes in 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 this.beginRestartAsync(resourceGroupName, clusterName, context).getSyncPoller();
+ }
+
+ /**
+ * Restarts all nodes in 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 all nodes in 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 all nodes in 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 all nodes in 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 stopped compute on all cluster nodes.
+ *
+ * @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 stopped compute on all cluster nodes.
+ *
+ * @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 stopped compute on all cluster nodes.
+ *
+ * @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 stopped compute on all cluster nodes.
+ *
+ * @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 stopped compute on all cluster nodes.
+ *
+ * @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 this.beginStartAsync(resourceGroupName, clusterName).getSyncPoller();
+ }
+
+ /**
+ * Starts stopped compute on all cluster nodes.
+ *
+ * @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 this.beginStartAsync(resourceGroupName, clusterName, context).getSyncPoller();
+ }
+
+ /**
+ * Starts stopped compute on all cluster nodes.
+ *
+ * @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 stopped compute on all cluster nodes.
+ *
+ * @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 stopped compute on all cluster nodes.
+ *
+ * @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 stopped compute on all cluster nodes.
+ *
+ * @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 compute on all cluster nodes.
+ *
+ * @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 compute on all cluster nodes.
+ *
+ * @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 compute on all cluster nodes.
+ *
+ * @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 compute on all cluster nodes.
+ *
+ * @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 compute on all cluster nodes.
+ *
+ * @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 this.beginStopAsync(resourceGroupName, clusterName).getSyncPoller();
+ }
+
+ /**
+ * Stops compute on all cluster nodes.
+ *
+ * @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 this.beginStopAsync(resourceGroupName, clusterName, context).getSyncPoller();
+ }
+
+ /**
+ * Stops compute on all cluster nodes.
+ *
+ * @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 compute on all cluster nodes.
+ *
+ * @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 compute on all cluster nodes.
+ *
+ * @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 compute on all cluster nodes.
+ *
+ * @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();
+ }
+
+ /**
+ * Promotes read replica cluster to an independent read-write 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()));
+ }
+
+ /**
+ * Promotes read replica cluster to an independent read-write 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);
+ }
+
+ /**
+ * Promotes read replica cluster to an independent read-write 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());
+ }
+
+ /**
+ * Promotes read replica cluster to an independent read-write 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);
+ }
+
+ /**
+ * Promotes read replica cluster to an independent read-write 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 this.beginPromoteReadReplicaAsync(resourceGroupName, clusterName).getSyncPoller();
+ }
+
+ /**
+ * Promotes read replica cluster to an independent read-write 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 this.beginPromoteReadReplicaAsync(resourceGroupName, clusterName, context).getSyncPoller();
+ }
+
+ /**
+ * Promotes read replica cluster to an independent read-write 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);
+ }
+
+ /**
+ * Promotes read replica cluster to an independent read-write 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);
+ }
+
+ /**
+ * Promotes read replica cluster to an independent read-write 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();
+ }
+
+ /**
+ * Promotes read replica cluster to an independent read-write 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();
+ }
+
+ /**
+ * Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most
+ * 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end
+ * with a hyphen.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if cluster 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 cluster 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()));
+ }
+
+ /**
+ * Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most
+ * 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end
+ * with a hyphen.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if cluster 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 cluster 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);
+ }
+
+ /**
+ * Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most
+ * 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end
+ * with a hyphen.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if cluster 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 cluster 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()));
+ }
+
+ /**
+ * Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most
+ * 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end
+ * with a hyphen.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if cluster 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 cluster name availability along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response checkNameAvailabilityWithResponse(
+ NameAvailabilityRequest nameAvailabilityRequest, Context context) {
+ return checkNameAvailabilityWithResponseAsync(nameAvailabilityRequest, context).block();
+ }
+
+ /**
+ * Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most
+ * 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end
+ * with a hyphen.
+ *
+ * @param nameAvailabilityRequest The required parameters for checking if cluster 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 cluster 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..652853039071b
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ClustersImpl.java
@@ -0,0 +1,232 @@
+// 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.ClusterInner;
+import com.azure.resourcemanager.postgresqlhsc.fluent.models.NameAvailabilityInner;
+import com.azure.resourcemanager.postgresqlhsc.models.Cluster;
+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 ClusterImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new ClusterImpl(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 ClusterImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Cluster getByResourceGroup(String resourceGroupName, String clusterName) {
+ ClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName);
+ if (inner != null) {
+ return new ClusterImpl(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 Cluster 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 ClusterImpl define(String name) {
+ return new ClusterImpl(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..572c19ae82bf6
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ConfigurationImpl.java
@@ -0,0 +1,79 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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.ProvisioningState;
+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 ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ 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..3e9784f71ecbb
--- /dev/null
+++ b/sdk/postgresqlhsc/azure-resourcemanager-postgresqlhsc/src/main/java/com/azure/resourcemanager/postgresqlhsc/implementation/ConfigurationsClientImpl.java
@@ -0,0 +1,1836 @@
+// 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 java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ConfigurationsClient. */
+public final class ConfigurationsClientImpl implements ConfigurationsClient {
+ /** 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") String 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