diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md
index 6852f67370af..112abaa44e03 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2021-07-16)
+- Azure Resource Manager PostgreSql client library for Java. This package contains Microsoft Azure SDK for PostgreSql Management SDK. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. Package tag package-2020-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.1 (2021-07-12)
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md
index dc75e165ed66..8db62ef654f8 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager PostgreSql client library for Java.
-This package contains Microsoft Azure SDK for PostgreSql Management SDK. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for PostgreSql Management SDK. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. Package tag package-2020-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-postgresqlflexibleserver
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -74,7 +74,6 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
-[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md)
## Troubleshooting
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml
index f9f5b3076d91..f1f93d4f5e8f 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml
@@ -13,7 +13,7 @@
jar
Microsoft Azure SDK for PostgreSql Management
- This package contains Microsoft Azure SDK for PostgreSql Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2021-06.
+ This package contains Microsoft Azure SDK for PostgreSql Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. Package tag package-2020-01-01.
https://github.com/Azure/azure-sdk-for-java
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java
index 8b4b8070da4a..6444d407064c 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java
@@ -25,21 +25,39 @@
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ConfigurationsImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.DatabasesImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.FirewallRulesImpl;
-import com.azure.resourcemanager.postgresqlflexibleserver.implementation.GetPrivateDnsZoneSuffixesImpl;
-import com.azure.resourcemanager.postgresqlflexibleserver.implementation.LocationBasedCapabilitiesImpl;
+import com.azure.resourcemanager.postgresqlflexibleserver.implementation.LocationBasedPerformanceTiersImpl;
+import com.azure.resourcemanager.postgresqlflexibleserver.implementation.LogFilesImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.OperationsImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PostgreSqlManagementClientBuilder;
+import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateEndpointConnectionsImpl;
+import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateLinkResourcesImpl;
+import com.azure.resourcemanager.postgresqlflexibleserver.implementation.RecoverableServersImpl;
+import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ReplicasImpl;
+import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerAdministratorsImpl;
+import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerBasedPerformanceTiersImpl;
+import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerKeysImpl;
+import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerParametersImpl;
+import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerSecurityAlertPoliciesImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServersImpl;
-import com.azure.resourcemanager.postgresqlflexibleserver.implementation.VirtualNetworkSubnetUsagesImpl;
+import com.azure.resourcemanager.postgresqlflexibleserver.implementation.VirtualNetworkRulesImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilities;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Configurations;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Databases;
import com.azure.resourcemanager.postgresqlflexibleserver.models.FirewallRules;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.GetPrivateDnsZoneSuffixes;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.LocationBasedCapabilities;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.LocationBasedPerformanceTiers;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.LogFiles;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Operations;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnections;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkResources;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.RecoverableServers;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.Replicas;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerAdministrators;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerBasedPerformanceTiers;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerKeys;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerParameters;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerSecurityAlertPolicies;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Servers;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsages;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkRules;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
@@ -54,21 +72,39 @@
public final class PostgreSqlManager {
private Servers servers;
+ private Replicas replicas;
+
private FirewallRules firewallRules;
+ private VirtualNetworkRules virtualNetworkRules;
+
+ private Databases databases;
+
private Configurations configurations;
- private CheckNameAvailabilities checkNameAvailabilities;
+ private ServerParameters serverParameters;
+
+ private LogFiles logFiles;
+
+ private ServerAdministrators serverAdministrators;
+
+ private RecoverableServers recoverableServers;
- private LocationBasedCapabilities locationBasedCapabilities;
+ private ServerBasedPerformanceTiers serverBasedPerformanceTiers;
- private VirtualNetworkSubnetUsages virtualNetworkSubnetUsages;
+ private LocationBasedPerformanceTiers locationBasedPerformanceTiers;
+
+ private CheckNameAvailabilities checkNameAvailabilities;
private Operations operations;
- private Databases databases;
+ private ServerSecurityAlertPolicies serverSecurityAlertPolicies;
+
+ private PrivateEndpointConnections privateEndpointConnections;
- private GetPrivateDnsZoneSuffixes getPrivateDnsZoneSuffixes;
+ private PrivateLinkResources privateLinkResources;
+
+ private ServerKeys serverKeys;
private final PostgreSqlManagementClient clientObject;
@@ -253,6 +289,14 @@ public Servers servers() {
return servers;
}
+ /** @return Resource collection API of Replicas. */
+ public Replicas replicas() {
+ if (this.replicas == null) {
+ this.replicas = new ReplicasImpl(clientObject.getReplicas(), this);
+ }
+ return replicas;
+ }
+
/** @return Resource collection API of FirewallRules. */
public FirewallRules firewallRules() {
if (this.firewallRules == null) {
@@ -261,6 +305,22 @@ public FirewallRules firewallRules() {
return firewallRules;
}
+ /** @return Resource collection API of VirtualNetworkRules. */
+ public VirtualNetworkRules virtualNetworkRules() {
+ if (this.virtualNetworkRules == null) {
+ this.virtualNetworkRules = new VirtualNetworkRulesImpl(clientObject.getVirtualNetworkRules(), this);
+ }
+ return virtualNetworkRules;
+ }
+
+ /** @return Resource collection API of Databases. */
+ public Databases databases() {
+ if (this.databases == null) {
+ this.databases = new DatabasesImpl(clientObject.getDatabases(), this);
+ }
+ return databases;
+ }
+
/** @return Resource collection API of Configurations. */
public Configurations configurations() {
if (this.configurations == null) {
@@ -269,6 +329,56 @@ public Configurations configurations() {
return configurations;
}
+ /** @return Resource collection API of ServerParameters. */
+ public ServerParameters serverParameters() {
+ if (this.serverParameters == null) {
+ this.serverParameters = new ServerParametersImpl(clientObject.getServerParameters(), this);
+ }
+ return serverParameters;
+ }
+
+ /** @return Resource collection API of LogFiles. */
+ public LogFiles logFiles() {
+ if (this.logFiles == null) {
+ this.logFiles = new LogFilesImpl(clientObject.getLogFiles(), this);
+ }
+ return logFiles;
+ }
+
+ /** @return Resource collection API of ServerAdministrators. */
+ public ServerAdministrators serverAdministrators() {
+ if (this.serverAdministrators == null) {
+ this.serverAdministrators = new ServerAdministratorsImpl(clientObject.getServerAdministrators(), this);
+ }
+ return serverAdministrators;
+ }
+
+ /** @return Resource collection API of RecoverableServers. */
+ public RecoverableServers recoverableServers() {
+ if (this.recoverableServers == null) {
+ this.recoverableServers = new RecoverableServersImpl(clientObject.getRecoverableServers(), this);
+ }
+ return recoverableServers;
+ }
+
+ /** @return Resource collection API of ServerBasedPerformanceTiers. */
+ public ServerBasedPerformanceTiers serverBasedPerformanceTiers() {
+ if (this.serverBasedPerformanceTiers == null) {
+ this.serverBasedPerformanceTiers =
+ new ServerBasedPerformanceTiersImpl(clientObject.getServerBasedPerformanceTiers(), this);
+ }
+ return serverBasedPerformanceTiers;
+ }
+
+ /** @return Resource collection API of LocationBasedPerformanceTiers. */
+ public LocationBasedPerformanceTiers locationBasedPerformanceTiers() {
+ if (this.locationBasedPerformanceTiers == null) {
+ this.locationBasedPerformanceTiers =
+ new LocationBasedPerformanceTiersImpl(clientObject.getLocationBasedPerformanceTiers(), this);
+ }
+ return locationBasedPerformanceTiers;
+ }
+
/** @return Resource collection API of CheckNameAvailabilities. */
public CheckNameAvailabilities checkNameAvailabilities() {
if (this.checkNameAvailabilities == null) {
@@ -278,47 +388,46 @@ public CheckNameAvailabilities checkNameAvailabilities() {
return checkNameAvailabilities;
}
- /** @return Resource collection API of LocationBasedCapabilities. */
- public LocationBasedCapabilities locationBasedCapabilities() {
- if (this.locationBasedCapabilities == null) {
- this.locationBasedCapabilities =
- new LocationBasedCapabilitiesImpl(clientObject.getLocationBasedCapabilities(), this);
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
}
- return locationBasedCapabilities;
+ return operations;
}
- /** @return Resource collection API of VirtualNetworkSubnetUsages. */
- public VirtualNetworkSubnetUsages virtualNetworkSubnetUsages() {
- if (this.virtualNetworkSubnetUsages == null) {
- this.virtualNetworkSubnetUsages =
- new VirtualNetworkSubnetUsagesImpl(clientObject.getVirtualNetworkSubnetUsages(), this);
+ /** @return Resource collection API of ServerSecurityAlertPolicies. */
+ public ServerSecurityAlertPolicies serverSecurityAlertPolicies() {
+ if (this.serverSecurityAlertPolicies == null) {
+ this.serverSecurityAlertPolicies =
+ new ServerSecurityAlertPoliciesImpl(clientObject.getServerSecurityAlertPolicies(), this);
}
- return virtualNetworkSubnetUsages;
+ return serverSecurityAlertPolicies;
}
- /** @return Resource collection API of Operations. */
- public Operations operations() {
- if (this.operations == null) {
- this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ /** @return Resource collection API of PrivateEndpointConnections. */
+ public PrivateEndpointConnections privateEndpointConnections() {
+ if (this.privateEndpointConnections == null) {
+ this.privateEndpointConnections =
+ new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
}
- return operations;
+ return privateEndpointConnections;
}
- /** @return Resource collection API of Databases. */
- public Databases databases() {
- if (this.databases == null) {
- this.databases = new DatabasesImpl(clientObject.getDatabases(), this);
+ /** @return Resource collection API of PrivateLinkResources. */
+ public PrivateLinkResources privateLinkResources() {
+ if (this.privateLinkResources == null) {
+ this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
}
- return databases;
+ return privateLinkResources;
}
- /** @return Resource collection API of GetPrivateDnsZoneSuffixes. */
- public GetPrivateDnsZoneSuffixes getPrivateDnsZoneSuffixes() {
- if (this.getPrivateDnsZoneSuffixes == null) {
- this.getPrivateDnsZoneSuffixes =
- new GetPrivateDnsZoneSuffixesImpl(clientObject.getGetPrivateDnsZoneSuffixes(), this);
+ /** @return Resource collection API of ServerKeys. */
+ public ServerKeys serverKeys() {
+ if (this.serverKeys == null) {
+ this.serverKeys = new ServerKeysImpl(clientObject.getServerKeys(), this);
}
- return getPrivateDnsZoneSuffixes;
+ return serverKeys;
}
/**
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java
index d9116c9daacb..5a5ca47c644c 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java
@@ -15,63 +15,6 @@
/** An instance of this class provides access to all the operations defined in ConfigurationsClient. */
public interface ConfigurationsClient {
- /**
- * List all the configurations in a given server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of server configurations.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByServer(String resourceGroupName, String serverName);
-
- /**
- * List all the configurations in a given server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of server configurations.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
-
- /**
- * Gets information about a configuration of server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about a configuration of server.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- ConfigurationInner get(String resourceGroupName, String serverName, String configurationName);
-
- /**
- * Gets information about a configuration of server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about a configuration of server.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String resourceGroupName, String serverName, String configurationName, Context context);
-
/**
* Updates a configuration of a server.
*
@@ -85,7 +28,7 @@ Response getWithResponse(
* @return represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, ConfigurationInner> beginUpdate(
+ SyncPoller, ConfigurationInner> beginCreateOrUpdate(
String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters);
/**
@@ -102,7 +45,7 @@ SyncPoller, ConfigurationInner> beginUpdate(
* @return represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, ConfigurationInner> beginUpdate(
+ SyncPoller, ConfigurationInner> beginCreateOrUpdate(
String resourceGroupName,
String serverName,
String configurationName,
@@ -122,7 +65,7 @@ SyncPoller, ConfigurationInner> beginUpdate(
* @return represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ConfigurationInner update(
+ ConfigurationInner createOrUpdate(
String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters);
/**
@@ -139,7 +82,7 @@ ConfigurationInner update(
* @return represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ConfigurationInner update(
+ ConfigurationInner createOrUpdate(
String resourceGroupName,
String serverName,
String configurationName,
@@ -147,76 +90,59 @@ ConfigurationInner update(
Context context);
/**
- * Updates a configuration of a server.
+ * Gets information about a configuration of server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
+ * @return information about a configuration of server.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, ConfigurationInner> beginPut(
- String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters);
+ ConfigurationInner get(String resourceGroupName, String serverName, String configurationName);
/**
- * Updates a configuration of a server.
+ * Gets information about a configuration of server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
+ * @return information about a configuration of server.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, ConfigurationInner> beginPut(
- String resourceGroupName,
- String serverName,
- String configurationName,
- ConfigurationInner parameters,
- Context context);
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String configurationName, Context context);
/**
- * Updates a configuration of a server.
+ * List all the configurations in a given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
+ * @return a list of server configurations.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- ConfigurationInner put(
- String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
/**
- * Updates a configuration of a server.
+ * List all the configurations in a given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
+ * @return a list of server configurations.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- ConfigurationInner put(
- String resourceGroupName,
- String serverName,
- String configurationName,
- ConfigurationInner parameters,
- Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java
index 13dd29b7b868..92da2c060e38 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java
@@ -28,7 +28,7 @@ public interface DatabasesClient {
* @return represents a Database.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, DatabaseInner> beginCreate(
+ SyncPoller, DatabaseInner> beginCreateOrUpdate(
String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters);
/**
@@ -45,7 +45,7 @@ SyncPoller, DatabaseInner> beginCreate(
* @return represents a Database.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, DatabaseInner> beginCreate(
+ SyncPoller, DatabaseInner> beginCreateOrUpdate(
String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context);
/**
@@ -61,7 +61,8 @@ SyncPoller, DatabaseInner> beginCreate(
* @return represents a Database.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- DatabaseInner create(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters);
+ DatabaseInner createOrUpdate(
+ String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters);
/**
* Creates a new database or updates an existing database.
@@ -77,7 +78,7 @@ SyncPoller, DatabaseInner> beginCreate(
* @return represents a Database.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- DatabaseInner create(
+ DatabaseInner createOrUpdate(
String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context);
/**
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java
index 0bd3c2f8e63f..ec2257f0d26b 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java
@@ -90,7 +90,7 @@ FirewallRuleInner createOrUpdate(
Context context);
/**
- * Deletes a PostgreSQL server firewall rule.
+ * Deletes a server firewall rule.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
@@ -105,7 +105,7 @@ SyncPoller, Void> beginDelete(
String resourceGroupName, String serverName, String firewallRuleName);
/**
- * Deletes a PostgreSQL server firewall rule.
+ * Deletes a server firewall rule.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
@@ -121,7 +121,7 @@ SyncPoller, Void> beginDelete(
String resourceGroupName, String serverName, String firewallRuleName, Context context);
/**
- * Deletes a PostgreSQL server firewall rule.
+ * Deletes a server firewall rule.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
@@ -134,7 +134,7 @@ SyncPoller, Void> beginDelete(
void delete(String resourceGroupName, String serverName, String firewallRuleName);
/**
- * Deletes a PostgreSQL server firewall rule.
+ * Deletes a server firewall rule.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
@@ -148,7 +148,7 @@ SyncPoller, Void> beginDelete(
void delete(String resourceGroupName, String serverName, String firewallRuleName, Context context);
/**
- * List all the firewall rules in a given server.
+ * Gets information about a server firewall rule.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
@@ -156,13 +156,13 @@ SyncPoller, Void> beginDelete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a server firewall rule.
+ * @return information about a server firewall rule.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName);
/**
- * List all the firewall rules in a given server.
+ * Gets information about a server firewall rule.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
@@ -171,14 +171,14 @@ SyncPoller, Void> beginDelete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a server firewall rule.
+ * @return information about a server firewall rule.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
String resourceGroupName, String serverName, String firewallRuleName, Context context);
/**
- * List all the firewall rules in a given PostgreSQL server.
+ * List all the firewall rules in a given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
@@ -191,7 +191,7 @@ Response getWithResponse(
PagedIterable listByServer(String resourceGroupName, String serverName);
/**
- * List all the firewall rules in a given PostgreSQL server.
+ * List all the firewall rules in a given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LocationBasedCapabilitiesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LocationBasedPerformanceTiersClient.java
similarity index 70%
rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LocationBasedCapabilitiesClient.java
rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LocationBasedPerformanceTiersClient.java
index ca68879783b3..c3cccee9e255 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LocationBasedCapabilitiesClient.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LocationBasedPerformanceTiersClient.java
@@ -8,32 +8,32 @@
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityPropertiesInner;
+import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PerformanceTierPropertiesInner;
-/** An instance of this class provides access to all the operations defined in LocationBasedCapabilitiesClient. */
-public interface LocationBasedCapabilitiesClient {
+/** An instance of this class provides access to all the operations defined in LocationBasedPerformanceTiersClient. */
+public interface LocationBasedPerformanceTiersClient {
/**
- * Get capabilities at specified location in a given subscription.
+ * List all the performance tiers at specified location in a given subscription.
*
* @param locationName The name of the location.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return capabilities at specified location in a given subscription.
+ * @return a list of performance tiers.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable execute(String locationName);
+ PagedIterable list(String locationName);
/**
- * Get capabilities at specified location in a given subscription.
+ * List all the performance tiers at specified location in a given subscription.
*
* @param locationName The name of the location.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return capabilities at specified location in a given subscription.
+ * @return a list of performance tiers.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable execute(String locationName, Context context);
+ PagedIterable list(String locationName, Context context);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LogFilesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LogFilesClient.java
new file mode 100644
index 000000000000..7a30a8f468a6
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/LogFilesClient.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.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.postgresqlflexibleserver.fluent.models.LogFileInner;
+
+/** An instance of this class provides access to all the operations defined in LogFilesClient. */
+public interface LogFilesClient {
+ /**
+ * List all the log files in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of log files.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * List all the log files in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of log files.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlManagementClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlManagementClient.java
index 3ab21cdb3288..fe659f97fb27 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlManagementClient.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlManagementClient.java
@@ -23,13 +23,6 @@ public interface PostgreSqlManagementClient {
*/
String getEndpoint();
- /**
- * Gets Api Version.
- *
- * @return the apiVersion value.
- */
- String getApiVersion();
-
/**
* Gets The HTTP pipeline to send requests through.
*
@@ -51,6 +44,13 @@ public interface PostgreSqlManagementClient {
*/
ServersClient getServers();
+ /**
+ * Gets the ReplicasClient object to access its operations.
+ *
+ * @return the ReplicasClient object.
+ */
+ ReplicasClient getReplicas();
+
/**
* Gets the FirewallRulesClient object to access its operations.
*
@@ -58,6 +58,20 @@ public interface PostgreSqlManagementClient {
*/
FirewallRulesClient getFirewallRules();
+ /**
+ * Gets the VirtualNetworkRulesClient object to access its operations.
+ *
+ * @return the VirtualNetworkRulesClient object.
+ */
+ VirtualNetworkRulesClient getVirtualNetworkRules();
+
+ /**
+ * Gets the DatabasesClient object to access its operations.
+ *
+ * @return the DatabasesClient object.
+ */
+ DatabasesClient getDatabases();
+
/**
* Gets the ConfigurationsClient object to access its operations.
*
@@ -66,25 +80,53 @@ public interface PostgreSqlManagementClient {
ConfigurationsClient getConfigurations();
/**
- * Gets the CheckNameAvailabilitiesClient object to access its operations.
+ * Gets the ServerParametersClient object to access its operations.
*
- * @return the CheckNameAvailabilitiesClient object.
+ * @return the ServerParametersClient object.
*/
- CheckNameAvailabilitiesClient getCheckNameAvailabilities();
+ ServerParametersClient getServerParameters();
+
+ /**
+ * Gets the LogFilesClient object to access its operations.
+ *
+ * @return the LogFilesClient object.
+ */
+ LogFilesClient getLogFiles();
/**
- * Gets the LocationBasedCapabilitiesClient object to access its operations.
+ * Gets the ServerAdministratorsClient object to access its operations.
*
- * @return the LocationBasedCapabilitiesClient object.
+ * @return the ServerAdministratorsClient object.
*/
- LocationBasedCapabilitiesClient getLocationBasedCapabilities();
+ ServerAdministratorsClient getServerAdministrators();
/**
- * Gets the VirtualNetworkSubnetUsagesClient object to access its operations.
+ * Gets the RecoverableServersClient object to access its operations.
*
- * @return the VirtualNetworkSubnetUsagesClient object.
+ * @return the RecoverableServersClient object.
*/
- VirtualNetworkSubnetUsagesClient getVirtualNetworkSubnetUsages();
+ RecoverableServersClient getRecoverableServers();
+
+ /**
+ * Gets the ServerBasedPerformanceTiersClient object to access its operations.
+ *
+ * @return the ServerBasedPerformanceTiersClient object.
+ */
+ ServerBasedPerformanceTiersClient getServerBasedPerformanceTiers();
+
+ /**
+ * Gets the LocationBasedPerformanceTiersClient object to access its operations.
+ *
+ * @return the LocationBasedPerformanceTiersClient object.
+ */
+ LocationBasedPerformanceTiersClient getLocationBasedPerformanceTiers();
+
+ /**
+ * Gets the CheckNameAvailabilitiesClient object to access its operations.
+ *
+ * @return the CheckNameAvailabilitiesClient object.
+ */
+ CheckNameAvailabilitiesClient getCheckNameAvailabilities();
/**
* Gets the OperationsClient object to access its operations.
@@ -94,16 +136,30 @@ public interface PostgreSqlManagementClient {
OperationsClient getOperations();
/**
- * Gets the DatabasesClient object to access its operations.
+ * Gets the ServerSecurityAlertPoliciesClient object to access its operations.
*
- * @return the DatabasesClient object.
+ * @return the ServerSecurityAlertPoliciesClient object.
*/
- DatabasesClient getDatabases();
+ ServerSecurityAlertPoliciesClient getServerSecurityAlertPolicies();
+
+ /**
+ * Gets the PrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the PrivateEndpointConnectionsClient object.
+ */
+ PrivateEndpointConnectionsClient getPrivateEndpointConnections();
+
+ /**
+ * Gets the PrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the PrivateLinkResourcesClient object.
+ */
+ PrivateLinkResourcesClient getPrivateLinkResources();
/**
- * Gets the GetPrivateDnsZoneSuffixesClient object to access its operations.
+ * Gets the ServerKeysClient object to access its operations.
*
- * @return the GetPrivateDnsZoneSuffixesClient object.
+ * @return the ServerKeysClient object.
*/
- GetPrivateDnsZoneSuffixesClient getGetPrivateDnsZoneSuffixes();
+ ServerKeysClient getServerKeys();
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java
new file mode 100644
index 000000000000..4f7304e2e3d1
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java
@@ -0,0 +1,289 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.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.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.TagsObject;
+
+/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */
+public interface PrivateEndpointConnectionsClient {
+ /**
+ * Gets a private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner get(
+ String resourceGroupName, String serverName, String privateEndpointConnectionName);
+
+ /**
+ * Gets a private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The privateEndpointConnectionName parameter.
+ * @param parameters A private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters);
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The privateEndpointConnectionName parameter.
+ * @param parameters A private endpoint connection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters,
+ Context context);
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The privateEndpointConnectionName parameter.
+ * @param parameters A private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters);
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The privateEndpointConnectionName parameter.
+ * @param parameters A private endpoint connection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters,
+ Context context);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The privateEndpointConnectionName parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String privateEndpointConnectionName);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The privateEndpointConnectionName parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The privateEndpointConnectionName parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The privateEndpointConnectionName parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Updates private endpoint connection with the specified tags.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The privateEndpointConnectionName parameter.
+ * @param parameters Parameters supplied to the Update private endpoint connection Tags operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, PrivateEndpointConnectionInner> beginUpdateTags(
+ String resourceGroupName, String serverName, String privateEndpointConnectionName, TagsObject parameters);
+
+ /**
+ * Updates private endpoint connection with the specified tags.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The privateEndpointConnectionName parameter.
+ * @param parameters Parameters supplied to the Update private endpoint connection Tags operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, PrivateEndpointConnectionInner> beginUpdateTags(
+ String resourceGroupName,
+ String serverName,
+ String privateEndpointConnectionName,
+ TagsObject parameters,
+ Context context);
+
+ /**
+ * Updates private endpoint connection with the specified tags.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The privateEndpointConnectionName parameter.
+ * @param parameters Parameters supplied to the Update private endpoint connection Tags operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner updateTags(
+ String resourceGroupName, String serverName, String privateEndpointConnectionName, TagsObject parameters);
+
+ /**
+ * Updates private endpoint connection with the specified tags.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The privateEndpointConnectionName parameter.
+ * @param parameters Parameters supplied to the Update private endpoint connection Tags operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner updateTags(
+ String resourceGroupName,
+ String serverName,
+ String privateEndpointConnectionName,
+ TagsObject parameters,
+ Context context);
+
+ /**
+ * Gets all private endpoint connections on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all private endpoint connections on a server.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * Gets all private endpoint connections on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all private endpoint connections on a server.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(
+ String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateLinkResourcesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateLinkResourcesClient.java
new file mode 100644
index 000000000000..cc0a748a7f05
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateLinkResourcesClient.java
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.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.postgresqlflexibleserver.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 PostgreSQL server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the private link resources for PostgreSQL server.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * Gets the private link resources for PostgreSQL server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the private link resources for PostgreSQL server.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Gets a private link resource for PostgreSQL server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param groupName The name of the private link resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private link resource for PostgreSQL server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateLinkResourceInner get(String resourceGroupName, String serverName, String groupName);
+
+ /**
+ * Gets a private link resource for PostgreSQL server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param groupName The name of the private link resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private link resource for PostgreSQL server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String groupName, Context context);
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/RecoverableServersClient.java
similarity index 55%
rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java
rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/RecoverableServersClient.java
index 16bb5ad1c086..de991120b57c 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/RecoverableServersClient.java
@@ -8,28 +8,35 @@
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
+import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.RecoverableServerResourceInner;
-/** An instance of this class provides access to all the operations defined in GetPrivateDnsZoneSuffixesClient. */
-public interface GetPrivateDnsZoneSuffixesClient {
+/** An instance of this class provides access to all the operations defined in RecoverableServersClient. */
+public interface RecoverableServersClient {
/**
- * Get private DNS zone suffix in the cloud.
+ * Gets a recoverable PostgreSQL Server.
*
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return private DNS zone suffix in the cloud.
+ * @return a recoverable PostgreSQL Server.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- String execute();
+ RecoverableServerResourceInner get(String resourceGroupName, String serverName);
/**
- * Get private DNS zone suffix in the cloud.
+ * Gets a recoverable PostgreSQL Server.
*
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return private DNS zone suffix in the cloud.
+ * @return a recoverable PostgreSQL Server.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response executeWithResponse(Context context);
+ Response getWithResponse(
+ String resourceGroupName, String serverName, Context context);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ReplicasClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ReplicasClient.java
new file mode 100644
index 000000000000..f2554e6973a4
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ReplicasClient.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.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.postgresqlflexibleserver.fluent.models.ServerInner;
+
+/** An instance of this class provides access to all the operations defined in ReplicasClient. */
+public interface ReplicasClient {
+ /**
+ * List all the replicas for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of servers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * List all the replicas for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of servers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerAdministratorsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerAdministratorsClient.java
new file mode 100644
index 000000000000..3befd8a93693
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerAdministratorsClient.java
@@ -0,0 +1,190 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.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.postgresqlflexibleserver.fluent.models.ServerAdministratorResourceInner;
+
+/** An instance of this class provides access to all the operations defined in ServerAdministratorsClient. */
+public interface ServerAdministratorsClient {
+ /**
+ * Gets information about a AAD server administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a AAD server administrator.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerAdministratorResourceInner get(String resourceGroupName, String serverName);
+
+ /**
+ * Gets information about a AAD server administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about a AAD server administrator.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the
+ * existing administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a and external administrator to be created.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ServerAdministratorResourceInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, ServerAdministratorResourceInner properties);
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the
+ * existing administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server administrator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a and external administrator to be created.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ServerAdministratorResourceInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, ServerAdministratorResourceInner properties, Context context);
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the
+ * existing administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a and external administrator to be created.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerAdministratorResourceInner createOrUpdate(
+ String resourceGroupName, String serverName, ServerAdministratorResourceInner properties);
+
+ /**
+ * Creates or update active directory administrator on an existing server. The update action will overwrite the
+ * existing administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param properties The required parameters for creating or updating an AAD server administrator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a and external administrator to be created.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerAdministratorResourceInner createOrUpdate(
+ String resourceGroupName, String serverName, ServerAdministratorResourceInner properties, Context context);
+
+ /**
+ * Deletes server active directory administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName);
+
+ /**
+ * Deletes server active directory administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Deletes server active directory administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName);
+
+ /**
+ * Deletes server active directory administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Returns a list of server Administrators.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response to a list Active Directory Administrators request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName);
+
+ /**
+ * Returns a list of server Administrators.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response to a list Active Directory Administrators request.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerBasedPerformanceTiersClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerBasedPerformanceTiersClient.java
new file mode 100644
index 000000000000..b33e100945a3
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerBasedPerformanceTiersClient.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.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.postgresqlflexibleserver.fluent.models.PerformanceTierPropertiesInner;
+
+/** An instance of this class provides access to all the operations defined in ServerBasedPerformanceTiersClient. */
+public interface ServerBasedPerformanceTiersClient {
+ /**
+ * List all the performance tiers for a PostgreSQL server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of performance tiers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName);
+
+ /**
+ * List all the performance tiers for a PostgreSQL server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of performance tiers.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerKeysClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerKeysClient.java
new file mode 100644
index 000000000000..878d603cac4d
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerKeysClient.java
@@ -0,0 +1,197 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.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.postgresqlflexibleserver.fluent.models.ServerKeyInner;
+
+/** An instance of this class provides access to all the operations defined in ServerKeysClient. */
+public interface ServerKeysClient {
+ /**
+ * Gets a list of Server keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Server keys.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName);
+
+ /**
+ * Gets a list of Server keys.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of Server keys.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Gets a PostgreSQL Server key.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param keyName The name of the PostgreSQL Server key to be retrieved.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a PostgreSQL Server key.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerKeyInner get(String resourceGroupName, String serverName, String keyName);
+
+ /**
+ * Gets a PostgreSQL Server key.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param keyName The name of the PostgreSQL Server key to be retrieved.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a PostgreSQL Server key.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String keyName, Context context);
+
+ /**
+ * Creates or updates a PostgreSQL Server key.
+ *
+ * @param serverName The name of the server.
+ * @param keyName The name of the PostgreSQL Server key to be operated on (updated or created).
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters The requested PostgreSQL Server key resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a PostgreSQL Server key.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ServerKeyInner> beginCreateOrUpdate(
+ String serverName, String keyName, String resourceGroupName, ServerKeyInner parameters);
+
+ /**
+ * Creates or updates a PostgreSQL Server key.
+ *
+ * @param serverName The name of the server.
+ * @param keyName The name of the PostgreSQL Server key to be operated on (updated or created).
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters The requested PostgreSQL Server key resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a PostgreSQL Server key.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ServerKeyInner> beginCreateOrUpdate(
+ String serverName, String keyName, String resourceGroupName, ServerKeyInner parameters, Context context);
+
+ /**
+ * Creates or updates a PostgreSQL Server key.
+ *
+ * @param serverName The name of the server.
+ * @param keyName The name of the PostgreSQL Server key to be operated on (updated or created).
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters The requested PostgreSQL Server key resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a PostgreSQL Server key.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerKeyInner createOrUpdate(
+ String serverName, String keyName, String resourceGroupName, ServerKeyInner parameters);
+
+ /**
+ * Creates or updates a PostgreSQL Server key.
+ *
+ * @param serverName The name of the server.
+ * @param keyName The name of the PostgreSQL Server key to be operated on (updated or created).
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters The requested PostgreSQL Server key resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a PostgreSQL Server key.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerKeyInner createOrUpdate(
+ String serverName, String keyName, String resourceGroupName, ServerKeyInner parameters, Context context);
+
+ /**
+ * Deletes the PostgreSQL Server key with the given name.
+ *
+ * @param serverName The name of the server.
+ * @param keyName The name of the PostgreSQL Server key to be deleted.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String serverName, String keyName, String resourceGroupName);
+
+ /**
+ * Deletes the PostgreSQL Server key with the given name.
+ *
+ * @param serverName The name of the server.
+ * @param keyName The name of the PostgreSQL Server key to be deleted.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String serverName, String keyName, String resourceGroupName, Context context);
+
+ /**
+ * Deletes the PostgreSQL Server key with the given name.
+ *
+ * @param serverName The name of the server.
+ * @param keyName The name of the PostgreSQL Server key to be deleted.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String serverName, String keyName, String resourceGroupName);
+
+ /**
+ * Deletes the PostgreSQL Server key with the given name.
+ *
+ * @param serverName The name of the server.
+ * @param keyName The name of the PostgreSQL Server key to be deleted.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String serverName, String keyName, String resourceGroupName, Context context);
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerParametersClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerParametersClient.java
new file mode 100644
index 000000000000..4d1a11b6aa96
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerParametersClient.java
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationListResultInner;
+
+/** An instance of this class provides access to all the operations defined in ServerParametersClient. */
+public interface ServerParametersClient {
+ /**
+ * Update a list of configurations in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param value The parameters for updating a list of server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server configurations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ConfigurationListResultInner> beginListUpdateConfigurations(
+ String resourceGroupName, String serverName, ConfigurationListResultInner value);
+
+ /**
+ * Update a list of configurations in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param value The parameters for updating a list of server configuration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server configurations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ConfigurationListResultInner> beginListUpdateConfigurations(
+ String resourceGroupName, String serverName, ConfigurationListResultInner value, Context context);
+
+ /**
+ * Update a list of configurations in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param value The parameters for updating a list of server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server configurations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationListResultInner listUpdateConfigurations(
+ String resourceGroupName, String serverName, ConfigurationListResultInner value);
+
+ /**
+ * Update a list of configurations in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param value The parameters for updating a list of server configuration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server configurations.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationListResultInner listUpdateConfigurations(
+ String resourceGroupName, String serverName, ConfigurationListResultInner value, Context context);
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerSecurityAlertPoliciesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerSecurityAlertPoliciesClient.java
new file mode 100644
index 000000000000..46c85c5a6ddf
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerSecurityAlertPoliciesClient.java
@@ -0,0 +1,157 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.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.postgresqlflexibleserver.fluent.models.ServerSecurityAlertPolicyInner;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.SecurityAlertPolicyName;
+
+/** An instance of this class provides access to all the operations defined in ServerSecurityAlertPoliciesClient. */
+public interface ServerSecurityAlertPoliciesClient {
+ /**
+ * Get a server's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param securityAlertPolicyName The name of the security alert policy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerSecurityAlertPolicyInner get(
+ String resourceGroupName, String serverName, SecurityAlertPolicyName securityAlertPolicyName);
+
+ /**
+ * Get a server's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param securityAlertPolicyName The name of the security alert policy.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, SecurityAlertPolicyName securityAlertPolicyName, Context context);
+
+ /**
+ * Creates or updates a threat detection policy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param securityAlertPolicyName The name of the threat detection policy.
+ * @param parameters The server security alert policy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ SecurityAlertPolicyName securityAlertPolicyName,
+ ServerSecurityAlertPolicyInner parameters);
+
+ /**
+ * Creates or updates a threat detection policy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param securityAlertPolicyName The name of the threat detection policy.
+ * @param parameters The server security alert policy.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ SecurityAlertPolicyName securityAlertPolicyName,
+ ServerSecurityAlertPolicyInner parameters,
+ Context context);
+
+ /**
+ * Creates or updates a threat detection policy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param securityAlertPolicyName The name of the threat detection policy.
+ * @param parameters The server security alert policy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerSecurityAlertPolicyInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ SecurityAlertPolicyName securityAlertPolicyName,
+ ServerSecurityAlertPolicyInner parameters);
+
+ /**
+ * Creates or updates a threat detection policy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param securityAlertPolicyName The name of the threat detection policy.
+ * @param parameters The server security alert policy.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerSecurityAlertPolicyInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ SecurityAlertPolicyName securityAlertPolicyName,
+ ServerSecurityAlertPolicyInner parameters,
+ Context context);
+
+ /**
+ * Get the server's threat detection policies.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the server's threat detection policies.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * Get the server's threat detection policies.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the server's threat detection policies.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(
+ String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java
index f414c42e8dba..529a782aecb8 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java
@@ -12,13 +12,13 @@
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerInner;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForUpdate;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForCreate;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerUpdateParameters;
/** An instance of this class provides access to all the operations defined in ServersClient. */
public interface ServersClient {
/**
- * Creates a new server.
+ * Creates a new server, or will overwrite an existing server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
@@ -30,10 +30,10 @@ public interface ServersClient {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller, ServerInner> beginCreate(
- String resourceGroupName, String serverName, ServerInner parameters);
+ String resourceGroupName, String serverName, ServerForCreate parameters);
/**
- * Creates a new server.
+ * Creates a new server, or will overwrite an existing server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
@@ -46,10 +46,10 @@ SyncPoller, ServerInner> beginCreate(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller, ServerInner> beginCreate(
- String resourceGroupName, String serverName, ServerInner parameters, Context context);
+ String resourceGroupName, String serverName, ServerForCreate parameters, Context context);
/**
- * Creates a new server.
+ * Creates a new server, or will overwrite an existing server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
@@ -60,10 +60,10 @@ SyncPoller, ServerInner> beginCreate(
* @return represents a server.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ServerInner create(String resourceGroupName, String serverName, ServerInner parameters);
+ ServerInner create(String resourceGroupName, String serverName, ServerForCreate parameters);
/**
- * Creates a new server.
+ * Creates a new server, or will overwrite an existing server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
@@ -75,7 +75,7 @@ SyncPoller, ServerInner> beginCreate(
* @return represents a server.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ServerInner create(String resourceGroupName, String serverName, ServerInner parameters, Context context);
+ ServerInner create(String resourceGroupName, String serverName, ServerForCreate parameters, Context context);
/**
* Updates an existing server. The request body can contain one to many of the properties present in the normal
@@ -91,7 +91,7 @@ SyncPoller, ServerInner> beginCreate(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller, ServerInner> beginUpdate(
- String resourceGroupName, String serverName, ServerForUpdate parameters);
+ String resourceGroupName, String serverName, ServerUpdateParameters parameters);
/**
* Updates an existing server. The request body can contain one to many of the properties present in the normal
@@ -108,7 +108,7 @@ SyncPoller, ServerInner> beginUpdate(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller, ServerInner> beginUpdate(
- String resourceGroupName, String serverName, ServerForUpdate parameters, Context context);
+ String resourceGroupName, String serverName, ServerUpdateParameters parameters, Context context);
/**
* Updates an existing server. The request body can contain one to many of the properties present in the normal
@@ -123,7 +123,7 @@ SyncPoller, ServerInner> beginUpdate(
* @return represents a server.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ServerInner update(String resourceGroupName, String serverName, ServerForUpdate parameters);
+ ServerInner update(String resourceGroupName, String serverName, ServerUpdateParameters parameters);
/**
* Updates an existing server. The request body can contain one to many of the properties present in the normal
@@ -139,7 +139,7 @@ SyncPoller, ServerInner> beginUpdate(
* @return represents a server.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ServerInner update(String resourceGroupName, String serverName, ServerForUpdate parameters, Context context);
+ ServerInner update(String resourceGroupName, String serverName, ServerUpdateParameters parameters, Context context);
/**
* Deletes a server.
@@ -272,22 +272,19 @@ SyncPoller, ServerInner> beginUpdate(
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
- * @param parameters The parameters for restarting a server.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, Void> beginRestart(
- String resourceGroupName, String serverName, RestartParameter parameters);
+ SyncPoller, Void> beginRestart(String resourceGroupName, String serverName);
/**
* Restarts a server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
- * @param parameters The parameters for restarting a server.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -295,21 +292,7 @@ SyncPoller, Void> beginRestart(
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, Void> beginRestart(
- String resourceGroupName, String serverName, RestartParameter parameters, Context context);
-
- /**
- * Restarts a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param parameters The parameters for restarting a server.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- void restart(String resourceGroupName, String serverName, RestartParameter parameters);
+ SyncPoller, Void> beginRestart(String resourceGroupName, String serverName, Context context);
/**
* Restarts a server.
@@ -328,116 +311,11 @@ SyncPoller, Void> beginRestart(
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
- * @param parameters The parameters for restarting a server.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- void restart(String resourceGroupName, String serverName, RestartParameter parameters, Context context);
-
- /**
- * Starts a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, Void> beginStart(String resourceGroupName, String serverName);
-
- /**
- * Starts a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, Void> beginStart(String resourceGroupName, String serverName, Context context);
-
- /**
- * Starts a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- void start(String resourceGroupName, String serverName);
-
- /**
- * Starts a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- void start(String resourceGroupName, String serverName, Context context);
-
- /**
- * Stops a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, Void> beginStop(String resourceGroupName, String serverName);
-
- /**
- * Stops a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- SyncPoller, Void> beginStop(String resourceGroupName, String serverName, Context context);
-
- /**
- * Stops a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- void stop(String resourceGroupName, String serverName);
-
- /**
- * Stops a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void stop(String resourceGroupName, String serverName, Context context);
+ void restart(String resourceGroupName, String serverName, Context context);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkRulesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkRulesClient.java
new file mode 100644
index 000000000000..de3179ea0cb5
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkRulesClient.java
@@ -0,0 +1,206 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.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.postgresqlflexibleserver.fluent.models.VirtualNetworkRuleInner;
+
+/** An instance of this class provides access to all the operations defined in VirtualNetworkRulesClient. */
+public interface VirtualNetworkRulesClient {
+ /**
+ * Gets a virtual network rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a virtual network rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualNetworkRuleInner get(String resourceGroupName, String serverName, String virtualNetworkRuleName);
+
+ /**
+ * Gets a virtual network rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a virtual network rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context);
+
+ /**
+ * Creates or updates an existing virtual network rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network rule.
+ * @param parameters The requested virtual Network Rule Resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a virtual network rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, VirtualNetworkRuleInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters);
+
+ /**
+ * Creates or updates an existing virtual network rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network rule.
+ * @param parameters The requested virtual Network Rule Resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a virtual network rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, VirtualNetworkRuleInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String virtualNetworkRuleName,
+ VirtualNetworkRuleInner parameters,
+ Context context);
+
+ /**
+ * Creates or updates an existing virtual network rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network rule.
+ * @param parameters The requested virtual Network Rule Resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a virtual network rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualNetworkRuleInner createOrUpdate(
+ String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters);
+
+ /**
+ * Creates or updates an existing virtual network rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network rule.
+ * @param parameters The requested virtual Network Rule Resource state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a virtual network rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualNetworkRuleInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String virtualNetworkRuleName,
+ VirtualNetworkRuleInner parameters,
+ Context context);
+
+ /**
+ * Deletes the virtual network rule with the given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String virtualNetworkRuleName);
+
+ /**
+ * Deletes the virtual network rule with the given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context);
+
+ /**
+ * Deletes the virtual network rule with the given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String virtualNetworkRuleName);
+
+ /**
+ * Deletes the virtual network rule with the given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param virtualNetworkRuleName The name of the virtual network rule.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context);
+
+ /**
+ * Gets a list of virtual network rules in a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of virtual network rules in a server.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * Gets a list of virtual network rules in a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of virtual network rules in a server.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java
deleted file mode 100644
index 36279e65b3a7..000000000000
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.postgresqlflexibleserver.fluent;
-
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.http.rest.Response;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter;
-
-/** An instance of this class provides access to all the operations defined in VirtualNetworkSubnetUsagesClient. */
-public interface VirtualNetworkSubnetUsagesClient {
- /**
- * Get virtual network subnet usage for a given vNet resource id.
- *
- * @param locationName The name of the location.
- * @param parameters The required parameters for creating or updating a server.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return virtual network subnet usage for a given vNet resource id.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- VirtualNetworkSubnetUsageResultInner execute(String locationName, VirtualNetworkSubnetUsageParameter parameters);
-
- /**
- * Get virtual network subnet usage for a given vNet resource id.
- *
- * @param locationName The name of the location.
- * @param parameters The required parameters for creating or updating a server.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return virtual network subnet usage for a given vNet resource id.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response executeWithResponse(
- String locationName, VirtualNetworkSubnetUsageParameter parameters, Context context);
-}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapabilityPropertiesInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapabilityPropertiesInner.java
deleted file mode 100644
index eb94b8598405..000000000000
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapabilityPropertiesInner.java
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
-
-import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerEditionCapability;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.HyperscaleNodeEditionCapability;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/** Location capabilities. */
-@Immutable
-public final class CapabilityPropertiesInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CapabilityPropertiesInner.class);
-
- /*
- * zone name
- */
- @JsonProperty(value = "zone", access = JsonProperty.Access.WRITE_ONLY)
- private String zone;
-
- /*
- * A value indicating whether a new server in this region can have
- * geo-backups to paired region.
- */
- @JsonProperty(value = "geoBackupSupported", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean geoBackupSupported;
-
- /*
- * A value indicating whether a new server in this region can support multi
- * zone HA.
- */
- @JsonProperty(value = "zoneRedundantHaSupported", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean zoneRedundantHaSupported;
-
- /*
- * A value indicating whether a new server in this region can have
- * geo-backups to paired region.
- */
- @JsonProperty(value = "zoneRedundantHaAndGeoBackupSupported", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean zoneRedundantHaAndGeoBackupSupported;
-
- /*
- * The supportedFlexibleServerEditions property.
- */
- @JsonProperty(value = "supportedFlexibleServerEditions", access = JsonProperty.Access.WRITE_ONLY)
- private List supportedFlexibleServerEditions;
-
- /*
- * The supportedHyperscaleNodeEditions property.
- */
- @JsonProperty(value = "supportedHyperscaleNodeEditions", access = JsonProperty.Access.WRITE_ONLY)
- private List supportedHyperscaleNodeEditions;
-
- /*
- * The status
- */
- @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
- private String status;
-
- /**
- * Get the zone property: zone name.
- *
- * @return the zone value.
- */
- public String zone() {
- return this.zone;
- }
-
- /**
- * Get the geoBackupSupported property: A value indicating whether a new server in this region can have geo-backups
- * to paired region.
- *
- * @return the geoBackupSupported value.
- */
- public Boolean geoBackupSupported() {
- return this.geoBackupSupported;
- }
-
- /**
- * Get the zoneRedundantHaSupported property: A value indicating whether a new server in this region can support
- * multi zone HA.
- *
- * @return the zoneRedundantHaSupported value.
- */
- public Boolean zoneRedundantHaSupported() {
- return this.zoneRedundantHaSupported;
- }
-
- /**
- * Get the zoneRedundantHaAndGeoBackupSupported property: A value indicating whether a new server in this region can
- * have geo-backups to paired region.
- *
- * @return the zoneRedundantHaAndGeoBackupSupported value.
- */
- public Boolean zoneRedundantHaAndGeoBackupSupported() {
- return this.zoneRedundantHaAndGeoBackupSupported;
- }
-
- /**
- * Get the supportedFlexibleServerEditions property: The supportedFlexibleServerEditions property.
- *
- * @return the supportedFlexibleServerEditions value.
- */
- public List supportedFlexibleServerEditions() {
- return this.supportedFlexibleServerEditions;
- }
-
- /**
- * Get the supportedHyperscaleNodeEditions property: The supportedHyperscaleNodeEditions property.
- *
- * @return the supportedHyperscaleNodeEditions value.
- */
- public List supportedHyperscaleNodeEditions() {
- return this.supportedHyperscaleNodeEditions;
- }
-
- /**
- * Get the status property: The status.
- *
- * @return the status value.
- */
- public String status() {
- return this.status;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (supportedFlexibleServerEditions() != null) {
- supportedFlexibleServerEditions().forEach(e -> e.validate());
- }
- if (supportedHyperscaleNodeEditions() != null) {
- supportedHyperscaleNodeEditions().forEach(e -> e.validate());
- }
- }
-}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java
index a793c5892b11..4bcb3d8e5ce5 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java
@@ -7,9 +7,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationDataType;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -19,12 +17,6 @@
public class ConfigurationInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationInner.class);
- /*
- * The system metadata relating to this resource.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/*
* Value of the configuration.
*/
@@ -47,7 +39,7 @@ public class ConfigurationInner extends ProxyResource {
* Data type of the configuration.
*/
@JsonProperty(value = "properties.dataType", access = JsonProperty.Access.WRITE_ONLY)
- private ConfigurationDataType dataType;
+ private String dataType;
/*
* Allowed values of the configuration.
@@ -61,15 +53,6 @@ public class ConfigurationInner extends ProxyResource {
@JsonProperty(value = "properties.source")
private String source;
- /**
- * Get the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/**
* Get the value property: Value of the configuration.
*
@@ -113,7 +96,7 @@ public String defaultValue() {
*
* @return the dataType value.
*/
- public ConfigurationDataType dataType() {
+ public String dataType() {
return this.dataType;
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationListResultInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationListResultInner.java
new file mode 100644
index 000000000000..90814fb508fe
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationListResultInner.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A list of server configurations. */
+@Fluent
+public final class ConfigurationListResultInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationListResultInner.class);
+
+ /*
+ * The list of server configurations.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /**
+ * Get the value property: The list of server configurations.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: The list of server configurations.
+ *
+ * @param value the value value to set.
+ * @return the ConfigurationListResultInner object itself.
+ */
+ public ConfigurationListResultInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java
index 1080849b5c54..79579f7815f7 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -18,12 +17,6 @@
public class DatabaseInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseInner.class);
- /*
- * The system metadata relating to this resource.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/*
* The charset of the database.
*/
@@ -36,15 +29,6 @@ public class DatabaseInner extends ProxyResource {
@JsonProperty(value = "properties.collation")
private String collation;
- /**
- * Get the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/**
* Get the charset property: The charset of the database.
*
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java
index 66b41812cf67..95ade13d1a91 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -18,12 +17,6 @@
public class FirewallRuleInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(FirewallRuleInner.class);
- /*
- * The system metadata relating to this resource.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/*
* The start IP address of the server firewall rule. Must be IPv4 format.
*/
@@ -36,15 +29,6 @@ public class FirewallRuleInner extends ProxyResource {
@JsonProperty(value = "properties.endIpAddress", required = true)
private String endIpAddress;
- /**
- * Get the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/**
* Get the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format.
*
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileInner.java
new file mode 100644
index 000000000000..68428b2068ac
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileInner.java
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Represents a log file. */
+@JsonFlatten
+@Fluent
+public class LogFileInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LogFileInner.class);
+
+ /*
+ * Size of the log file.
+ */
+ @JsonProperty(value = "properties.sizeInKB")
+ private Long sizeInKB;
+
+ /*
+ * Creation timestamp of the log file.
+ */
+ @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime createdTime;
+
+ /*
+ * Last modified timestamp of the log file.
+ */
+ @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime lastModifiedTime;
+
+ /*
+ * Type of the log file.
+ */
+ @JsonProperty(value = "properties.type")
+ private String typePropertiesType;
+
+ /*
+ * The url to download the log file from.
+ */
+ @JsonProperty(value = "properties.url")
+ private String url;
+
+ /**
+ * Get the sizeInKB property: Size of the log file.
+ *
+ * @return the sizeInKB value.
+ */
+ public Long sizeInKB() {
+ return this.sizeInKB;
+ }
+
+ /**
+ * Set the sizeInKB property: Size of the log file.
+ *
+ * @param sizeInKB the sizeInKB value to set.
+ * @return the LogFileInner object itself.
+ */
+ public LogFileInner withSizeInKB(Long sizeInKB) {
+ this.sizeInKB = sizeInKB;
+ return this;
+ }
+
+ /**
+ * Get the createdTime property: Creation timestamp of the log file.
+ *
+ * @return the createdTime value.
+ */
+ public OffsetDateTime createdTime() {
+ return this.createdTime;
+ }
+
+ /**
+ * Get the lastModifiedTime property: Last modified timestamp of the log file.
+ *
+ * @return the lastModifiedTime value.
+ */
+ public OffsetDateTime lastModifiedTime() {
+ return this.lastModifiedTime;
+ }
+
+ /**
+ * Get the typePropertiesType property: Type of the log file.
+ *
+ * @return the typePropertiesType value.
+ */
+ public String typePropertiesType() {
+ return this.typePropertiesType;
+ }
+
+ /**
+ * Set the typePropertiesType property: Type of the log file.
+ *
+ * @param typePropertiesType the typePropertiesType value to set.
+ * @return the LogFileInner object itself.
+ */
+ public LogFileInner withTypePropertiesType(String typePropertiesType) {
+ this.typePropertiesType = typePropertiesType;
+ return this;
+ }
+
+ /**
+ * Get the url property: The url to download the log file from.
+ *
+ * @return the url value.
+ */
+ public String url() {
+ return this.url;
+ }
+
+ /**
+ * Set the url property: The url to download the log file from.
+ *
+ * @param url the url value to set.
+ * @return the LogFileInner object itself.
+ */
+ public LogFileInner withUrl(String url) {
+ this.url = url;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityInner.java
index 3cd7e88f34d8..b900582206b7 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityInner.java
@@ -27,16 +27,10 @@ public final class NameAvailabilityInner {
private Boolean nameAvailable;
/*
- * name of the PostgreSQL server.
+ * Reason for name being unavailable.
*/
- @JsonProperty(value = "name")
- private String name;
-
- /*
- * type of the server
- */
- @JsonProperty(value = "type")
- private String type;
+ @JsonProperty(value = "reason")
+ private String reason;
/**
* Get the message property: Error Message.
@@ -79,42 +73,22 @@ public NameAvailabilityInner withNameAvailable(Boolean nameAvailable) {
}
/**
- * Get the name property: name of the PostgreSQL server.
- *
- * @return the name value.
- */
- public String name() {
- return this.name;
- }
-
- /**
- * Set the name property: name of the PostgreSQL server.
- *
- * @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 server.
+ * Get the reason property: Reason for name being unavailable.
*
- * @return the type value.
+ * @return the reason value.
*/
- public String type() {
- return this.type;
+ public String reason() {
+ return this.reason;
}
/**
- * Set the type property: type of the server.
+ * Set the reason property: Reason for name being unavailable.
*
- * @param type the type value to set.
+ * @param reason the reason value to set.
* @return the NameAvailabilityInner object itself.
*/
- public NameAvailabilityInner withType(String type) {
- this.type = type;
+ public NameAvailabilityInner withReason(String reason) {
+ this.reason = reason;
return this;
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationListResultInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationListResultInner.java
index 6f38a5cc24bf..fa2b2016e9e4 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationListResultInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationListResultInner.java
@@ -17,20 +17,13 @@ public final class OperationListResultInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResultInner.class);
/*
- * Collection of available operation details
+ * The list of resource provider operations.
*/
@JsonProperty(value = "value")
private List value;
- /*
- * URL client should use to fetch the next page (per server side paging).
- * It's null for now, added for future use.
- */
- @JsonProperty(value = "nextLink")
- private String nextLink;
-
/**
- * Get the value property: Collection of available operation details.
+ * Get the value property: The list of resource provider operations.
*
* @return the value value.
*/
@@ -39,7 +32,7 @@ public List value() {
}
/**
- * Set the value property: Collection of available operation details.
+ * Set the value property: The list of resource provider operations.
*
* @param value the value value to set.
* @return the OperationListResultInner object itself.
@@ -49,28 +42,6 @@ public OperationListResultInner withValue(List value) {
return this;
}
- /**
- * Get the nextLink property: URL client should use to fetch the next page (per server side paging). It's null for
- * now, added for future use.
- *
- * @return the nextLink value.
- */
- public String nextLink() {
- return this.nextLink;
- }
-
- /**
- * Set the nextLink property: URL client should use to fetch the next page (per server side paging). It's null for
- * now, added for future use.
- *
- * @param nextLink the nextLink value to set.
- * @return the OperationListResultInner object itself.
- */
- public OperationListResultInner withNextLink(String nextLink) {
- this.nextLink = nextLink;
- return this;
- }
-
/**
* Validates the instance.
*
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PerformanceTierPropertiesInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PerformanceTierPropertiesInner.java
new file mode 100644
index 000000000000..f1b578653e5d
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PerformanceTierPropertiesInner.java
@@ -0,0 +1,238 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.PerformanceTierServiceLevelObjectives;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Performance tier properties. */
+@Fluent
+public final class PerformanceTierPropertiesInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PerformanceTierPropertiesInner.class);
+
+ /*
+ * ID of the performance tier.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * Maximum Backup retention in days for the performance tier edition
+ */
+ @JsonProperty(value = "maxBackupRetentionDays")
+ private Integer maxBackupRetentionDays;
+
+ /*
+ * Minimum Backup retention in days for the performance tier edition
+ */
+ @JsonProperty(value = "minBackupRetentionDays")
+ private Integer minBackupRetentionDays;
+
+ /*
+ * Max storage allowed for a server.
+ */
+ @JsonProperty(value = "maxStorageMB")
+ private Integer maxStorageMB;
+
+ /*
+ * Max storage allowed for a server.
+ */
+ @JsonProperty(value = "minLargeStorageMB")
+ private Integer minLargeStorageMB;
+
+ /*
+ * Max storage allowed for a server.
+ */
+ @JsonProperty(value = "maxLargeStorageMB")
+ private Integer maxLargeStorageMB;
+
+ /*
+ * Max storage allowed for a server.
+ */
+ @JsonProperty(value = "minStorageMB")
+ private Integer minStorageMB;
+
+ /*
+ * Service level objectives associated with the performance tier
+ */
+ @JsonProperty(value = "serviceLevelObjectives")
+ private List serviceLevelObjectives;
+
+ /**
+ * Get the id property: ID of the performance tier.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: ID of the performance tier.
+ *
+ * @param id the id value to set.
+ * @return the PerformanceTierPropertiesInner object itself.
+ */
+ public PerformanceTierPropertiesInner withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the maxBackupRetentionDays property: Maximum Backup retention in days for the performance tier edition.
+ *
+ * @return the maxBackupRetentionDays value.
+ */
+ public Integer maxBackupRetentionDays() {
+ return this.maxBackupRetentionDays;
+ }
+
+ /**
+ * Set the maxBackupRetentionDays property: Maximum Backup retention in days for the performance tier edition.
+ *
+ * @param maxBackupRetentionDays the maxBackupRetentionDays value to set.
+ * @return the PerformanceTierPropertiesInner object itself.
+ */
+ public PerformanceTierPropertiesInner withMaxBackupRetentionDays(Integer maxBackupRetentionDays) {
+ this.maxBackupRetentionDays = maxBackupRetentionDays;
+ return this;
+ }
+
+ /**
+ * Get the minBackupRetentionDays property: Minimum Backup retention in days for the performance tier edition.
+ *
+ * @return the minBackupRetentionDays value.
+ */
+ public Integer minBackupRetentionDays() {
+ return this.minBackupRetentionDays;
+ }
+
+ /**
+ * Set the minBackupRetentionDays property: Minimum Backup retention in days for the performance tier edition.
+ *
+ * @param minBackupRetentionDays the minBackupRetentionDays value to set.
+ * @return the PerformanceTierPropertiesInner object itself.
+ */
+ public PerformanceTierPropertiesInner withMinBackupRetentionDays(Integer minBackupRetentionDays) {
+ this.minBackupRetentionDays = minBackupRetentionDays;
+ return this;
+ }
+
+ /**
+ * Get the maxStorageMB property: Max storage allowed for a server.
+ *
+ * @return the maxStorageMB value.
+ */
+ public Integer maxStorageMB() {
+ return this.maxStorageMB;
+ }
+
+ /**
+ * Set the maxStorageMB property: Max storage allowed for a server.
+ *
+ * @param maxStorageMB the maxStorageMB value to set.
+ * @return the PerformanceTierPropertiesInner object itself.
+ */
+ public PerformanceTierPropertiesInner withMaxStorageMB(Integer maxStorageMB) {
+ this.maxStorageMB = maxStorageMB;
+ return this;
+ }
+
+ /**
+ * Get the minLargeStorageMB property: Max storage allowed for a server.
+ *
+ * @return the minLargeStorageMB value.
+ */
+ public Integer minLargeStorageMB() {
+ return this.minLargeStorageMB;
+ }
+
+ /**
+ * Set the minLargeStorageMB property: Max storage allowed for a server.
+ *
+ * @param minLargeStorageMB the minLargeStorageMB value to set.
+ * @return the PerformanceTierPropertiesInner object itself.
+ */
+ public PerformanceTierPropertiesInner withMinLargeStorageMB(Integer minLargeStorageMB) {
+ this.minLargeStorageMB = minLargeStorageMB;
+ return this;
+ }
+
+ /**
+ * Get the maxLargeStorageMB property: Max storage allowed for a server.
+ *
+ * @return the maxLargeStorageMB value.
+ */
+ public Integer maxLargeStorageMB() {
+ return this.maxLargeStorageMB;
+ }
+
+ /**
+ * Set the maxLargeStorageMB property: Max storage allowed for a server.
+ *
+ * @param maxLargeStorageMB the maxLargeStorageMB value to set.
+ * @return the PerformanceTierPropertiesInner object itself.
+ */
+ public PerformanceTierPropertiesInner withMaxLargeStorageMB(Integer maxLargeStorageMB) {
+ this.maxLargeStorageMB = maxLargeStorageMB;
+ return this;
+ }
+
+ /**
+ * Get the minStorageMB property: Max storage allowed for a server.
+ *
+ * @return the minStorageMB value.
+ */
+ public Integer minStorageMB() {
+ return this.minStorageMB;
+ }
+
+ /**
+ * Set the minStorageMB property: Max storage allowed for a server.
+ *
+ * @param minStorageMB the minStorageMB value to set.
+ * @return the PerformanceTierPropertiesInner object itself.
+ */
+ public PerformanceTierPropertiesInner withMinStorageMB(Integer minStorageMB) {
+ this.minStorageMB = minStorageMB;
+ return this;
+ }
+
+ /**
+ * Get the serviceLevelObjectives property: Service level objectives associated with the performance tier.
+ *
+ * @return the serviceLevelObjectives value.
+ */
+ public List serviceLevelObjectives() {
+ return this.serviceLevelObjectives;
+ }
+
+ /**
+ * Set the serviceLevelObjectives property: Service level objectives associated with the performance tier.
+ *
+ * @param serviceLevelObjectives the serviceLevelObjectives value to set.
+ * @return the PerformanceTierPropertiesInner object itself.
+ */
+ public PerformanceTierPropertiesInner withServiceLevelObjectives(
+ List serviceLevelObjectives) {
+ this.serviceLevelObjectives = serviceLevelObjectives;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (serviceLevelObjectives() != null) {
+ serviceLevelObjectives().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionInner.java
new file mode 100644
index 000000000000..3f50a46adf47
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionInner.java
@@ -0,0 +1,103 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointProperty;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionStateProperty;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A private endpoint connection. */
+@JsonFlatten
+@Fluent
+public class PrivateEndpointConnectionInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class);
+
+ /*
+ * Private endpoint which the connection belongs to.
+ */
+ @JsonProperty(value = "properties.privateEndpoint")
+ private PrivateEndpointProperty privateEndpoint;
+
+ /*
+ * Connection state of the private endpoint connection.
+ */
+ @JsonProperty(value = "properties.privateLinkServiceConnectionState")
+ private PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState;
+
+ /*
+ * State of the private endpoint connection.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private String provisioningState;
+
+ /**
+ * Get the privateEndpoint property: Private endpoint which the connection belongs to.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpointProperty privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint property: Private endpoint which the connection belongs to.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpointProperty privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: Connection state of the private endpoint connection.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: Connection state of the private endpoint connection.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: State of the private endpoint connection.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpoint() != null) {
+ privateEndpoint().validate();
+ }
+ if (privateLinkServiceConnectionState() != null) {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateLinkResourceInner.java
similarity index 51%
rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java
rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateLinkResourceInner.java
index 17d0e45dc47c..033a016b2fbd 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateLinkResourceInner.java
@@ -5,30 +5,30 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.DelegatedSubnetUsage;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkResourceProperties;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-/** Virtual network subnet usage data. */
+/** A private link resource. */
@Immutable
-public final class VirtualNetworkSubnetUsageResultInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkSubnetUsageResultInner.class);
+public final class PrivateLinkResourceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class);
/*
- * The delegatedSubnetsUsage property.
+ * The private link resource group id.
*/
- @JsonProperty(value = "delegatedSubnetsUsage", access = JsonProperty.Access.WRITE_ONLY)
- private List delegatedSubnetsUsage;
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private PrivateLinkResourceProperties properties;
/**
- * Get the delegatedSubnetsUsage property: The delegatedSubnetsUsage property.
+ * Get the properties property: The private link resource group id.
*
- * @return the delegatedSubnetsUsage value.
+ * @return the properties value.
*/
- public List delegatedSubnetsUsage() {
- return this.delegatedSubnetsUsage;
+ public PrivateLinkResourceProperties properties() {
+ return this.properties;
}
/**
@@ -37,8 +37,8 @@ public List delegatedSubnetsUsage() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (delegatedSubnetsUsage() != null) {
- delegatedSubnetsUsage().forEach(e -> e.validate());
+ if (properties() != null) {
+ properties().validate();
}
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/RecoverableServerResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/RecoverableServerResourceInner.java
new file mode 100644
index 000000000000..9ecf97bd92a3
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/RecoverableServerResourceInner.java
@@ -0,0 +1,117 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A recoverable server resource. */
+@JsonFlatten
+@Immutable
+public class RecoverableServerResourceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RecoverableServerResourceInner.class);
+
+ /*
+ * The last available backup date time.
+ */
+ @JsonProperty(value = "properties.lastAvailableBackupDateTime", access = JsonProperty.Access.WRITE_ONLY)
+ private String lastAvailableBackupDateTime;
+
+ /*
+ * The service level objective
+ */
+ @JsonProperty(value = "properties.serviceLevelObjective", access = JsonProperty.Access.WRITE_ONLY)
+ private String serviceLevelObjective;
+
+ /*
+ * Edition of the performance tier.
+ */
+ @JsonProperty(value = "properties.edition", access = JsonProperty.Access.WRITE_ONLY)
+ private String edition;
+
+ /*
+ * vCore associated with the service level objective
+ */
+ @JsonProperty(value = "properties.vCore", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer vCore;
+
+ /*
+ * Hardware generation associated with the service level objective
+ */
+ @JsonProperty(value = "properties.hardwareGeneration", access = JsonProperty.Access.WRITE_ONLY)
+ private String hardwareGeneration;
+
+ /*
+ * The PostgreSQL version
+ */
+ @JsonProperty(value = "properties.version", access = JsonProperty.Access.WRITE_ONLY)
+ private String version;
+
+ /**
+ * Get the lastAvailableBackupDateTime property: The last available backup date time.
+ *
+ * @return the lastAvailableBackupDateTime value.
+ */
+ public String lastAvailableBackupDateTime() {
+ return this.lastAvailableBackupDateTime;
+ }
+
+ /**
+ * Get the serviceLevelObjective property: The service level objective.
+ *
+ * @return the serviceLevelObjective value.
+ */
+ public String serviceLevelObjective() {
+ return this.serviceLevelObjective;
+ }
+
+ /**
+ * Get the edition property: Edition of the performance tier.
+ *
+ * @return the edition value.
+ */
+ public String edition() {
+ return this.edition;
+ }
+
+ /**
+ * Get the vCore property: vCore associated with the service level objective.
+ *
+ * @return the vCore value.
+ */
+ public Integer vCore() {
+ return this.vCore;
+ }
+
+ /**
+ * Get the hardwareGeneration property: Hardware generation associated with the service level objective.
+ *
+ * @return the hardwareGeneration value.
+ */
+ public String hardwareGeneration() {
+ return this.hardwareGeneration;
+ }
+
+ /**
+ * Get the version property: The PostgreSQL version.
+ *
+ * @return the version value.
+ */
+ public String version() {
+ return this.version;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerAdministratorResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerAdministratorResourceInner.java
new file mode 100644
index 000000000000..2ffbd94a8549
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerAdministratorResourceInner.java
@@ -0,0 +1,133 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorType;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.UUID;
+
+/** Represents a and external administrator to be created. */
+@JsonFlatten
+@Fluent
+public class ServerAdministratorResourceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerAdministratorResourceInner.class);
+
+ /*
+ * The type of administrator.
+ */
+ @JsonProperty(value = "properties.administratorType")
+ private AdministratorType administratorType;
+
+ /*
+ * The server administrator login account name.
+ */
+ @JsonProperty(value = "properties.login")
+ private String login;
+
+ /*
+ * The server administrator Sid (Secure ID).
+ */
+ @JsonProperty(value = "properties.sid")
+ private UUID sid;
+
+ /*
+ * The server Active Directory Administrator tenant id.
+ */
+ @JsonProperty(value = "properties.tenantId")
+ private UUID tenantId;
+
+ /**
+ * Get the administratorType property: The type of administrator.
+ *
+ * @return the administratorType value.
+ */
+ public AdministratorType administratorType() {
+ return this.administratorType;
+ }
+
+ /**
+ * Set the administratorType property: The type of administrator.
+ *
+ * @param administratorType the administratorType value to set.
+ * @return the ServerAdministratorResourceInner object itself.
+ */
+ public ServerAdministratorResourceInner withAdministratorType(AdministratorType administratorType) {
+ this.administratorType = administratorType;
+ return this;
+ }
+
+ /**
+ * Get the login property: The server administrator login account name.
+ *
+ * @return the login value.
+ */
+ public String login() {
+ return this.login;
+ }
+
+ /**
+ * Set the login property: The server administrator login account name.
+ *
+ * @param login the login value to set.
+ * @return the ServerAdministratorResourceInner object itself.
+ */
+ public ServerAdministratorResourceInner withLogin(String login) {
+ this.login = login;
+ return this;
+ }
+
+ /**
+ * Get the sid property: The server administrator Sid (Secure ID).
+ *
+ * @return the sid value.
+ */
+ public UUID sid() {
+ return this.sid;
+ }
+
+ /**
+ * Set the sid property: The server administrator Sid (Secure ID).
+ *
+ * @param sid the sid value to set.
+ * @return the ServerAdministratorResourceInner object itself.
+ */
+ public ServerAdministratorResourceInner withSid(UUID sid) {
+ this.sid = sid;
+ return this;
+ }
+
+ /**
+ * Get the tenantId property: The server Active Directory Administrator tenant id.
+ *
+ * @return the tenantId value.
+ */
+ public UUID tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Set the tenantId property: The server Active Directory Administrator tenant id.
+ *
+ * @param tenantId the tenantId value to set.
+ * @return the ServerAdministratorResourceInner object itself.
+ */
+ public ServerAdministratorResourceInner withTenantId(UUID tenantId) {
+ this.tenantId = tenantId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java
index b5b2373b59c6..92936947cd7b 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java
@@ -7,21 +7,21 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
-import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateMode;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.Identity;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.Network;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.InfrastructureEncryption;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.MinimalTlsVersionEnum;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.PublicNetworkAccessEnum;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.ResourceIdentity;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerPrivateEndpointConnection;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerState;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.SslEnforcementEnum;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageProfile;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
+import java.util.List;
import java.util.Map;
/** Represents a server. */
@@ -34,7 +34,7 @@ public class ServerInner extends Resource {
* The Azure Active Directory identity of the server.
*/
@JsonProperty(value = "identity")
- private Identity identity;
+ private ResourceIdentity identity;
/*
* The SKU (pricing tier) of the server.
@@ -42,12 +42,6 @@ public class ServerInner extends Resource {
@JsonProperty(value = "sku")
private Sku sku;
- /*
- * The system metadata relating to this resource.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
/*
* The administrator's login name of a server. Can only be specified when
* the server is being created (and is required for creation).
@@ -56,103 +50,97 @@ public class ServerInner extends Resource {
private String administratorLogin;
/*
- * The administrator login password (required for server creation).
- */
- @JsonProperty(value = "properties.administratorLoginPassword")
- private String administratorLoginPassword;
-
- /*
- * PostgreSQL Server version.
+ * Server version.
*/
@JsonProperty(value = "properties.version")
private ServerVersion version;
/*
- * The minor version of the server.
+ * Enable ssl enforcement or not when connect to server.
*/
- @JsonProperty(value = "properties.minorVersion", access = JsonProperty.Access.WRITE_ONLY)
- private String minorVersion;
+ @JsonProperty(value = "properties.sslEnforcement")
+ private SslEnforcementEnum sslEnforcement;
/*
- * A state of a server that is visible to user.
+ * Enforce a minimal Tls version for the server.
*/
- @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY)
- private ServerState state;
+ @JsonProperty(value = "properties.minimalTlsVersion")
+ private MinimalTlsVersionEnum minimalTlsVersion;
/*
- * The fully qualified domain name of a server.
+ * Status showing whether the server data encryption is enabled with
+ * customer-managed keys.
*/
- @JsonProperty(value = "properties.fullyQualifiedDomainName", access = JsonProperty.Access.WRITE_ONLY)
- private String fullyQualifiedDomainName;
+ @JsonProperty(value = "properties.byokEnforcement", access = JsonProperty.Access.WRITE_ONLY)
+ private String byokEnforcement;
/*
- * Storage properties of a server.
+ * Status showing whether the server enabled infrastructure encryption.
*/
- @JsonProperty(value = "properties.storage")
- private Storage storage;
+ @JsonProperty(value = "properties.infrastructureEncryption")
+ private InfrastructureEncryption infrastructureEncryption;
/*
- * Backup properties of a server.
+ * A state of a server that is visible to user.
*/
- @JsonProperty(value = "properties.backup")
- private Backup backup;
+ @JsonProperty(value = "properties.userVisibleState")
+ private ServerState userVisibleState;
/*
- * Network properties of a server.
+ * The fully qualified domain name of a server.
*/
- @JsonProperty(value = "properties.network")
- private Network network;
+ @JsonProperty(value = "properties.fullyQualifiedDomainName")
+ private String fullyQualifiedDomainName;
/*
- * High availability properties of a server.
+ * Earliest restore point creation time (ISO8601 format)
*/
- @JsonProperty(value = "properties.highAvailability")
- private HighAvailability highAvailability;
+ @JsonProperty(value = "properties.earliestRestoreDate")
+ private OffsetDateTime earliestRestoreDate;
/*
- * Maintenance window properties of a server.
+ * Storage profile of a server.
*/
- @JsonProperty(value = "properties.maintenanceWindow")
- private MaintenanceWindow maintenanceWindow;
+ @JsonProperty(value = "properties.storageProfile")
+ private StorageProfile storageProfile;
/*
- * The source server resource ID to restore from. It's required when
- * 'createMode' is 'PointInTimeRestore'.
+ * The replication role of the server.
*/
- @JsonProperty(value = "properties.sourceServerResourceId")
- private String sourceServerResourceId;
+ @JsonProperty(value = "properties.replicationRole")
+ private String replicationRole;
/*
- * Restore point creation time (ISO8601 format), specifying the time to
- * restore from. It's required when 'createMode' is 'PointInTimeRestore'.
+ * The master server id of a replica server.
*/
- @JsonProperty(value = "properties.pointInTimeUTC")
- private OffsetDateTime pointInTimeUtc;
+ @JsonProperty(value = "properties.masterServerId")
+ private String masterServerId;
/*
- * availability zone information of the server.
+ * The maximum number of replicas that a master server can have.
*/
- @JsonProperty(value = "properties.availabilityZone")
- private String availabilityZone;
+ @JsonProperty(value = "properties.replicaCapacity")
+ private Integer replicaCapacity;
/*
- * The mode to create a new PostgreSQL server.
+ * Whether or not public network access is allowed for this server. Value
+ * is optional but if passed in, must be 'Enabled' or 'Disabled'
*/
- @JsonProperty(value = "properties.createMode")
- private CreateMode createMode;
+ @JsonProperty(value = "properties.publicNetworkAccess")
+ private PublicNetworkAccessEnum publicNetworkAccess;
/*
- * Application-specific metadata in the form of key-value pairs.
+ * List of private endpoint connections on a server
*/
- @JsonProperty(value = "properties.tags")
- private Map tagsPropertiesTags;
+ @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
+ private List privateEndpointConnections;
/**
* Get the identity property: The Azure Active Directory identity of the server.
*
* @return the identity value.
*/
- public Identity identity() {
+ public ResourceIdentity identity() {
return this.identity;
}
@@ -162,7 +150,7 @@ public Identity identity() {
* @param identity the identity value to set.
* @return the ServerInner object itself.
*/
- public ServerInner withIdentity(Identity identity) {
+ public ServerInner withIdentity(ResourceIdentity identity) {
this.identity = identity;
return this;
}
@@ -187,15 +175,6 @@ public ServerInner withSku(Sku sku) {
return this;
}
- /**
- * Get the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/**
* Get the administratorLogin property: The administrator's login name of a server. Can only be specified when the
* server is being created (and is required for creation).
@@ -219,274 +198,264 @@ public ServerInner withAdministratorLogin(String administratorLogin) {
}
/**
- * Get the administratorLoginPassword property: The administrator login password (required for server creation).
+ * Get the version property: Server version.
*
- * @return the administratorLoginPassword value.
+ * @return the version value.
*/
- public String administratorLoginPassword() {
- return this.administratorLoginPassword;
+ public ServerVersion version() {
+ return this.version;
}
/**
- * Set the administratorLoginPassword property: The administrator login password (required for server creation).
+ * Set the version property: Server version.
*
- * @param administratorLoginPassword the administratorLoginPassword value to set.
+ * @param version the version value to set.
* @return the ServerInner object itself.
*/
- public ServerInner withAdministratorLoginPassword(String administratorLoginPassword) {
- this.administratorLoginPassword = administratorLoginPassword;
+ public ServerInner withVersion(ServerVersion version) {
+ this.version = version;
return this;
}
/**
- * Get the version property: PostgreSQL Server version.
+ * Get the sslEnforcement property: Enable ssl enforcement or not when connect to server.
*
- * @return the version value.
+ * @return the sslEnforcement value.
*/
- public ServerVersion version() {
- return this.version;
+ public SslEnforcementEnum sslEnforcement() {
+ return this.sslEnforcement;
}
/**
- * Set the version property: PostgreSQL Server version.
+ * Set the sslEnforcement property: Enable ssl enforcement or not when connect to server.
*
- * @param version the version value to set.
+ * @param sslEnforcement the sslEnforcement value to set.
* @return the ServerInner object itself.
*/
- public ServerInner withVersion(ServerVersion version) {
- this.version = version;
+ public ServerInner withSslEnforcement(SslEnforcementEnum sslEnforcement) {
+ this.sslEnforcement = sslEnforcement;
return this;
}
/**
- * Get the minorVersion property: The minor version of the server.
+ * Get the minimalTlsVersion property: Enforce a minimal Tls version for the server.
*
- * @return the minorVersion value.
+ * @return the minimalTlsVersion value.
*/
- public String minorVersion() {
- return this.minorVersion;
+ public MinimalTlsVersionEnum minimalTlsVersion() {
+ return this.minimalTlsVersion;
}
/**
- * Get the state property: A state of a server that is visible to user.
+ * Set the minimalTlsVersion property: Enforce a minimal Tls version for the server.
*
- * @return the state value.
+ * @param minimalTlsVersion the minimalTlsVersion value to set.
+ * @return the ServerInner object itself.
*/
- public ServerState state() {
- return this.state;
+ public ServerInner withMinimalTlsVersion(MinimalTlsVersionEnum minimalTlsVersion) {
+ this.minimalTlsVersion = minimalTlsVersion;
+ return this;
}
/**
- * Get the fullyQualifiedDomainName property: The fully qualified domain name of a server.
+ * Get the byokEnforcement property: Status showing whether the server data encryption is enabled with
+ * customer-managed keys.
*
- * @return the fullyQualifiedDomainName value.
+ * @return the byokEnforcement value.
*/
- public String fullyQualifiedDomainName() {
- return this.fullyQualifiedDomainName;
+ public String byokEnforcement() {
+ return this.byokEnforcement;
}
/**
- * Get the storage property: Storage properties of a server.
+ * Get the infrastructureEncryption property: Status showing whether the server enabled infrastructure encryption.
*
- * @return the storage value.
+ * @return the infrastructureEncryption value.
*/
- public Storage storage() {
- return this.storage;
+ public InfrastructureEncryption infrastructureEncryption() {
+ return this.infrastructureEncryption;
}
/**
- * Set the storage property: Storage properties of a server.
+ * Set the infrastructureEncryption property: Status showing whether the server enabled infrastructure encryption.
*
- * @param storage the storage value to set.
+ * @param infrastructureEncryption the infrastructureEncryption value to set.
* @return the ServerInner object itself.
*/
- public ServerInner withStorage(Storage storage) {
- this.storage = storage;
+ public ServerInner withInfrastructureEncryption(InfrastructureEncryption infrastructureEncryption) {
+ this.infrastructureEncryption = infrastructureEncryption;
return this;
}
/**
- * Get the backup property: Backup properties of a server.
+ * Get the userVisibleState property: A state of a server that is visible to user.
*
- * @return the backup value.
+ * @return the userVisibleState value.
*/
- public Backup backup() {
- return this.backup;
+ public ServerState userVisibleState() {
+ return this.userVisibleState;
}
/**
- * Set the backup property: Backup properties of a server.
+ * Set the userVisibleState property: A state of a server that is visible to user.
*
- * @param backup the backup value to set.
+ * @param userVisibleState the userVisibleState value to set.
* @return the ServerInner object itself.
*/
- public ServerInner withBackup(Backup backup) {
- this.backup = backup;
+ public ServerInner withUserVisibleState(ServerState userVisibleState) {
+ this.userVisibleState = userVisibleState;
return this;
}
/**
- * Get the network property: Network properties of a server.
+ * Get the fullyQualifiedDomainName property: The fully qualified domain name of a server.
*
- * @return the network value.
+ * @return the fullyQualifiedDomainName value.
*/
- public Network network() {
- return this.network;
+ public String fullyQualifiedDomainName() {
+ return this.fullyQualifiedDomainName;
}
/**
- * Set the network property: Network properties of a server.
+ * Set the fullyQualifiedDomainName property: The fully qualified domain name of a server.
*
- * @param network the network value to set.
+ * @param fullyQualifiedDomainName the fullyQualifiedDomainName value to set.
* @return the ServerInner object itself.
*/
- public ServerInner withNetwork(Network network) {
- this.network = network;
+ public ServerInner withFullyQualifiedDomainName(String fullyQualifiedDomainName) {
+ this.fullyQualifiedDomainName = fullyQualifiedDomainName;
return this;
}
/**
- * Get the highAvailability property: High availability properties of a server.
+ * Get the earliestRestoreDate property: Earliest restore point creation time (ISO8601 format).
*
- * @return the highAvailability value.
+ * @return the earliestRestoreDate value.
*/
- public HighAvailability highAvailability() {
- return this.highAvailability;
+ public OffsetDateTime earliestRestoreDate() {
+ return this.earliestRestoreDate;
}
/**
- * Set the highAvailability property: High availability properties of a server.
+ * Set the earliestRestoreDate property: Earliest restore point creation time (ISO8601 format).
*
- * @param highAvailability the highAvailability value to set.
+ * @param earliestRestoreDate the earliestRestoreDate value to set.
* @return the ServerInner object itself.
*/
- public ServerInner withHighAvailability(HighAvailability highAvailability) {
- this.highAvailability = highAvailability;
+ public ServerInner withEarliestRestoreDate(OffsetDateTime earliestRestoreDate) {
+ this.earliestRestoreDate = earliestRestoreDate;
return this;
}
/**
- * Get the maintenanceWindow property: Maintenance window properties of a server.
+ * Get the storageProfile property: Storage profile of a server.
*
- * @return the maintenanceWindow value.
+ * @return the storageProfile value.
*/
- public MaintenanceWindow maintenanceWindow() {
- return this.maintenanceWindow;
+ public StorageProfile storageProfile() {
+ return this.storageProfile;
}
/**
- * Set the maintenanceWindow property: Maintenance window properties of a server.
+ * Set the storageProfile property: Storage profile of a server.
*
- * @param maintenanceWindow the maintenanceWindow value to set.
+ * @param storageProfile the storageProfile value to set.
* @return the ServerInner object itself.
*/
- public ServerInner withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
- this.maintenanceWindow = maintenanceWindow;
+ public ServerInner withStorageProfile(StorageProfile storageProfile) {
+ this.storageProfile = storageProfile;
return this;
}
/**
- * Get the sourceServerResourceId property: The source server resource ID to restore from. It's required when
- * 'createMode' is 'PointInTimeRestore'.
+ * Get the replicationRole property: The replication role of the server.
*
- * @return the sourceServerResourceId value.
+ * @return the replicationRole value.
*/
- public String sourceServerResourceId() {
- return this.sourceServerResourceId;
+ public String replicationRole() {
+ return this.replicationRole;
}
/**
- * Set the sourceServerResourceId property: The source server resource ID to restore from. It's required when
- * 'createMode' is 'PointInTimeRestore'.
+ * Set the replicationRole property: The replication role of the server.
*
- * @param sourceServerResourceId the sourceServerResourceId value to set.
+ * @param replicationRole the replicationRole value to set.
* @return the ServerInner object itself.
*/
- public ServerInner withSourceServerResourceId(String sourceServerResourceId) {
- this.sourceServerResourceId = sourceServerResourceId;
+ public ServerInner withReplicationRole(String replicationRole) {
+ this.replicationRole = replicationRole;
return this;
}
/**
- * Get the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time to restore
- * from. It's required when 'createMode' is 'PointInTimeRestore'.
+ * Get the masterServerId property: The master server id of a replica server.
*
- * @return the pointInTimeUtc value.
+ * @return the masterServerId value.
*/
- public OffsetDateTime pointInTimeUtc() {
- return this.pointInTimeUtc;
+ public String masterServerId() {
+ return this.masterServerId;
}
/**
- * Set the pointInTimeUtc property: Restore point creation time (ISO8601 format), specifying the time to restore
- * from. It's required when 'createMode' is 'PointInTimeRestore'.
+ * Set the masterServerId property: The master server id of a replica server.
*
- * @param pointInTimeUtc the pointInTimeUtc value to set.
+ * @param masterServerId the masterServerId value to set.
* @return the ServerInner object itself.
*/
- public ServerInner withPointInTimeUtc(OffsetDateTime pointInTimeUtc) {
- this.pointInTimeUtc = pointInTimeUtc;
+ public ServerInner withMasterServerId(String masterServerId) {
+ this.masterServerId = masterServerId;
return this;
}
/**
- * Get the availabilityZone property: availability zone information of the server.
+ * Get the replicaCapacity property: The maximum number of replicas that a master server can have.
*
- * @return the availabilityZone value.
+ * @return the replicaCapacity value.
*/
- public String availabilityZone() {
- return this.availabilityZone;
+ public Integer replicaCapacity() {
+ return this.replicaCapacity;
}
/**
- * Set the availabilityZone property: availability zone information of the server.
+ * Set the replicaCapacity property: The maximum number of replicas that a master server can have.
*
- * @param availabilityZone the availabilityZone value to set.
+ * @param replicaCapacity the replicaCapacity value to set.
* @return the ServerInner object itself.
*/
- public ServerInner withAvailabilityZone(String availabilityZone) {
- this.availabilityZone = availabilityZone;
+ public ServerInner withReplicaCapacity(Integer replicaCapacity) {
+ this.replicaCapacity = replicaCapacity;
return this;
}
/**
- * Get the createMode property: The mode to create a new PostgreSQL server.
+ * Get the publicNetworkAccess property: Whether or not public network access is allowed for this server. Value is
+ * optional but if passed in, must be 'Enabled' or 'Disabled'.
*
- * @return the createMode value.
+ * @return the publicNetworkAccess value.
*/
- public CreateMode createMode() {
- return this.createMode;
+ public PublicNetworkAccessEnum publicNetworkAccess() {
+ return this.publicNetworkAccess;
}
/**
- * Set the createMode property: The mode to create a new PostgreSQL server.
+ * Set the publicNetworkAccess property: Whether or not public network access is allowed for this server. Value is
+ * optional but if passed in, must be 'Enabled' or 'Disabled'.
*
- * @param createMode the createMode value to set.
+ * @param publicNetworkAccess the publicNetworkAccess value to set.
* @return the ServerInner object itself.
*/
- public ServerInner withCreateMode(CreateMode createMode) {
- this.createMode = createMode;
+ public ServerInner withPublicNetworkAccess(PublicNetworkAccessEnum publicNetworkAccess) {
+ this.publicNetworkAccess = publicNetworkAccess;
return this;
}
/**
- * Get the tagsPropertiesTags property: Application-specific metadata in the form of key-value pairs.
- *
- * @return the tagsPropertiesTags value.
- */
- public Map tagsPropertiesTags() {
- return this.tagsPropertiesTags;
- }
-
- /**
- * Set the tagsPropertiesTags property: Application-specific metadata in the form of key-value pairs.
+ * Get the privateEndpointConnections property: List of private endpoint connections on a server.
*
- * @param tagsPropertiesTags the tagsPropertiesTags value to set.
- * @return the ServerInner object itself.
+ * @return the privateEndpointConnections value.
*/
- public ServerInner withTagsPropertiesTags(Map tagsPropertiesTags) {
- this.tagsPropertiesTags = tagsPropertiesTags;
- return this;
+ public List privateEndpointConnections() {
+ return this.privateEndpointConnections;
}
/** {@inheritDoc} */
@@ -515,20 +484,11 @@ public void validate() {
if (sku() != null) {
sku().validate();
}
- if (storage() != null) {
- storage().validate();
- }
- if (backup() != null) {
- backup().validate();
- }
- if (network() != null) {
- network().validate();
- }
- if (highAvailability() != null) {
- highAvailability().validate();
+ if (storageProfile() != null) {
+ storageProfile().validate();
}
- if (maintenanceWindow() != null) {
- maintenanceWindow().validate();
+ if (privateEndpointConnections() != null) {
+ privateEndpointConnections().forEach(e -> e.validate());
}
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerKeyInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerKeyInner.java
new file mode 100644
index 000000000000..924f0496e857
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerKeyInner.java
@@ -0,0 +1,111 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerKeyType;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** A PostgreSQL Server key. */
+@JsonFlatten
+@Fluent
+public class ServerKeyInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerKeyInner.class);
+
+ /*
+ * Kind of encryption protector used to protect the key.
+ */
+ @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY)
+ private String kind;
+
+ /*
+ * The key type like 'AzureKeyVault'.
+ */
+ @JsonProperty(value = "properties.serverKeyType")
+ private ServerKeyType serverKeyType;
+
+ /*
+ * The URI of the key.
+ */
+ @JsonProperty(value = "properties.uri")
+ private String uri;
+
+ /*
+ * The key creation date.
+ */
+ @JsonProperty(value = "properties.creationDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime creationDate;
+
+ /**
+ * Get the kind property: Kind of encryption protector used to protect the key.
+ *
+ * @return the kind value.
+ */
+ public String kind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the serverKeyType property: The key type like 'AzureKeyVault'.
+ *
+ * @return the serverKeyType value.
+ */
+ public ServerKeyType serverKeyType() {
+ return this.serverKeyType;
+ }
+
+ /**
+ * Set the serverKeyType property: The key type like 'AzureKeyVault'.
+ *
+ * @param serverKeyType the serverKeyType value to set.
+ * @return the ServerKeyInner object itself.
+ */
+ public ServerKeyInner withServerKeyType(ServerKeyType serverKeyType) {
+ this.serverKeyType = serverKeyType;
+ return this;
+ }
+
+ /**
+ * Get the uri property: The URI of the key.
+ *
+ * @return the uri value.
+ */
+ public String uri() {
+ return this.uri;
+ }
+
+ /**
+ * Set the uri property: The URI of the key.
+ *
+ * @param uri the uri value to set.
+ * @return the ServerKeyInner object itself.
+ */
+ public ServerKeyInner withUri(String uri) {
+ this.uri = uri;
+ return this;
+ }
+
+ /**
+ * Get the creationDate property: The key creation date.
+ *
+ * @return the creationDate value.
+ */
+ public OffsetDateTime creationDate() {
+ return this.creationDate;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerSecurityAlertPolicyInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerSecurityAlertPolicyInner.java
new file mode 100644
index 000000000000..cc3958ea5da8
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerSecurityAlertPolicyInner.java
@@ -0,0 +1,221 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerSecurityAlertPolicyState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A server security alert policy. */
+@JsonFlatten
+@Fluent
+public class ServerSecurityAlertPolicyInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerSecurityAlertPolicyInner.class);
+
+ /*
+ * Specifies the state of the policy, whether it is enabled or disabled.
+ */
+ @JsonProperty(value = "properties.state")
+ private ServerSecurityAlertPolicyState state;
+
+ /*
+ * Specifies an array of alerts that are disabled. Allowed values are:
+ * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly
+ */
+ @JsonProperty(value = "properties.disabledAlerts")
+ private List disabledAlerts;
+
+ /*
+ * Specifies an array of e-mail addresses to which the alert is sent.
+ */
+ @JsonProperty(value = "properties.emailAddresses")
+ private List emailAddresses;
+
+ /*
+ * Specifies that the alert is sent to the account administrators.
+ */
+ @JsonProperty(value = "properties.emailAccountAdmins")
+ private Boolean emailAccountAdmins;
+
+ /*
+ * Specifies the blob storage endpoint (e.g.
+ * https://MyAccount.blob.core.windows.net). This blob storage will hold
+ * all Threat Detection audit logs.
+ */
+ @JsonProperty(value = "properties.storageEndpoint")
+ private String storageEndpoint;
+
+ /*
+ * Specifies the identifier key of the Threat Detection audit storage
+ * account.
+ */
+ @JsonProperty(value = "properties.storageAccountAccessKey")
+ private String storageAccountAccessKey;
+
+ /*
+ * Specifies the number of days to keep in the Threat Detection audit logs.
+ */
+ @JsonProperty(value = "properties.retentionDays")
+ private Integer retentionDays;
+
+ /**
+ * Get the state property: Specifies the state of the policy, whether it is enabled or disabled.
+ *
+ * @return the state value.
+ */
+ public ServerSecurityAlertPolicyState state() {
+ return this.state;
+ }
+
+ /**
+ * Set the state property: Specifies the state of the policy, whether it is enabled or disabled.
+ *
+ * @param state the state value to set.
+ * @return the ServerSecurityAlertPolicyInner object itself.
+ */
+ public ServerSecurityAlertPolicyInner withState(ServerSecurityAlertPolicyState state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are:
+ * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly.
+ *
+ * @return the disabledAlerts value.
+ */
+ public List disabledAlerts() {
+ return this.disabledAlerts;
+ }
+
+ /**
+ * Set the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are:
+ * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly.
+ *
+ * @param disabledAlerts the disabledAlerts value to set.
+ * @return the ServerSecurityAlertPolicyInner object itself.
+ */
+ public ServerSecurityAlertPolicyInner withDisabledAlerts(List disabledAlerts) {
+ this.disabledAlerts = disabledAlerts;
+ return this;
+ }
+
+ /**
+ * Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent.
+ *
+ * @return the emailAddresses value.
+ */
+ public List emailAddresses() {
+ return this.emailAddresses;
+ }
+
+ /**
+ * Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent.
+ *
+ * @param emailAddresses the emailAddresses value to set.
+ * @return the ServerSecurityAlertPolicyInner object itself.
+ */
+ public ServerSecurityAlertPolicyInner withEmailAddresses(List emailAddresses) {
+ this.emailAddresses = emailAddresses;
+ return this;
+ }
+
+ /**
+ * Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators.
+ *
+ * @return the emailAccountAdmins value.
+ */
+ public Boolean emailAccountAdmins() {
+ return this.emailAccountAdmins;
+ }
+
+ /**
+ * Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators.
+ *
+ * @param emailAccountAdmins the emailAccountAdmins value to set.
+ * @return the ServerSecurityAlertPolicyInner object itself.
+ */
+ public ServerSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccountAdmins) {
+ this.emailAccountAdmins = emailAccountAdmins;
+ return this;
+ }
+
+ /**
+ * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g.
+ * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
+ *
+ * @return the storageEndpoint value.
+ */
+ public String storageEndpoint() {
+ return this.storageEndpoint;
+ }
+
+ /**
+ * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g.
+ * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
+ *
+ * @param storageEndpoint the storageEndpoint value to set.
+ * @return the ServerSecurityAlertPolicyInner object itself.
+ */
+ public ServerSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoint) {
+ this.storageEndpoint = storageEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage
+ * account.
+ *
+ * @return the storageAccountAccessKey value.
+ */
+ public String storageAccountAccessKey() {
+ return this.storageAccountAccessKey;
+ }
+
+ /**
+ * Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage
+ * account.
+ *
+ * @param storageAccountAccessKey the storageAccountAccessKey value to set.
+ * @return the ServerSecurityAlertPolicyInner object itself.
+ */
+ public ServerSecurityAlertPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) {
+ this.storageAccountAccessKey = storageAccountAccessKey;
+ return this;
+ }
+
+ /**
+ * Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs.
+ *
+ * @return the retentionDays value.
+ */
+ public Integer retentionDays() {
+ return this.retentionDays;
+ }
+
+ /**
+ * Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs.
+ *
+ * @param retentionDays the retentionDays value to set.
+ * @return the ServerSecurityAlertPolicyInner object itself.
+ */
+ public ServerSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) {
+ this.retentionDays = retentionDays;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkRuleInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkRuleInner.java
new file mode 100644
index 000000000000..06a33901b019
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkRuleInner.java
@@ -0,0 +1,98 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkRuleState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A virtual network rule. */
+@JsonFlatten
+@Fluent
+public class VirtualNetworkRuleInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkRuleInner.class);
+
+ /*
+ * The ARM resource id of the virtual network subnet.
+ */
+ @JsonProperty(value = "properties.virtualNetworkSubnetId")
+ private String virtualNetworkSubnetId;
+
+ /*
+ * Create firewall rule before the virtual network has vnet service
+ * endpoint enabled.
+ */
+ @JsonProperty(value = "properties.ignoreMissingVnetServiceEndpoint")
+ private Boolean ignoreMissingVnetServiceEndpoint;
+
+ /*
+ * Virtual Network Rule State
+ */
+ @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY)
+ private VirtualNetworkRuleState state;
+
+ /**
+ * Get the virtualNetworkSubnetId property: The ARM resource id of the virtual network subnet.
+ *
+ * @return the virtualNetworkSubnetId value.
+ */
+ public String virtualNetworkSubnetId() {
+ return this.virtualNetworkSubnetId;
+ }
+
+ /**
+ * Set the virtualNetworkSubnetId property: The ARM resource id of the virtual network subnet.
+ *
+ * @param virtualNetworkSubnetId the virtualNetworkSubnetId value to set.
+ * @return the VirtualNetworkRuleInner object itself.
+ */
+ public VirtualNetworkRuleInner withVirtualNetworkSubnetId(String virtualNetworkSubnetId) {
+ this.virtualNetworkSubnetId = virtualNetworkSubnetId;
+ return this;
+ }
+
+ /**
+ * Get the ignoreMissingVnetServiceEndpoint property: Create firewall rule before the virtual network has vnet
+ * service endpoint enabled.
+ *
+ * @return the ignoreMissingVnetServiceEndpoint value.
+ */
+ public Boolean ignoreMissingVnetServiceEndpoint() {
+ return this.ignoreMissingVnetServiceEndpoint;
+ }
+
+ /**
+ * Set the ignoreMissingVnetServiceEndpoint property: Create firewall rule before the virtual network has vnet
+ * service endpoint enabled.
+ *
+ * @param ignoreMissingVnetServiceEndpoint the ignoreMissingVnetServiceEndpoint value to set.
+ * @return the VirtualNetworkRuleInner object itself.
+ */
+ public VirtualNetworkRuleInner withIgnoreMissingVnetServiceEndpoint(Boolean ignoreMissingVnetServiceEndpoint) {
+ this.ignoreMissingVnetServiceEndpoint = ignoreMissingVnetServiceEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the state property: Virtual Network Rule State.
+ *
+ * @return the state value.
+ */
+ public VirtualNetworkRuleState state() {
+ return this.state;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilityPropertiesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilityPropertiesImpl.java
deleted file mode 100644
index 8e96f0d33c83..000000000000
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilityPropertiesImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.postgresqlflexibleserver.implementation;
-
-import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityPropertiesInner;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityProperties;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerEditionCapability;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.HyperscaleNodeEditionCapability;
-import java.util.Collections;
-import java.util.List;
-
-public final class CapabilityPropertiesImpl implements CapabilityProperties {
- private CapabilityPropertiesInner innerObject;
-
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
-
- CapabilityPropertiesImpl(
- CapabilityPropertiesInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
- public String zone() {
- return this.innerModel().zone();
- }
-
- public Boolean geoBackupSupported() {
- return this.innerModel().geoBackupSupported();
- }
-
- public Boolean zoneRedundantHaSupported() {
- return this.innerModel().zoneRedundantHaSupported();
- }
-
- public Boolean zoneRedundantHaAndGeoBackupSupported() {
- return this.innerModel().zoneRedundantHaAndGeoBackupSupported();
- }
-
- public List supportedFlexibleServerEditions() {
- List inner = this.innerModel().supportedFlexibleServerEditions();
- if (inner != null) {
- return Collections.unmodifiableList(inner);
- } else {
- return Collections.emptyList();
- }
- }
-
- public List supportedHyperscaleNodeEditions() {
- List inner = this.innerModel().supportedHyperscaleNodeEditions();
- if (inner != null) {
- return Collections.unmodifiableList(inner);
- } else {
- return Collections.emptyList();
- }
- }
-
- public String status() {
- return this.innerModel().status();
- }
-
- public CapabilityPropertiesInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java
index a0d2dc43fd2c..5b6cd5f57d15 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java
@@ -58,7 +58,7 @@ public final class CheckNameAvailabilitiesClientImpl implements CheckNameAvailab
@ServiceInterface(name = "PostgreSqlManagement")
private interface CheckNameAvailabilitiesService {
@Headers({"Content-Type: application/json"})
- @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBForPostgreSql/checkNameAvailability")
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> execute(
@@ -101,6 +101,7 @@ private Mono> executeWithResponseAsync(
} else {
nameAvailabilityRequest.validate();
}
+ final String apiVersion = "2017-12-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -108,7 +109,7 @@ private Mono> executeWithResponseAsync(
service
.execute(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
nameAvailabilityRequest,
accept,
@@ -148,12 +149,13 @@ private Mono> executeWithResponseAsync(
} else {
nameAvailabilityRequest.validate();
}
+ final String apiVersion = "2017-12-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.execute(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
nameAvailabilityRequest,
accept,
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java
index 8ce9221d4cee..268a7c2884d3 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java
@@ -4,11 +4,9 @@
package com.azure.resourcemanager.postgresqlflexibleserver.implementation;
-import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationInner;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Configuration;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationDataType;
public final class ConfigurationImpl implements Configuration, Configuration.Definition, Configuration.Update {
private ConfigurationInner innerObject;
@@ -27,10 +25,6 @@ public String type() {
return this.innerModel().type();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public String value() {
return this.innerModel().value();
}
@@ -43,7 +37,7 @@ public String defaultValue() {
return this.innerModel().defaultValue();
}
- public ConfigurationDataType dataType() {
+ public String dataType() {
return this.innerModel().dataType();
}
@@ -69,7 +63,7 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man
private String configurationName;
- public ConfigurationImpl withExistingFlexibleServer(String resourceGroupName, String serverName) {
+ public ConfigurationImpl withExistingServer(String resourceGroupName, String serverName) {
this.resourceGroupName = resourceGroupName;
this.serverName = serverName;
return this;
@@ -80,7 +74,7 @@ public Configuration create() {
serviceManager
.serviceClient()
.getConfigurations()
- .put(resourceGroupName, serverName, configurationName, this.innerModel(), Context.NONE);
+ .createOrUpdate(resourceGroupName, serverName, configurationName, this.innerModel(), Context.NONE);
return this;
}
@@ -89,7 +83,7 @@ public Configuration create(Context context) {
serviceManager
.serviceClient()
.getConfigurations()
- .put(resourceGroupName, serverName, configurationName, this.innerModel(), context);
+ .createOrUpdate(resourceGroupName, serverName, configurationName, this.innerModel(), context);
return this;
}
@@ -109,7 +103,7 @@ public Configuration apply() {
serviceManager
.serviceClient()
.getConfigurations()
- .update(resourceGroupName, serverName, configurationName, this.innerModel(), Context.NONE);
+ .createOrUpdate(resourceGroupName, serverName, configurationName, this.innerModel(), Context.NONE);
return this;
}
@@ -118,7 +112,7 @@ public Configuration apply(Context context) {
serviceManager
.serviceClient()
.getConfigurations()
- .update(resourceGroupName, serverName, configurationName, this.innerModel(), context);
+ .createOrUpdate(resourceGroupName, serverName, configurationName, this.innerModel(), context);
return this;
}
@@ -128,7 +122,7 @@ public Configuration apply(Context context) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.serverName = Utils.getValueFromIdByName(innerObject.id(), "flexibleServers");
+ this.serverName = Utils.getValueFromIdByName(innerObject.id(), "servers");
this.configurationName = Utils.getValueFromIdByName(innerObject.id(), "configurations");
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageResultImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationListResultImpl.java
similarity index 55%
rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageResultImpl.java
rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationListResultImpl.java
index e1dd51913272..732b8eb6a1b1 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageResultImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationListResultImpl.java
@@ -4,34 +4,41 @@
package com.azure.resourcemanager.postgresqlflexibleserver.implementation;
-import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.DelegatedSubnetUsage;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageResult;
+import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationInner;
+import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationListResultInner;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.Configuration;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationListResult;
import java.util.Collections;
import java.util.List;
+import java.util.stream.Collectors;
-public final class VirtualNetworkSubnetUsageResultImpl implements VirtualNetworkSubnetUsageResult {
- private VirtualNetworkSubnetUsageResultInner innerObject;
+public final class ConfigurationListResultImpl implements ConfigurationListResult {
+ private ConfigurationListResultInner innerObject;
private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
- VirtualNetworkSubnetUsageResultImpl(
- VirtualNetworkSubnetUsageResultInner innerObject,
+ ConfigurationListResultImpl(
+ ConfigurationListResultInner innerObject,
com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
- public List delegatedSubnetsUsage() {
- List inner = this.innerModel().delegatedSubnetsUsage();
+ public List value() {
+ List inner = this.innerModel().value();
if (inner != null) {
- return Collections.unmodifiableList(inner);
+ return Collections
+ .unmodifiableList(
+ inner
+ .stream()
+ .map(inner1 -> new ConfigurationImpl(inner1, this.manager()))
+ .collect(Collectors.toList()));
} else {
return Collections.emptyList();
}
}
- public VirtualNetworkSubnetUsageResultInner innerModel() {
+ public ConfigurationListResultInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java
index 44f68aff773e..5b91d4a7b89d 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java
@@ -11,7 +11,6 @@
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.Put;
import com.azure.core.annotation.QueryParam;
@@ -34,7 +33,7 @@
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationInner;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationListResult;
+import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationListResultInner;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -68,24 +67,26 @@ public final class ConfigurationsClientImpl implements ConfigurationsClient {
@ServiceInterface(name = "PostgreSqlManagement")
private interface ConfigurationsService {
@Headers({"Content-Type: application/json"})
- @Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql"
- + "/flexibleServers/{serverName}/configurations")
- @ExpectedResponses({200})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/servers/{serverName}/configurations/{configurationName}")
+ @ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByServer(
+ Mono>> createOrUpdate(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("serverName") String serverName,
+ @PathParam("configurationName") String configurationName,
+ @BodyParam("application/json") ConfigurationInner parameters,
@HeaderParam("Accept") String accept,
Context context);
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql"
- + "/flexibleServers/{serverName}/configurations/{configurationName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/servers/{serverName}/configurations/{configurationName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> get(
@@ -99,63 +100,36 @@ Mono> get(
Context context);
@Headers({"Content-Type: application/json"})
- @Patch(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql"
- + "/flexibleServers/{serverName}/configurations/{configurationName}")
- @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("serverName") String serverName,
- @PathParam("configurationName") String configurationName,
- @BodyParam("application/json") ConfigurationInner parameters,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql"
- + "/flexibleServers/{serverName}/configurations/{configurationName}")
- @ExpectedResponses({200, 202})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/servers/{serverName}/configurations")
+ @ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> put(
+ Mono> listByServer(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("serverName") String serverName,
- @PathParam("configurationName") String configurationName,
- @BodyParam("application/json") ConfigurationInner parameters,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Get("{nextLink}")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByServerNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
@HeaderParam("Accept") String accept,
Context context);
}
/**
- * List all the configurations in a given server.
+ * Updates a configuration of a server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of server configurations.
+ * @return represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByServerSinglePageAsync(
- String resourceGroupName, String serverName) {
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -175,45 +149,54 @@ private Mono> listByServerSinglePageAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
+ if (configurationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2017-12-01";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
- .listByServer(
+ .createOrUpdate(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
+ configurationName,
+ parameters,
accept,
context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * List all the configurations in a given server.
+ * Updates a configuration of a server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of server configurations.
+ * @return represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByServerSinglePageAsync(
- String resourceGroupName, String serverName, Context context) {
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -233,94 +216,209 @@ private Mono> listByServerSinglePageAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
+ if (configurationName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2017-12-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .listByServer(
+ .createOrUpdate(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
+ configurationName,
+ parameters,
accept,
- context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
+ context);
}
/**
- * List all the configurations in a given server.
+ * Updates a configuration of a server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of server configurations.
+ * @return represents a Configuration.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByServerAsync(String resourceGroupName, String serverName) {
- return new PagedFlux<>(
- () -> listByServerSinglePageAsync(resourceGroupName, serverName),
- nextLink -> listByServerNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, ConfigurationInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, serverName, configurationName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ConfigurationInner.class, ConfigurationInner.class, Context.NONE);
}
/**
- * List all the configurations in a given server.
+ * Updates a configuration of a server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of server configurations.
+ * @return represents a Configuration.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByServerAsync(
- String resourceGroupName, String serverName, Context context) {
- return new PagedFlux<>(
- () -> listByServerSinglePageAsync(resourceGroupName, serverName, context),
- nextLink -> listByServerNextSinglePageAsync(nextLink, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, ConfigurationInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, serverName, configurationName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ConfigurationInner.class, ConfigurationInner.class, context);
}
/**
- * List all the configurations in a given server.
+ * Updates a configuration of a server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of server configurations.
+ * @return represents a Configuration.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByServer(String resourceGroupName, String serverName) {
- return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, ConfigurationInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters).getSyncPoller();
}
/**
- * List all the configurations in a given server.
+ * Updates a configuration of a server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of server configurations.
+ * @return represents a Configuration.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByServer(
- String resourceGroupName, String serverName, Context context) {
- return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, ConfigurationInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ConfigurationInner createOrUpdate(
+ String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters).block();
+ }
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ConfigurationInner createOrUpdate(
+ String resourceGroupName,
+ String serverName,
+ String configurationName,
+ ConfigurationInner parameters,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters, context).block();
}
/**
@@ -360,6 +458,7 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
}
+ final String apiVersion = "2017-12-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -367,7 +466,7 @@ private Mono> getWithResponseAsync(
service
.get(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -415,12 +514,13 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
}
+ final String apiVersion = "2017-12-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.get(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -488,20 +588,18 @@ public Response getWithResponse(
}
/**
- * Updates a configuration of a server.
+ * List all the configurations in a given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
+ * @return a list of server configurations.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(
- String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
+ private Mono> listByServerSinglePageAsync(
+ String resourceGroupName, String serverName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -521,356 +619,41 @@ private Mono>> updateWithResponseAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- if (configurationName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
+ final String apiVersion = "2017-12-01";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
- .update(
+ .listByServer(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
- configurationName,
- parameters,
accept,
context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Updates a configuration of a server.
+ * List all the configurations in a given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(
- String resourceGroupName,
- String serverName,
- String configurationName,
- ConfigurationInner parameters,
- Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (serverName == null) {
- return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
- }
- if (configurationName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .update(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- serverName,
- configurationName,
- parameters,
- accept,
- context);
- }
-
- /**
- * Updates a configuration of a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PollerFlux, ConfigurationInner> beginUpdateAsync(
- String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
- Mono>> mono =
- updateWithResponseAsync(resourceGroupName, serverName, configurationName, parameters);
- return this
- .client
- .getLroResult(
- mono, this.client.getHttpPipeline(), ConfigurationInner.class, ConfigurationInner.class, Context.NONE);
- }
-
- /**
- * Updates a configuration of a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PollerFlux, ConfigurationInner> beginUpdateAsync(
- String resourceGroupName,
- String serverName,
- String configurationName,
- ConfigurationInner parameters,
- Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono =
- updateWithResponseAsync(resourceGroupName, serverName, configurationName, parameters, context);
- return this
- .client
- .getLroResult(
- mono, this.client.getHttpPipeline(), ConfigurationInner.class, ConfigurationInner.class, context);
- }
-
- /**
- * Updates a configuration of a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public SyncPoller, ConfigurationInner> beginUpdate(
- String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
- return beginUpdateAsync(resourceGroupName, serverName, configurationName, parameters).getSyncPoller();
- }
-
- /**
- * Updates a configuration of a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public SyncPoller, ConfigurationInner> beginUpdate(
- String resourceGroupName,
- String serverName,
- String configurationName,
- ConfigurationInner parameters,
- Context context) {
- return beginUpdateAsync(resourceGroupName, serverName, configurationName, parameters, context).getSyncPoller();
- }
-
- /**
- * Updates a configuration of a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(
- String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
- return beginUpdateAsync(resourceGroupName, serverName, configurationName, parameters)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Updates a configuration of a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(
- String resourceGroupName,
- String serverName,
- String configurationName,
- ConfigurationInner parameters,
- Context context) {
- return beginUpdateAsync(resourceGroupName, serverName, configurationName, parameters, context)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Updates a configuration of a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ConfigurationInner update(
- String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
- return updateAsync(resourceGroupName, serverName, configurationName, parameters).block();
- }
-
- /**
- * Updates a configuration of a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ConfigurationInner update(
- String resourceGroupName,
- String serverName,
- String configurationName,
- ConfigurationInner parameters,
- Context context) {
- return updateAsync(resourceGroupName, serverName, configurationName, parameters, context).block();
- }
-
- /**
- * Updates a configuration of a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> putWithResponseAsync(
- String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (serverName == null) {
- return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
- }
- if (configurationName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .put(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- serverName,
- configurationName,
- parameters,
- accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Updates a configuration of a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
+ * @return a list of server configurations.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> putWithResponseAsync(
- String resourceGroupName,
- String serverName,
- String configurationName,
- ConfigurationInner parameters,
- Context context) {
+ private Mono> listByServerSinglePageAsync(
+ String resourceGroupName, String serverName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -890,277 +673,85 @@ private Mono>> putWithResponseAsync(
if (serverName == null) {
return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
}
- if (configurationName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
+ final String apiVersion = "2017-12-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .put(
+ .listByServer(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
- configurationName,
- parameters,
accept,
- context);
- }
-
- /**
- * Updates a configuration of a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PollerFlux, ConfigurationInner> beginPutAsync(
- String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
- Mono>> mono =
- putWithResponseAsync(resourceGroupName, serverName, configurationName, parameters);
- return this
- .client
- .getLroResult(
- mono, this.client.getHttpPipeline(), ConfigurationInner.class, ConfigurationInner.class, Context.NONE);
- }
-
- /**
- * Updates a configuration of a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private PollerFlux, ConfigurationInner> beginPutAsync(
- String resourceGroupName,
- String serverName,
- String configurationName,
- ConfigurationInner parameters,
- Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono =
- putWithResponseAsync(resourceGroupName, serverName, configurationName, parameters, context);
- return this
- .client
- .getLroResult(
- mono, this.client.getHttpPipeline(), ConfigurationInner.class, ConfigurationInner.class, context);
- }
-
- /**
- * Updates a configuration of a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public SyncPoller, ConfigurationInner> beginPut(
- String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
- return beginPutAsync(resourceGroupName, serverName, configurationName, parameters).getSyncPoller();
- }
-
- /**
- * Updates a configuration of a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public SyncPoller, ConfigurationInner> beginPut(
- String resourceGroupName,
- String serverName,
- String configurationName,
- ConfigurationInner parameters,
- Context context) {
- return beginPutAsync(resourceGroupName, serverName, configurationName, parameters, context).getSyncPoller();
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null));
}
/**
- * Updates a configuration of a server.
+ * List all the configurations in a given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
+ * @return a list of server configurations.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono putAsync(
- String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
- return beginPutAsync(resourceGroupName, serverName, configurationName, parameters)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByServerAsync(String resourceGroupName, String serverName) {
+ return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName));
}
/**
- * Updates a configuration of a server.
+ * List all the configurations in a given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
+ * @return a list of server configurations.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono putAsync(
- String resourceGroupName,
- String serverName,
- String configurationName,
- ConfigurationInner parameters,
- Context context) {
- return beginPutAsync(resourceGroupName, serverName, configurationName, parameters, context)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByServerAsync(
+ String resourceGroupName, String serverName, Context context) {
+ return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName, context));
}
/**
- * Updates a configuration of a server.
+ * List all the configurations in a given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
+ * @return a list of server configurations.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ConfigurationInner put(
- String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
- return putAsync(resourceGroupName, serverName, configurationName, parameters).block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByServer(String resourceGroupName, String serverName) {
+ return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName));
}
/**
- * Updates a configuration of a server.
+ * List all the configurations in a given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
- * @param configurationName The name of the server configuration.
- * @param parameters The required parameters for updating a server configuration.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Configuration.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ConfigurationInner put(
- String resourceGroupName,
- String serverName,
- String configurationName,
- ConfigurationInner parameters,
- Context context) {
- return putAsync(resourceGroupName, serverName, configurationName, parameters, context).block();
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The nextLink parameter.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of server configurations.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByServerNextSinglePageAsync(String nextLink) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.listByServerNext(nextLink, this.client.getEndpoint(), accept, context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The nextLink parameter.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of server configurations.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByServerNextSinglePageAsync(String nextLink, Context context) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByServerNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByServer(
+ String resourceGroupName, String serverName, Context context) {
+ return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context));
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsImpl.java
index d8aa4ce2d74a..6b20fdc3b914 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsImpl.java
@@ -29,17 +29,6 @@ public ConfigurationsImpl(
this.serviceManager = serviceManager;
}
- public PagedIterable listByServer(String resourceGroupName, String serverName) {
- PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName);
- return Utils.mapPage(inner, inner1 -> new ConfigurationImpl(inner1, this.manager()));
- }
-
- public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) {
- PagedIterable inner =
- this.serviceClient().listByServer(resourceGroupName, serverName, context);
- return Utils.mapPage(inner, inner1 -> new ConfigurationImpl(inner1, this.manager()));
- }
-
public Configuration get(String resourceGroupName, String serverName, String configurationName) {
ConfigurationInner inner = this.serviceClient().get(resourceGroupName, serverName, configurationName);
if (inner != null) {
@@ -64,6 +53,17 @@ public Response getWithResponse(
}
}
+ public PagedIterable listByServer(String resourceGroupName, String serverName) {
+ PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName);
+ return Utils.mapPage(inner, inner1 -> new ConfigurationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByServer(resourceGroupName, serverName, context);
+ return Utils.mapPage(inner, inner1 -> new ConfigurationImpl(inner1, this.manager()));
+ }
+
public Configuration getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
@@ -73,13 +73,12 @@ public Configuration getById(String id) {
String
.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String serverName = Utils.getValueFromIdByName(id, "flexibleServers");
+ String serverName = Utils.getValueFromIdByName(id, "servers");
if (serverName == null) {
throw logger
.logExceptionAsError(
new IllegalArgumentException(
- String
- .format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id)));
+ String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id)));
}
String configurationName = Utils.getValueFromIdByName(id, "configurations");
if (configurationName == null) {
@@ -101,13 +100,12 @@ public Response getByIdWithResponse(String id, Context context) {
String
.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String serverName = Utils.getValueFromIdByName(id, "flexibleServers");
+ String serverName = Utils.getValueFromIdByName(id, "servers");
if (serverName == null) {
throw logger
.logExceptionAsError(
new IllegalArgumentException(
- String
- .format("The resource ID '%s' is not valid. Missing path segment 'flexibleServers'.", id)));
+ String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id)));
}
String configurationName = Utils.getValueFromIdByName(id, "configurations");
if (configurationName == null) {
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabaseImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabaseImpl.java
index 884c03f4565a..c7158f3a8cc0 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabaseImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabaseImpl.java
@@ -4,23 +4,15 @@
package com.azure.resourcemanager.postgresqlflexibleserver.implementation;
-import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.DatabaseInner;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Database;
-public final class DatabaseImpl implements Database, Database.Definition {
+public final class DatabaseImpl implements Database, Database.Definition, Database.Update {
private DatabaseInner innerObject;
private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
- DatabaseImpl(
- DatabaseInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
public String id() {
return this.innerModel().id();
}
@@ -33,10 +25,6 @@ public String type() {
return this.innerModel().type();
}
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public String charset() {
return this.innerModel().charset();
}
@@ -59,7 +47,7 @@ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager man
private String databaseName;
- public DatabaseImpl withExistingFlexibleServer(String resourceGroupName, String serverName) {
+ public DatabaseImpl withExistingServer(String resourceGroupName, String serverName) {
this.resourceGroupName = resourceGroupName;
this.serverName = serverName;
return this;
@@ -70,7 +58,7 @@ public Database create() {
serviceManager
.serviceClient()
.getDatabases()
- .create(resourceGroupName, serverName, databaseName, this.innerModel(), Context.NONE);
+ .createOrUpdate(resourceGroupName, serverName, databaseName, this.innerModel(), Context.NONE);
return this;
}
@@ -79,7 +67,7 @@ public Database create(Context context) {
serviceManager
.serviceClient()
.getDatabases()
- .create(resourceGroupName, serverName, databaseName, this.innerModel(), context);
+ .createOrUpdate(resourceGroupName, serverName, databaseName, this.innerModel(), context);
return this;
}
@@ -89,6 +77,38 @@ public Database create(Context context) {
this.databaseName = name;
}
+ public DatabaseImpl update() {
+ return this;
+ }
+
+ public Database apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabases()
+ .createOrUpdate(resourceGroupName, serverName, databaseName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Database apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabases()
+ .createOrUpdate(resourceGroupName, serverName, databaseName, this.innerModel(), context);
+ return this;
+ }
+
+ DatabaseImpl(
+ DatabaseInner innerObject,
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.serverName = Utils.getValueFromIdByName(innerObject.id(), "servers");
+ this.databaseName = Utils.getValueFromIdByName(innerObject.id(), "databases");
+ }
+
public Database refresh() {
this.innerObject =
serviceManager
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java
index e08f436fe1a1..d6bbdd344157 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java
@@ -69,11 +69,11 @@ public final class DatabasesClientImpl implements DatabasesClient {
private interface DatabasesService {
@Headers({"Content-Type: application/json"})
@Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql"
- + "/flexibleServers/{serverName}/databases/{databaseName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/servers/{serverName}/databases/{databaseName}")
@ExpectedResponses({200, 201, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> create(
+ Mono>> createOrUpdate(
@HostParam("$host") String endpoint,
@QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@@ -86,8 +86,8 @@ Mono>> create(
@Headers({"Content-Type: application/json"})
@Delete(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql"
- + "/flexibleServers/{serverName}/databases/{databaseName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/servers/{serverName}/databases/{databaseName}")
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> delete(
@@ -102,8 +102,8 @@ Mono>> delete(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql"
- + "/flexibleServers/{serverName}/databases/{databaseName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/servers/{serverName}/databases/{databaseName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> get(
@@ -118,8 +118,8 @@ Mono> get(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql"
- + "/flexibleServers/{serverName}/databases")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
+ + "/servers/{serverName}/databases")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByServer(
@@ -130,16 +130,6 @@ Mono> listByServer(
@PathParam("serverName") String serverName,
@HeaderParam("Accept") String accept,
Context context);
-
- @Headers({"Content-Type: application/json"})
- @Get("{nextLink}")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByServerNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept,
- Context context);
}
/**
@@ -155,7 +145,7 @@ Mono> listByServerNext(
* @return represents a Database.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createWithResponseAsync(
+ private Mono>> createOrUpdateWithResponseAsync(
String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -184,14 +174,15 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
+ final String apiVersion = "2017-12-01";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
- .create(
+ .createOrUpdate(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -216,7 +207,7 @@ private Mono>> createWithResponseAsync(
* @return represents a Database.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createWithResponseAsync(
+ private Mono>> createOrUpdateWithResponseAsync(
String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -245,12 +236,13 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
+ final String apiVersion = "2017-12-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .create(
+ .createOrUpdate(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -273,10 +265,10 @@ private Mono>> createWithResponseAsync(
* @return represents a Database.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private PollerFlux, DatabaseInner> beginCreateAsync(
+ private PollerFlux, DatabaseInner> beginCreateOrUpdateAsync(
String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters) {
Mono>> mono =
- createWithResponseAsync(resourceGroupName, serverName, databaseName, parameters);
+ createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters);
return this
.client
.getLroResult(
@@ -297,11 +289,11 @@ private PollerFlux, DatabaseInner> beginCreateAsync(
* @return represents a Database.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private PollerFlux, DatabaseInner> beginCreateAsync(
+ private PollerFlux, DatabaseInner> beginCreateOrUpdateAsync(
String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context) {
context = this.client.mergeContext(context);
Mono>> mono =
- createWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context);
+ createOrUpdateWithResponseAsync(resourceGroupName, serverName, databaseName, parameters, context);
return this
.client
.getLroResult(
@@ -321,9 +313,9 @@ private PollerFlux, DatabaseInner> beginCreateAsync(
* @return represents a Database.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public SyncPoller