scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -175,6 +229,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -182,9 +249,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -206,7 +275,7 @@ public PostgreSqlManager authenticate(TokenCredential credential, AzureProfile p
.append("-")
.append("com.azure.resourcemanager.postgresqlflexibleserver")
.append("/")
- .append("1.0.0-beta.4");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -224,16 +293,34 @@ public PostgreSqlManager authenticate(TokenCredential credential, AzureProfile p
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
- policies.addAll(this.policies);
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
@@ -245,7 +332,11 @@ public PostgreSqlManager authenticate(TokenCredential credential, AzureProfile p
}
}
- /** @return Resource collection API of Servers. */
+ /**
+ * Gets the resource collection API of Servers. It manages Server.
+ *
+ * @return Resource collection API of Servers.
+ */
public Servers servers() {
if (this.servers == null) {
this.servers = new ServersImpl(clientObject.getServers(), this);
@@ -253,7 +344,23 @@ public Servers servers() {
return servers;
}
- /** @return Resource collection API of FirewallRules. */
+ /**
+ * Gets the resource collection API of Replicas.
+ *
+ * @return Resource collection API of Replicas.
+ */
+ public Replicas replicas() {
+ if (this.replicas == null) {
+ this.replicas = new ReplicasImpl(clientObject.getReplicas(), this);
+ }
+ return replicas;
+ }
+
+ /**
+ * Gets the resource collection API of FirewallRules. It manages FirewallRule.
+ *
+ * @return Resource collection API of FirewallRules.
+ */
public FirewallRules firewallRules() {
if (this.firewallRules == null) {
this.firewallRules = new FirewallRulesImpl(clientObject.getFirewallRules(), this);
@@ -261,7 +368,35 @@ public FirewallRules firewallRules() {
return firewallRules;
}
- /** @return Resource collection API of Configurations. */
+ /**
+ * Gets the resource collection API of VirtualNetworkRules. It manages VirtualNetworkRule.
+ *
+ * @return Resource collection API of VirtualNetworkRules.
+ */
+ public VirtualNetworkRules virtualNetworkRules() {
+ if (this.virtualNetworkRules == null) {
+ this.virtualNetworkRules = new VirtualNetworkRulesImpl(clientObject.getVirtualNetworkRules(), this);
+ }
+ return virtualNetworkRules;
+ }
+
+ /**
+ * Gets the resource collection API of Databases. It manages Database.
+ *
+ * @return Resource collection API of Databases.
+ */
+ public Databases databases() {
+ if (this.databases == null) {
+ this.databases = new DatabasesImpl(clientObject.getDatabases(), this);
+ }
+ return databases;
+ }
+
+ /**
+ * Gets the resource collection API of Configurations. It manages Configuration.
+ *
+ * @return Resource collection API of Configurations.
+ */
public Configurations configurations() {
if (this.configurations == null) {
this.configurations = new ConfigurationsImpl(clientObject.getConfigurations(), this);
@@ -269,7 +404,85 @@ public Configurations configurations() {
return configurations;
}
- /** @return Resource collection API of CheckNameAvailabilities. */
+ /**
+ * Gets the resource collection API of ServerParameters.
+ *
+ * @return Resource collection API of ServerParameters.
+ */
+ public ServerParameters serverParameters() {
+ if (this.serverParameters == null) {
+ this.serverParameters = new ServerParametersImpl(clientObject.getServerParameters(), this);
+ }
+ return serverParameters;
+ }
+
+ /**
+ * Gets the resource collection API of LogFiles.
+ *
+ * @return Resource collection API of LogFiles.
+ */
+ public LogFiles logFiles() {
+ if (this.logFiles == null) {
+ this.logFiles = new LogFilesImpl(clientObject.getLogFiles(), this);
+ }
+ return logFiles;
+ }
+
+ /**
+ * Gets the resource collection API of ServerAdministrators.
+ *
+ * @return Resource collection API of ServerAdministrators.
+ */
+ public ServerAdministrators serverAdministrators() {
+ if (this.serverAdministrators == null) {
+ this.serverAdministrators = new ServerAdministratorsImpl(clientObject.getServerAdministrators(), this);
+ }
+ return serverAdministrators;
+ }
+
+ /**
+ * Gets the resource collection API of RecoverableServers.
+ *
+ * @return Resource collection API of RecoverableServers.
+ */
+ public RecoverableServers recoverableServers() {
+ if (this.recoverableServers == null) {
+ this.recoverableServers = new RecoverableServersImpl(clientObject.getRecoverableServers(), this);
+ }
+ return recoverableServers;
+ }
+
+ /**
+ * Gets the resource collection API of ServerBasedPerformanceTiers.
+ *
+ * @return Resource collection API of ServerBasedPerformanceTiers.
+ */
+ public ServerBasedPerformanceTiers serverBasedPerformanceTiers() {
+ if (this.serverBasedPerformanceTiers == null) {
+ this.serverBasedPerformanceTiers =
+ new ServerBasedPerformanceTiersImpl(clientObject.getServerBasedPerformanceTiers(), this);
+ }
+ return serverBasedPerformanceTiers;
+ }
+
+ /**
+ * Gets the resource collection API of LocationBasedPerformanceTiers.
+ *
+ * @return Resource collection API of LocationBasedPerformanceTiers.
+ */
+ public LocationBasedPerformanceTiers locationBasedPerformanceTiers() {
+ if (this.locationBasedPerformanceTiers == null) {
+ this.locationBasedPerformanceTiers =
+ new LocationBasedPerformanceTiersImpl(clientObject.getLocationBasedPerformanceTiers(), this);
+ }
+ return locationBasedPerformanceTiers;
+ }
+
+ /**
+ * Gets the resource collection API of CheckNameAvailabilities.
+ *
+ * @return Resource collection API of CheckNameAvailabilities.
+ */
public CheckNameAvailabilities checkNameAvailabilities() {
if (this.checkNameAvailabilities == null) {
this.checkNameAvailabilities =
@@ -278,47 +491,66 @@ 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);
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
}
- return locationBasedCapabilities;
+ return operations;
}
- /** @return Resource collection API of VirtualNetworkSubnetUsages. */
- public VirtualNetworkSubnetUsages virtualNetworkSubnetUsages() {
- if (this.virtualNetworkSubnetUsages == null) {
- this.virtualNetworkSubnetUsages =
- new VirtualNetworkSubnetUsagesImpl(clientObject.getVirtualNetworkSubnetUsages(), this);
+ /**
+ * Gets the resource collection API of ServerSecurityAlertPolicies. It manages ServerSecurityAlertPolicy.
+ *
+ * @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);
+ /**
+ * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection.
+ *
+ * @return Resource collection API of PrivateEndpointConnections.
+ */
+ public PrivateEndpointConnections privateEndpointConnections() {
+ if (this.privateEndpointConnections == null) {
+ this.privateEndpointConnections =
+ new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
}
- return operations;
+ return privateEndpointConnections;
}
- /** @return Resource collection API of Databases. */
- public Databases databases() {
- if (this.databases == null) {
- this.databases = new DatabasesImpl(clientObject.getDatabases(), this);
+ /**
+ * Gets the resource collection API of PrivateLinkResources.
+ *
+ * @return Resource collection API of PrivateLinkResources.
+ */
+ public PrivateLinkResources privateLinkResources() {
+ if (this.privateLinkResources == null) {
+ this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
}
- return databases;
+ return privateLinkResources;
}
- /** @return Resource collection API of GetPrivateDnsZoneSuffixes. */
- public GetPrivateDnsZoneSuffixes getPrivateDnsZoneSuffixes() {
- if (this.getPrivateDnsZoneSuffixes == null) {
- this.getPrivateDnsZoneSuffixes =
- new GetPrivateDnsZoneSuffixesImpl(clientObject.getGetPrivateDnsZoneSuffixes(), this);
+ /**
+ * Gets the resource collection API of ServerKeys. It manages ServerKey.
+ *
+ * @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/CheckNameAvailabilitiesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java
index e6e3a445422e..3c3102763f84 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java
@@ -17,25 +17,25 @@ public interface CheckNameAvailabilitiesClient {
* Check the availability of name for resource.
*
* @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a resource name availability.
+ * @return represents a resource name availability along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- NameAvailabilityInner execute(NameAvailabilityRequest nameAvailabilityRequest);
+ Response executeWithResponse(
+ NameAvailabilityRequest nameAvailabilityRequest, Context context);
/**
* Check the availability of name for resource.
*
* @param nameAvailabilityRequest The required parameters for checking if resource name is available.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return represents a resource name availability.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response executeWithResponse(
- NameAvailabilityRequest nameAvailabilityRequest, Context context);
+ NameAvailabilityInner execute(NameAvailabilityRequest nameAvailabilityRequest);
}
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 fdcf6840f8c2..4bb6293ac5ae 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.
*
@@ -82,10 +25,10 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.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 the {@link SyncPoller} for polling of represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, ConfigurationInner> beginUpdate(
+ SyncPoller, ConfigurationInner> beginCreateOrUpdate(
String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters);
/**
@@ -99,10 +42,10 @@ SyncPoller, ConfigurationInner> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.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 the {@link SyncPoller} for polling of represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- 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.
+ * @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 along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, ConfigurationInner> beginPut(
- String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String configurationName, 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.
- * @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.LONG_RUNNING_OPERATION)
- SyncPoller, ConfigurationInner> beginPut(
- String resourceGroupName,
- String serverName,
- String configurationName,
- ConfigurationInner parameters,
- Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationInner get(String resourceGroupName, String serverName, String configurationName);
/**
- * 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 as paginated response with {@link PagedIterable}.
*/
- @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 as paginated response with {@link PagedIterable}.
*/
- @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 72c1d4ae5c25..987f75b9e350 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
@@ -25,10 +25,10 @@ public interface DatabasesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Database.
+ * @return the {@link SyncPoller} for polling of represents a Database.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, DatabaseInner> beginCreate(
+ SyncPoller, DatabaseInner> beginCreateOrUpdate(
String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters);
/**
@@ -42,10 +42,10 @@ SyncPoller, DatabaseInner> beginCreate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a Database.
+ * @return the {@link SyncPoller} for polling of represents a Database.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- 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);
/**
@@ -89,7 +90,7 @@ DatabaseInner create(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException 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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName);
@@ -104,7 +105,7 @@ DatabaseInner create(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException 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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
@@ -143,13 +144,15 @@ SyncPoller, Void> beginDelete(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param databaseName The name of the database.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about a database.
+ * @return information about a database along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- DatabaseInner get(String resourceGroupName, String serverName, String databaseName);
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String databaseName, Context context);
/**
* Gets information about a database.
@@ -157,15 +160,13 @@ SyncPoller, Void> beginDelete(
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param databaseName The name of the database.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return information about a database.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String resourceGroupName, String serverName, String databaseName, Context context);
+ DatabaseInner get(String resourceGroupName, String serverName, String databaseName);
/**
* List all the databases in a given server.
@@ -175,7 +176,7 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a List of databases.
+ * @return a List of databases as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByServer(String resourceGroupName, String serverName);
@@ -189,7 +190,7 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a List of databases.
+ * @return a List of databases as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
diff --git a/sdk/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 2c6d9c5a126b..d3c6e345112d 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
@@ -25,7 +25,7 @@ public interface FirewallRulesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.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 the {@link SyncPoller} for polling of represents a server firewall rule.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, FirewallRuleInner> beginCreateOrUpdate(
@@ -42,7 +42,7 @@ SyncPoller, FirewallRuleInner> beginCreateOrUpdate
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.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 the {@link SyncPoller} for polling of represents a server firewall rule.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, FirewallRuleInner> beginCreateOrUpdate(
@@ -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.
@@ -98,14 +98,14 @@ FirewallRuleInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException 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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String serverName, String firewallRuleName);
/**
- * Deletes a PostgreSQL server firewall rule.
+ * 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.
@@ -114,14 +114,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 the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String serverName, String firewallRuleName, Context context);
/**
- * Deletes a PostgreSQL server firewall rule.
+ * 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,50 +148,50 @@ 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.
* @param firewallRuleName The name of the server firewall rule.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a server firewall rule.
+ * @return information about a server firewall rule along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName);
+ Response getWithResponse(
+ 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.
* @param firewallRuleName The name of the server firewall rule.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a server firewall rule.
+ * @return information about a server firewall rule.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String resourceGroupName, String serverName, String firewallRuleName, Context context);
+ FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName);
/**
- * 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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of firewall rules.
+ * @return a list of firewall rules as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByServer(String resourceGroupName, String serverName);
/**
- * List all the firewall rules in a given PostgreSQL server.
+ * 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.
@@ -199,7 +199,7 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of firewall rules.
+ * @return a list of firewall rules as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
diff --git a/sdk/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/GetPrivateDnsZoneSuffixesClient.java
deleted file mode 100644
index 16bb5ad1c086..000000000000
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java
+++ /dev/null
@@ -1,35 +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;
-
-/** An instance of this class provides access to all the operations defined in GetPrivateDnsZoneSuffixesClient. */
-public interface GetPrivateDnsZoneSuffixesClient {
- /**
- * Get private DNS zone suffix in the cloud.
- *
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return private DNS zone suffix in the cloud.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- String execute();
-
- /**
- * Get private DNS zone suffix in the cloud.
- *
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return private DNS zone suffix in the cloud.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response executeWithResponse(Context context);
-}
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 68%
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..d3436698ab9e 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 as paginated response with {@link PagedIterable}.
*/
@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 as paginated response with {@link PagedIterable}.
*/
@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..27994158293b
--- /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 as paginated response with {@link PagedIterable}.
+ */
+ @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 as paginated response with {@link PagedIterable}.
+ */
+ @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/OperationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/OperationsClient.java
index 94bcbaea560e..cbd6c8bfebd0 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/OperationsClient.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/OperationsClient.java
@@ -15,22 +15,22 @@ public interface OperationsClient {
/**
* Lists all of the available REST API operations.
*
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of resource provider operations.
+ * @return a list of resource provider operations along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- OperationListResultInner list();
+ Response listWithResponse(Context context);
/**
* Lists all of the available REST API operations.
*
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a list of resource provider operations.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response listWithResponse(Context context);
+ OperationListResultInner list();
}
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..fd787d33098e
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java
@@ -0,0 +1,297 @@
+// 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.
+ * @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 along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * 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);
+
+ /**
+ * 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 the {@link SyncPoller} for polling of a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 the {@link SyncPoller} for polling of a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 tags on private endpoint connection.
+ *
+ * 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 the {@link SyncPoller} for polling of a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PrivateEndpointConnectionInner> beginUpdateTags(
+ String resourceGroupName, String serverName, String privateEndpointConnectionName, TagsObject parameters);
+
+ /**
+ * Updates tags on private endpoint connection.
+ *
+ * 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 the {@link SyncPoller} for polling of a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PrivateEndpointConnectionInner> beginUpdateTags(
+ String resourceGroupName,
+ String serverName,
+ String privateEndpointConnectionName,
+ TagsObject parameters,
+ Context context);
+
+ /**
+ * Updates tags on private endpoint connection.
+ *
+ * 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 tags on private endpoint connection.
+ *
+ *
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 as paginated response with {@link PagedIterable}.
+ */
+ @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 as paginated response with {@link PagedIterable}.
+ */
+ @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..e660f071c43c
--- /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 as paginated response with {@link PagedIterable}.
+ */
+ @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 as paginated response with {@link PagedIterable}.
+ */
+ @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.
+ * @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 along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String groupName, 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);
+}
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/RecoverableServersClient.java
similarity index 54%
rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java
rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/RecoverableServersClient.java
index 36279e65b3a7..75692dc8823d 100644
--- 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/RecoverableServersClient.java
@@ -8,36 +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.VirtualNetworkSubnetUsageResultInner;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter;
+import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.RecoverableServerResourceInner;
-/** An instance of this class provides access to all the operations defined in VirtualNetworkSubnetUsagesClient. */
-public interface VirtualNetworkSubnetUsagesClient {
+/** An instance of this class provides access to all the operations defined in RecoverableServersClient. */
+public interface RecoverableServersClient {
/**
- * Get virtual network subnet usage for a given vNet resource id.
+ * Gets a recoverable PostgreSQL Server.
*
- * @param locationName The name of the location.
- * @param parameters The required parameters for creating or updating 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 virtual network subnet usage for a given vNet resource id.
+ * @return a recoverable PostgreSQL Server along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- VirtualNetworkSubnetUsageResultInner execute(String locationName, VirtualNetworkSubnetUsageParameter parameters);
+ Response getWithResponse(
+ String resourceGroupName, String serverName, Context context);
/**
- * Get virtual network subnet usage for a given vNet resource id.
+ * Gets a recoverable PostgreSQL Server.
*
- * @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.
+ * @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 virtual network subnet usage for a given vNet resource id.
+ * @return a recoverable PostgreSQL Server.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response executeWithResponse(
- String locationName, VirtualNetworkSubnetUsageParameter parameters, Context context);
+ RecoverableServerResourceInner get(String resourceGroupName, String serverName);
}
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..68f1378bbd27
--- /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 as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * List all the replicas for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of servers as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/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..9a8e33f45199
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerAdministratorsClient.java
@@ -0,0 +1,192 @@
+// 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.
+ * @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 along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, Context context);
+
+ /**
+ * 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);
+
+ /**
+ * 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 the {@link SyncPoller} for polling of represents a and external administrator to be created.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 the {@link SyncPoller} for polling of represents a and external administrator to be created.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 as paginated response with {@link
+ * PagedIterable}.
+ */
+ @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 as paginated response with {@link
+ * PagedIterable}.
+ */
+ @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..7e3d4bcd2615
--- /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 as paginated response with {@link PagedIterable}.
+ */
+ @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 as paginated response with {@link PagedIterable}.
+ */
+ @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..1e303cbddeb8
--- /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 as paginated response with {@link PagedIterable}.
+ */
+ @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 as paginated response with {@link PagedIterable}.
+ */
+ @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.
+ * @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 along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String keyName, 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);
+
+ /**
+ * 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 the {@link SyncPoller} for polling of a PostgreSQL Server key.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 the {@link SyncPoller} for polling of a PostgreSQL Server key.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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..9065d1c37d0a
--- /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 the {@link SyncPoller} for polling of a list of server configurations.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 the {@link SyncPoller} for polling of a list of server configurations.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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..867647eb04e2
--- /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.
+ * @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 along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, SecurityAlertPolicyName securityAlertPolicyName, Context context);
+
+ /**
+ * 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);
+
+ /**
+ * 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 the {@link SyncPoller} for polling of a server security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 the {@link SyncPoller} for polling of a server security alert policy.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 as paginated response with {@link PagedIterable}.
+ */
+ @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 as paginated response with {@link PagedIterable}.
+ */
+ @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 5c60b9cd4c9a..ad7ea5406d82 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.
@@ -26,14 +26,14 @@ public interface ServersClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.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.
+ * @return the {@link SyncPoller} for polling of represents a server.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ServerInner> beginCreate(
- String resourceGroupName, String serverName, ServerInner parameters);
+ 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.
@@ -42,14 +42,14 @@ SyncPoller, ServerInner> beginCreate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.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.
+ * @return the {@link SyncPoller} for polling of represents a server.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ServerInner> beginCreate(
- String resourceGroupName, String serverName, ServerInner parameters, Context context);
+ 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
@@ -87,11 +87,11 @@ SyncPoller, ServerInner> beginCreate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.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.
+ * @return the {@link SyncPoller} for polling of represents a server.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ServerInner> beginUpdate(
- String resourceGroupName, String serverName, ServerForUpdate parameters);
+ 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
@@ -104,11 +104,11 @@ SyncPoller, ServerInner> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.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.
+ * @return the {@link SyncPoller} for polling of represents a server.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ServerInner> beginUpdate(
- String resourceGroupName, String serverName, ServerForUpdate parameters, Context context);
+ 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.
@@ -149,7 +149,7 @@ SyncPoller, ServerInner> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException 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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String serverName);
@@ -163,7 +163,7 @@ SyncPoller, ServerInner> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException 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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, Context context);
@@ -198,27 +198,27 @@ SyncPoller, ServerInner> beginUpdate(
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about a server.
+ * @return information about a server along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ServerInner getByResourceGroup(String resourceGroupName, String serverName);
+ Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context);
/**
* Gets information about a server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return information about a server.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context);
+ ServerInner getByResourceGroup(String resourceGroupName, String serverName);
/**
* List all the servers in a given resource group.
@@ -227,7 +227,7 @@ SyncPoller, ServerInner> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException 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.
+ * @return a list of servers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -240,7 +240,7 @@ SyncPoller, ServerInner> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException 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.
+ * @return a list of servers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -250,7 +250,7 @@ SyncPoller, ServerInner> beginUpdate(
*
* @throws com.azure.core.management.exception.ManagementException 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.
+ * @return a list of servers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -262,7 +262,7 @@ SyncPoller, ServerInner> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException 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.
+ * @return a list of servers as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -272,44 +272,27 @@ 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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginRestart(
- String resourceGroupName, String serverName, RestartParameter parameters);
+ SyncPoller, Void> beginRestart(String resourceGroupName, String serverName);
/**
* Restarts a server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
- * @param parameters The parameters for restarting a server.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginRestart(
- String resourceGroupName, String serverName, RestartParameter parameters, Context context);
-
- /**
- * Restarts a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param parameters The parameters for restarting a server.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @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.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginStart(String resourceGroupName, String serverName);
-
- /**
- * Starts a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginStart(String resourceGroupName, String serverName, Context context);
-
- /**
- * Starts a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @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.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginStop(String resourceGroupName, String serverName);
-
- /**
- * Stops a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginStop(String resourceGroupName, String serverName, Context context);
-
- /**
- * Stops a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @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..8d2a6785b6f7
--- /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.
+ * @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 along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context);
+
+ /**
+ * 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);
+
+ /**
+ * 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 the {@link SyncPoller} for polling of a virtual network rule.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 the {@link SyncPoller} for polling of a virtual network rule.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ 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 as paginated response with {@link PagedIterable}.
+ */
+ @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 as paginated response with {@link PagedIterable}.
+ */
+ @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/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 bd1de5ff9f12..7f6d87282b32 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
@@ -6,28 +6,20 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationDataType;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Represents a Configuration. */
@Fluent
public final class ConfigurationInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationInner.class);
-
/*
* The properties of a configuration.
*/
@JsonProperty(value = "properties")
private ConfigurationProperties innerProperties;
- /*
- * The system metadata relating to this resource.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
+ /** Creates an instance of ConfigurationInner class. */
+ public ConfigurationInner() {
+ }
/**
* Get the innerProperties property: The properties of a configuration.
@@ -38,15 +30,6 @@ private ConfigurationProperties innerProperties() {
return this.innerProperties;
}
- /**
- * 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.
*
@@ -93,7 +76,7 @@ public String defaultValue() {
*
* @return the dataType value.
*/
- public ConfigurationDataType dataType() {
+ public String dataType() {
return this.innerProperties() == null ? null : this.innerProperties().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..7fab1fccbbbc
--- /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.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A list of server configurations. */
+@Fluent
+public final class ConfigurationListResultInner {
+ /*
+ * The list of server configurations.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /** Creates an instance of ConfigurationListResultInner class. */
+ public ConfigurationListResultInner() {
+ }
+
+ /**
+ * 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/ConfigurationProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationProperties.java
index d066973fef35..14dd9dbab4f0 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationProperties.java
@@ -5,16 +5,11 @@
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.ConfigurationDataType;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The properties of a configuration. */
@Fluent
public final class ConfigurationProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationProperties.class);
-
/*
* Value of the configuration.
*/
@@ -37,7 +32,7 @@ public final class ConfigurationProperties {
* Data type of the configuration.
*/
@JsonProperty(value = "dataType", access = JsonProperty.Access.WRITE_ONLY)
- private ConfigurationDataType dataType;
+ private String dataType;
/*
* Allowed values of the configuration.
@@ -51,6 +46,10 @@ public final class ConfigurationProperties {
@JsonProperty(value = "source")
private String source;
+ /** Creates an instance of ConfigurationProperties class. */
+ public ConfigurationProperties() {
+ }
+
/**
* Get the value property: Value of the configuration.
*
@@ -94,7 +93,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/DatabaseInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java
index 2a86489446c8..8c1b7b16d59e 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
@@ -6,27 +6,20 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Represents a Database. */
@Fluent
public final class DatabaseInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseInner.class);
-
/*
* The properties of a database.
*/
@JsonProperty(value = "properties")
private DatabaseProperties innerProperties;
- /*
- * The system metadata relating to this resource.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
+ /** Creates an instance of DatabaseInner class. */
+ public DatabaseInner() {
+ }
/**
* Get the innerProperties property: The properties of a database.
@@ -37,15 +30,6 @@ private DatabaseProperties innerProperties() {
return this.innerProperties;
}
- /**
- * 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/DatabaseProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseProperties.java
index d97032576842..b3eee890822f 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseProperties.java
@@ -5,15 +5,11 @@
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;
/** The properties of a database. */
@Fluent
public final class DatabaseProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseProperties.class);
-
/*
* The charset of the database.
*/
@@ -26,6 +22,10 @@ public final class DatabaseProperties {
@JsonProperty(value = "collation")
private String collation;
+ /** Creates an instance of DatabaseProperties class. */
+ public DatabaseProperties() {
+ }
+
/**
* 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 fa3322e057ba..03515fe0ba7d 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
@@ -6,27 +6,21 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Represents a server firewall rule. */
@Fluent
public final class FirewallRuleInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(FirewallRuleInner.class);
-
/*
* The properties of a firewall rule.
*/
@JsonProperty(value = "properties", required = true)
private FirewallRuleProperties innerProperties = new FirewallRuleProperties();
- /*
- * The system metadata relating to this resource.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
+ /** Creates an instance of FirewallRuleInner class. */
+ public FirewallRuleInner() {
+ }
/**
* Get the innerProperties property: The properties of a firewall rule.
@@ -37,15 +31,6 @@ private FirewallRuleProperties innerProperties() {
return this.innerProperties;
}
- /**
- * 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.
*
@@ -99,7 +84,7 @@ public FirewallRuleInner withEndIpAddress(String endIpAddress) {
*/
public void validate() {
if (innerProperties() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property innerProperties in model FirewallRuleInner"));
@@ -107,4 +92,6 @@ public void validate() {
innerProperties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(FirewallRuleInner.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java
index 16d81278ad02..680de70ed997 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java
@@ -6,14 +6,11 @@
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;
/** The properties of a server firewall rule. */
@Fluent
public final class FirewallRuleProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(FirewallRuleProperties.class);
-
/*
* The start IP address of the server firewall rule. Must be IPv4 format.
*/
@@ -26,6 +23,10 @@ public final class FirewallRuleProperties {
@JsonProperty(value = "endIpAddress", required = true)
private String endIpAddress;
+ /** Creates an instance of FirewallRuleProperties class. */
+ public FirewallRuleProperties() {
+ }
+
/**
* Get the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format.
*
@@ -73,16 +74,18 @@ public FirewallRuleProperties withEndIpAddress(String endIpAddress) {
*/
public void validate() {
if (startIpAddress() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property startIpAddress in model FirewallRuleProperties"));
}
if (endIpAddress() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property endIpAddress in model FirewallRuleProperties"));
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(FirewallRuleProperties.class);
}
diff --git a/sdk/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..2f8a8a66cf9f
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileInner.java
@@ -0,0 +1,131 @@
+// 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.management.ProxyResource;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Represents a log file. */
+@Fluent
+public final class LogFileInner extends ProxyResource {
+ /*
+ * The properties of the log file.
+ */
+ @JsonProperty(value = "properties")
+ private LogFileProperties innerProperties;
+
+ /** Creates an instance of LogFileInner class. */
+ public LogFileInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of the log file.
+ *
+ * @return the innerProperties value.
+ */
+ private LogFileProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the sizeInKB property: Size of the log file.
+ *
+ * @return the sizeInKB value.
+ */
+ public Long sizeInKB() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new LogFileProperties();
+ }
+ this.innerProperties().withSizeInKB(sizeInKB);
+ return this;
+ }
+
+ /**
+ * Get the createdTime property: Creation timestamp of the log file.
+ *
+ * @return the createdTime value.
+ */
+ public OffsetDateTime createdTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().createdTime();
+ }
+
+ /**
+ * Get the lastModifiedTime property: Last modified timestamp of the log file.
+ *
+ * @return the lastModifiedTime value.
+ */
+ public OffsetDateTime lastModifiedTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTime();
+ }
+
+ /**
+ * Get the type property: Type of the log file.
+ *
+ * @return the type value.
+ */
+ public String typePropertiesType() {
+ return this.innerProperties() == null ? null : this.innerProperties().type();
+ }
+
+ /**
+ * Set the type property: Type of the log file.
+ *
+ * @param type the type value to set.
+ * @return the LogFileInner object itself.
+ */
+ public LogFileInner withTypePropertiesType(String type) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new LogFileProperties();
+ }
+ this.innerProperties().withType(type);
+ return this;
+ }
+
+ /**
+ * Get the url property: The url to download the log file from.
+ *
+ * @return the url value.
+ */
+ public String url() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new LogFileProperties();
+ }
+ this.innerProperties().withUrl(url);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileProperties.java
new file mode 100644
index 000000000000..9831c88cd856
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileProperties.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.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** The properties of a log file. */
+@Fluent
+public final class LogFileProperties {
+ /*
+ * Size of the log file.
+ */
+ @JsonProperty(value = "sizeInKB")
+ private Long sizeInKB;
+
+ /*
+ * Creation timestamp of the log file.
+ */
+ @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime createdTime;
+
+ /*
+ * Last modified timestamp of the log file.
+ */
+ @JsonProperty(value = "lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime lastModifiedTime;
+
+ /*
+ * Type of the log file.
+ */
+ @JsonProperty(value = "type")
+ private String type;
+
+ /*
+ * The url to download the log file from.
+ */
+ @JsonProperty(value = "url")
+ private String url;
+
+ /** Creates an instance of LogFileProperties class. */
+ public LogFileProperties() {
+ }
+
+ /**
+ * 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 LogFileProperties object itself.
+ */
+ public LogFileProperties 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 type property: Type of the log file.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: Type of the log file.
+ *
+ * @param type the type value to set.
+ * @return the LogFileProperties object itself.
+ */
+ public LogFileProperties withType(String type) {
+ this.type = type;
+ 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 LogFileProperties object itself.
+ */
+ public LogFileProperties 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..83a6054a6cae 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
@@ -5,15 +5,11 @@
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;
/** Represents a resource name availability. */
@Fluent
public final class NameAvailabilityInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(NameAvailabilityInner.class);
-
/*
* Error Message.
*/
@@ -27,16 +23,14 @@ public final class NameAvailabilityInner {
private Boolean nameAvailable;
/*
- * name of the PostgreSQL server.
+ * Reason for name being unavailable.
*/
- @JsonProperty(value = "name")
- private String name;
+ @JsonProperty(value = "reason")
+ private String reason;
- /*
- * type of the server
- */
- @JsonProperty(value = "type")
- private String type;
+ /** Creates an instance of NameAvailabilityInner class. */
+ public NameAvailabilityInner() {
+ }
/**
* 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..2c3f69204bfc 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
@@ -5,32 +5,25 @@
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.Operation;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** A list of resource provider operations. */
@Fluent
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;
+ /** Creates an instance of OperationListResultInner class. */
+ public OperationListResultInner() {
+ }
/**
- * 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..b726369c8fb7
--- /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.resourcemanager.postgresqlflexibleserver.models.PerformanceTierServiceLevelObjectives;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Performance tier properties. */
+@Fluent
+public final class PerformanceTierPropertiesInner {
+ /*
+ * 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;
+
+ /** Creates an instance of PerformanceTierPropertiesInner class. */
+ public PerformanceTierPropertiesInner() {
+ }
+
+ /**
+ * 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..bd5bf4143147
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionInner.java
@@ -0,0 +1,101 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointProperty;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionStateProperty;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A private endpoint connection. */
+@Fluent
+public final class PrivateEndpointConnectionInner extends ProxyResource {
+ /*
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateEndpointConnectionProperties innerProperties;
+
+ /** Creates an instance of PrivateEndpointConnectionInner class. */
+ public PrivateEndpointConnectionInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private PrivateEndpointConnectionProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the privateEndpoint property: Private endpoint which the connection belongs to.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpointProperty privateEndpoint() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint();
+ }
+
+ /**
+ * Set the privateEndpoint property: Private endpoint which the connection belongs to.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpointProperty privateEndpoint) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateEndpoint(privateEndpoint);
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: Connection state of the private endpoint connection.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState();
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: Connection state of the private endpoint connection.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: State of the private endpoint connection.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionProperties.java
new file mode 100644
index 000000000000..795eee89609d
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionProperties.java
@@ -0,0 +1,100 @@
+// 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.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointProperty;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionStateProperty;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of a private endpoint connection. */
+@Fluent
+public final class PrivateEndpointConnectionProperties {
+ /*
+ * Private endpoint which the connection belongs to.
+ */
+ @JsonProperty(value = "privateEndpoint")
+ private PrivateEndpointProperty privateEndpoint;
+
+ /*
+ * Connection state of the private endpoint connection.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState")
+ private PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState;
+
+ /*
+ * State of the private endpoint connection.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private String provisioningState;
+
+ /** Creates an instance of PrivateEndpointConnectionProperties class. */
+ public PrivateEndpointConnectionProperties() {
+ }
+
+ /**
+ * Get the privateEndpoint property: Private endpoint which the connection belongs to.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpointProperty privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint property: Private endpoint which the connection belongs to.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpointProperty privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: Connection state of the private endpoint connection.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: Connection state of the private endpoint connection.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: State of the private endpoint connection.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * 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/PrivateLinkResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateLinkResourceInner.java
new file mode 100644
index 000000000000..782817b04cf6
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateLinkResourceInner.java
@@ -0,0 +1,44 @@
+// 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.management.ProxyResource;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkResourceProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A private link resource. */
+@Immutable
+public final class PrivateLinkResourceInner extends ProxyResource {
+ /*
+ * The private link resource group id.
+ */
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private PrivateLinkResourceProperties properties;
+
+ /** Creates an instance of PrivateLinkResourceInner class. */
+ public PrivateLinkResourceInner() {
+ }
+
+ /**
+ * Get the properties property: The private link resource group id.
+ *
+ * @return the properties value.
+ */
+ public PrivateLinkResourceProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/RecoverableServerProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/RecoverableServerProperties.java
new file mode 100644
index 000000000000..4fd7aa7cb636
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/RecoverableServerProperties.java
@@ -0,0 +1,114 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The recoverable server's properties. */
+@Immutable
+public final class RecoverableServerProperties {
+ /*
+ * The last available backup date time.
+ */
+ @JsonProperty(value = "lastAvailableBackupDateTime", access = JsonProperty.Access.WRITE_ONLY)
+ private String lastAvailableBackupDateTime;
+
+ /*
+ * The service level objective
+ */
+ @JsonProperty(value = "serviceLevelObjective", access = JsonProperty.Access.WRITE_ONLY)
+ private String serviceLevelObjective;
+
+ /*
+ * Edition of the performance tier.
+ */
+ @JsonProperty(value = "edition", access = JsonProperty.Access.WRITE_ONLY)
+ private String edition;
+
+ /*
+ * vCore associated with the service level objective
+ */
+ @JsonProperty(value = "vCore", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer vCore;
+
+ /*
+ * Hardware generation associated with the service level objective
+ */
+ @JsonProperty(value = "hardwareGeneration", access = JsonProperty.Access.WRITE_ONLY)
+ private String hardwareGeneration;
+
+ /*
+ * The PostgreSQL version
+ */
+ @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY)
+ private String version;
+
+ /** Creates an instance of RecoverableServerProperties class. */
+ public RecoverableServerProperties() {
+ }
+
+ /**
+ * 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/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..b13e7362f9e8
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/RecoverableServerResourceInner.java
@@ -0,0 +1,97 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A recoverable server resource. */
+@Immutable
+public final class RecoverableServerResourceInner extends ProxyResource {
+ /*
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private RecoverableServerProperties innerProperties;
+
+ /** Creates an instance of RecoverableServerResourceInner class. */
+ public RecoverableServerResourceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private RecoverableServerProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the lastAvailableBackupDateTime property: The last available backup date time.
+ *
+ * @return the lastAvailableBackupDateTime value.
+ */
+ public String lastAvailableBackupDateTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastAvailableBackupDateTime();
+ }
+
+ /**
+ * Get the serviceLevelObjective property: The service level objective.
+ *
+ * @return the serviceLevelObjective value.
+ */
+ public String serviceLevelObjective() {
+ return this.innerProperties() == null ? null : this.innerProperties().serviceLevelObjective();
+ }
+
+ /**
+ * Get the edition property: Edition of the performance tier.
+ *
+ * @return the edition value.
+ */
+ public String edition() {
+ return this.innerProperties() == null ? null : this.innerProperties().edition();
+ }
+
+ /**
+ * Get the vCore property: vCore associated with the service level objective.
+ *
+ * @return the vCore value.
+ */
+ public Integer vCore() {
+ return this.innerProperties() == null ? null : this.innerProperties().vCore();
+ }
+
+ /**
+ * Get the hardwareGeneration property: Hardware generation associated with the service level objective.
+ *
+ * @return the hardwareGeneration value.
+ */
+ public String hardwareGeneration() {
+ return this.innerProperties() == null ? null : this.innerProperties().hardwareGeneration();
+ }
+
+ /**
+ * Get the version property: The PostgreSQL version.
+ *
+ * @return the version value.
+ */
+ public String version() {
+ return this.innerProperties() == null ? null : this.innerProperties().version();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SecurityAlertPolicyProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SecurityAlertPolicyProperties.java
new file mode 100644
index 000000000000..e17e7664eeb7
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/SecurityAlertPolicyProperties.java
@@ -0,0 +1,225 @@
+// 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.ServerSecurityAlertPolicyState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of a security alert policy. */
+@Fluent
+public final class SecurityAlertPolicyProperties {
+ /*
+ * Specifies the state of the policy, whether it is enabled or disabled.
+ */
+ @JsonProperty(value = "state", required = true)
+ private ServerSecurityAlertPolicyState state;
+
+ /*
+ * Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability,
+ * Access_Anomaly
+ */
+ @JsonProperty(value = "disabledAlerts")
+ private List disabledAlerts;
+
+ /*
+ * Specifies an array of e-mail addresses to which the alert is sent.
+ */
+ @JsonProperty(value = "emailAddresses")
+ private List emailAddresses;
+
+ /*
+ * Specifies that the alert is sent to the account administrators.
+ */
+ @JsonProperty(value = "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 = "storageEndpoint")
+ private String storageEndpoint;
+
+ /*
+ * Specifies the identifier key of the Threat Detection audit storage account.
+ */
+ @JsonProperty(value = "storageAccountAccessKey")
+ private String storageAccountAccessKey;
+
+ /*
+ * Specifies the number of days to keep in the Threat Detection audit logs.
+ */
+ @JsonProperty(value = "retentionDays")
+ private Integer retentionDays;
+
+ /** Creates an instance of SecurityAlertPolicyProperties class. */
+ public SecurityAlertPolicyProperties() {
+ }
+
+ /**
+ * 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 SecurityAlertPolicyProperties object itself.
+ */
+ public SecurityAlertPolicyProperties 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 SecurityAlertPolicyProperties object itself.
+ */
+ public SecurityAlertPolicyProperties 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 SecurityAlertPolicyProperties object itself.
+ */
+ public SecurityAlertPolicyProperties 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 SecurityAlertPolicyProperties object itself.
+ */
+ public SecurityAlertPolicyProperties 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 SecurityAlertPolicyProperties object itself.
+ */
+ public SecurityAlertPolicyProperties 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 SecurityAlertPolicyProperties object itself.
+ */
+ public SecurityAlertPolicyProperties 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 SecurityAlertPolicyProperties object itself.
+ */
+ public SecurityAlertPolicyProperties withRetentionDays(Integer retentionDays) {
+ this.retentionDays = retentionDays;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (state() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property state in model SecurityAlertPolicyProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(SecurityAlertPolicyProperties.class);
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerAdministratorProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerAdministratorProperties.java
new file mode 100644
index 000000000000..15c0ff72c97f
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerAdministratorProperties.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.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.UUID;
+
+/** The properties of an server Administrator. */
+@Fluent
+public final class ServerAdministratorProperties {
+ /*
+ * The type of administrator.
+ */
+ @JsonProperty(value = "administratorType", required = true)
+ private AdministratorType administratorType;
+
+ /*
+ * The server administrator login account name.
+ */
+ @JsonProperty(value = "login", required = true)
+ private String login;
+
+ /*
+ * The server administrator Sid (Secure ID).
+ */
+ @JsonProperty(value = "sid", required = true)
+ private UUID sid;
+
+ /*
+ * The server Active Directory Administrator tenant id.
+ */
+ @JsonProperty(value = "tenantId", required = true)
+ private UUID tenantId;
+
+ /** Creates an instance of ServerAdministratorProperties class. */
+ public ServerAdministratorProperties() {
+ }
+
+ /**
+ * 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 ServerAdministratorProperties object itself.
+ */
+ public ServerAdministratorProperties 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 ServerAdministratorProperties object itself.
+ */
+ public ServerAdministratorProperties 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 ServerAdministratorProperties object itself.
+ */
+ public ServerAdministratorProperties 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 ServerAdministratorProperties object itself.
+ */
+ public ServerAdministratorProperties withTenantId(UUID tenantId) {
+ this.tenantId = tenantId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (administratorType() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property administratorType in model ServerAdministratorProperties"));
+ }
+ if (login() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property login in model ServerAdministratorProperties"));
+ }
+ if (sid() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property sid in model ServerAdministratorProperties"));
+ }
+ if (tenantId() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property tenantId in model ServerAdministratorProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ServerAdministratorProperties.class);
+}
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..b662cd971ae5
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerAdministratorResourceInner.java
@@ -0,0 +1,137 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.UUID;
+
+/** Represents a and external administrator to be created. */
+@Fluent
+public final class ServerAdministratorResourceInner extends ProxyResource {
+ /*
+ * Properties of the server AAD administrator.
+ */
+ @JsonProperty(value = "properties")
+ private ServerAdministratorProperties innerProperties;
+
+ /** Creates an instance of ServerAdministratorResourceInner class. */
+ public ServerAdministratorResourceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Properties of the server AAD administrator.
+ *
+ * @return the innerProperties value.
+ */
+ private ServerAdministratorProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the administratorType property: The type of administrator.
+ *
+ * @return the administratorType value.
+ */
+ public AdministratorType administratorType() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerAdministratorProperties();
+ }
+ this.innerProperties().withAdministratorType(administratorType);
+ return this;
+ }
+
+ /**
+ * Get the login property: The server administrator login account name.
+ *
+ * @return the login value.
+ */
+ public String login() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerAdministratorProperties();
+ }
+ this.innerProperties().withLogin(login);
+ return this;
+ }
+
+ /**
+ * Get the sid property: The server administrator Sid (Secure ID).
+ *
+ * @return the sid value.
+ */
+ public UUID sid() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerAdministratorProperties();
+ }
+ this.innerProperties().withSid(sid);
+ return this;
+ }
+
+ /**
+ * Get the tenantId property: The server Active Directory Administrator tenant id.
+ *
+ * @return the tenantId value.
+ */
+ public UUID tenantId() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerAdministratorProperties();
+ }
+ this.innerProperties().withTenantId(tenantId);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/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 87b5f685dacc..a25d550ad268 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
@@ -6,26 +6,29 @@
import com.azure.core.annotation.Fluent;
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.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.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.SslEnforcementEnum;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageProfile;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
+import java.util.List;
import java.util.Map;
/** Represents a server. */
@Fluent
public final class ServerInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerInner.class);
+ /*
+ * The Azure Active Directory identity of the server.
+ */
+ @JsonProperty(value = "identity")
+ private ResourceIdentity identity;
/*
* The SKU (pricing tier) of the server.
@@ -39,11 +42,29 @@ public final class ServerInner extends Resource {
@JsonProperty(value = "properties")
private ServerProperties innerProperties;
- /*
- * The system metadata relating to this resource.
+ /** Creates an instance of ServerInner class. */
+ public ServerInner() {
+ }
+
+ /**
+ * Get the identity property: The Azure Active Directory identity of the server.
+ *
+ * @return the identity value.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
+ public ResourceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The Azure Active Directory identity of the server.
+ *
+ * @param identity the identity value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withIdentity(ResourceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
/**
* Get the sku property: The SKU (pricing tier) of the server.
@@ -74,15 +95,6 @@ private ServerProperties innerProperties() {
return this.innerProperties;
}
- /**
- * Get the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
/** {@inheritDoc} */
@Override
public ServerInner withLocation(String location) {
@@ -123,310 +135,300 @@ 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.innerProperties() == null ? null : this.innerProperties().administratorLoginPassword();
+ public ServerVersion version() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ public ServerInner withVersion(ServerVersion version) {
if (this.innerProperties() == null) {
this.innerProperties = new ServerProperties();
}
- this.innerProperties().withAdministratorLoginPassword(administratorLoginPassword);
+ this.innerProperties().withVersion(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.innerProperties() == null ? null : this.innerProperties().version();
+ public SslEnforcementEnum sslEnforcement() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ public ServerInner withSslEnforcement(SslEnforcementEnum sslEnforcement) {
if (this.innerProperties() == null) {
this.innerProperties = new ServerProperties();
}
- this.innerProperties().withVersion(version);
+ this.innerProperties().withSslEnforcement(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.innerProperties() == null ? null : this.innerProperties().minorVersion();
+ public MinimalTlsVersionEnum minimalTlsVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().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.innerProperties() == null ? null : this.innerProperties().state();
+ public ServerInner withMinimalTlsVersion(MinimalTlsVersionEnum minimalTlsVersion) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withMinimalTlsVersion(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.innerProperties() == null ? null : this.innerProperties().fullyQualifiedDomainName();
+ public String byokEnforcement() {
+ return this.innerProperties() == null ? null : this.innerProperties().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.innerProperties() == null ? null : this.innerProperties().storage();
+ public InfrastructureEncryption infrastructureEncryption() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ public ServerInner withInfrastructureEncryption(InfrastructureEncryption infrastructureEncryption) {
if (this.innerProperties() == null) {
this.innerProperties = new ServerProperties();
}
- this.innerProperties().withStorage(storage);
+ this.innerProperties().withInfrastructureEncryption(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.innerProperties() == null ? null : this.innerProperties().backup();
+ public ServerState userVisibleState() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ public ServerInner withUserVisibleState(ServerState userVisibleState) {
if (this.innerProperties() == null) {
this.innerProperties = new ServerProperties();
}
- this.innerProperties().withBackup(backup);
+ this.innerProperties().withUserVisibleState(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.innerProperties() == null ? null : this.innerProperties().network();
+ public String fullyQualifiedDomainName() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ public ServerInner withFullyQualifiedDomainName(String fullyQualifiedDomainName) {
if (this.innerProperties() == null) {
this.innerProperties = new ServerProperties();
}
- this.innerProperties().withNetwork(network);
+ this.innerProperties().withFullyQualifiedDomainName(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.innerProperties() == null ? null : this.innerProperties().highAvailability();
+ public OffsetDateTime earliestRestoreDate() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ public ServerInner withEarliestRestoreDate(OffsetDateTime earliestRestoreDate) {
if (this.innerProperties() == null) {
this.innerProperties = new ServerProperties();
}
- this.innerProperties().withHighAvailability(highAvailability);
+ this.innerProperties().withEarliestRestoreDate(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.innerProperties() == null ? null : this.innerProperties().maintenanceWindow();
+ public StorageProfile storageProfile() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ public ServerInner withStorageProfile(StorageProfile storageProfile) {
if (this.innerProperties() == null) {
this.innerProperties = new ServerProperties();
}
- this.innerProperties().withMaintenanceWindow(maintenanceWindow);
+ this.innerProperties().withStorageProfile(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.innerProperties() == null ? null : this.innerProperties().sourceServerResourceId();
+ public String replicationRole() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ public ServerInner withReplicationRole(String replicationRole) {
if (this.innerProperties() == null) {
this.innerProperties = new ServerProperties();
}
- this.innerProperties().withSourceServerResourceId(sourceServerResourceId);
+ this.innerProperties().withReplicationRole(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.innerProperties() == null ? null : this.innerProperties().pointInTimeUtc();
+ public String masterServerId() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ public ServerInner withMasterServerId(String masterServerId) {
if (this.innerProperties() == null) {
this.innerProperties = new ServerProperties();
}
- this.innerProperties().withPointInTimeUtc(pointInTimeUtc);
+ this.innerProperties().withMasterServerId(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.innerProperties() == null ? null : this.innerProperties().availabilityZone();
+ public Integer replicaCapacity() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ public ServerInner withReplicaCapacity(Integer replicaCapacity) {
if (this.innerProperties() == null) {
this.innerProperties = new ServerProperties();
}
- this.innerProperties().withAvailabilityZone(availabilityZone);
+ this.innerProperties().withReplicaCapacity(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.innerProperties() == null ? null : this.innerProperties().createMode();
+ public PublicNetworkAccessEnum publicNetworkAccess() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ public ServerInner withPublicNetworkAccess(PublicNetworkAccessEnum publicNetworkAccess) {
if (this.innerProperties() == null) {
this.innerProperties = new ServerProperties();
}
- this.innerProperties().withCreateMode(createMode);
+ this.innerProperties().withPublicNetworkAccess(publicNetworkAccess);
return this;
}
/**
- * Get the tags property: Application-specific metadata in the form of key-value pairs.
- *
- * @return the tags value.
- */
- public Map tagsPropertiesTags() {
- return this.innerProperties() == null ? null : this.innerProperties().tags();
- }
-
- /**
- * Set the tags property: Application-specific metadata in the form of key-value pairs.
+ * Get the privateEndpointConnections property: List of private endpoint connections on a server.
*
- * @param tags the tags value to set.
- * @return the ServerInner object itself.
+ * @return the privateEndpointConnections value.
*/
- public ServerInner withTagsPropertiesTags(Map tags) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ServerProperties();
- }
- this.innerProperties().withTags(tags);
- return this;
+ public List privateEndpointConnections() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections();
}
/**
@@ -435,6 +437,9 @@ public ServerInner withTagsPropertiesTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
if (sku() != null) {
sku().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..2636e19326d9
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerKeyInner.java
@@ -0,0 +1,115 @@
+// 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.management.ProxyResource;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerKeyType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** A PostgreSQL Server key. */
+@Fluent
+public final class ServerKeyInner extends ProxyResource {
+ /*
+ * Kind of encryption protector used to protect the key.
+ */
+ @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY)
+ private String kind;
+
+ /*
+ * Properties of the ServerKey Resource.
+ */
+ @JsonProperty(value = "properties")
+ private ServerKeyProperties innerProperties;
+
+ /** Creates an instance of ServerKeyInner class. */
+ public ServerKeyInner() {
+ }
+
+ /**
+ * 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 innerProperties property: Properties of the ServerKey Resource.
+ *
+ * @return the innerProperties value.
+ */
+ private ServerKeyProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the serverKeyType property: The key type like 'AzureKeyVault'.
+ *
+ * @return the serverKeyType value.
+ */
+ public ServerKeyType serverKeyType() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerKeyProperties();
+ }
+ this.innerProperties().withServerKeyType(serverKeyType);
+ return this;
+ }
+
+ /**
+ * Get the uri property: The URI of the key.
+ *
+ * @return the uri value.
+ */
+ public String uri() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerKeyProperties();
+ }
+ this.innerProperties().withUri(uri);
+ return this;
+ }
+
+ /**
+ * Get the creationDate property: The key creation date.
+ *
+ * @return the creationDate value.
+ */
+ public OffsetDateTime creationDate() {
+ return this.innerProperties() == null ? null : this.innerProperties().creationDate();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerKeyProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerKeyProperties.java
new file mode 100644
index 000000000000..bc2d02e3b385
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerKeyProperties.java
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerKeyType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Properties for a key execution. */
+@Fluent
+public final class ServerKeyProperties {
+ /*
+ * The key type like 'AzureKeyVault'.
+ */
+ @JsonProperty(value = "serverKeyType", required = true)
+ private ServerKeyType serverKeyType;
+
+ /*
+ * The URI of the key.
+ */
+ @JsonProperty(value = "uri")
+ private String uri;
+
+ /*
+ * The key creation date.
+ */
+ @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime creationDate;
+
+ /** Creates an instance of ServerKeyProperties class. */
+ public ServerKeyProperties() {
+ }
+
+ /**
+ * 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 ServerKeyProperties object itself.
+ */
+ public ServerKeyProperties 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 ServerKeyProperties object itself.
+ */
+ public ServerKeyProperties 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() {
+ if (serverKeyType() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property serverKeyType in model ServerKeyProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ServerKeyProperties.class);
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java
index 554c01900914..046175f257da 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java
@@ -5,125 +5,116 @@
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.Backup;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateMode;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability;
-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.ServerPrivateEndpointConnection;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerState;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.SslEnforcementEnum;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageProfile;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
-import java.util.Map;
+import java.util.List;
/** The properties of a server. */
@Fluent
public final class ServerProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerProperties.class);
-
/*
- * The administrator's login name of a server. Can only be specified when
- * the server is being created (and is required for creation).
+ * The administrator's login name of a server. Can only be specified when the server is being created (and is
+ * required for creation).
*/
@JsonProperty(value = "administratorLogin")
private String administratorLogin;
/*
- * The administrator login password (required for server creation).
- */
- @JsonProperty(value = "administratorLoginPassword")
- private String administratorLoginPassword;
-
- /*
- * PostgreSQL Server version.
+ * Server version.
*/
@JsonProperty(value = "version")
private ServerVersion version;
/*
- * The minor version of the server.
+ * Enable ssl enforcement or not when connect to server.
*/
- @JsonProperty(value = "minorVersion", access = JsonProperty.Access.WRITE_ONLY)
- private String minorVersion;
+ @JsonProperty(value = "sslEnforcement")
+ private SslEnforcementEnum sslEnforcement;
/*
- * A state of a server that is visible to user.
+ * Enforce a minimal Tls version for the server.
*/
- @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
- private ServerState state;
+ @JsonProperty(value = "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 = "fullyQualifiedDomainName", access = JsonProperty.Access.WRITE_ONLY)
- private String fullyQualifiedDomainName;
+ @JsonProperty(value = "byokEnforcement", access = JsonProperty.Access.WRITE_ONLY)
+ private String byokEnforcement;
/*
- * Storage properties of a server.
+ * Status showing whether the server enabled infrastructure encryption.
*/
- @JsonProperty(value = "storage")
- private Storage storage;
+ @JsonProperty(value = "infrastructureEncryption")
+ private InfrastructureEncryption infrastructureEncryption;
/*
- * Backup properties of a server.
+ * A state of a server that is visible to user.
*/
- @JsonProperty(value = "backup")
- private Backup backup;
+ @JsonProperty(value = "userVisibleState")
+ private ServerState userVisibleState;
/*
- * Network properties of a server.
+ * The fully qualified domain name of a server.
*/
- @JsonProperty(value = "network")
- private Network network;
+ @JsonProperty(value = "fullyQualifiedDomainName")
+ private String fullyQualifiedDomainName;
/*
- * High availability properties of a server.
+ * Earliest restore point creation time (ISO8601 format)
*/
- @JsonProperty(value = "highAvailability")
- private HighAvailability highAvailability;
+ @JsonProperty(value = "earliestRestoreDate")
+ private OffsetDateTime earliestRestoreDate;
/*
- * Maintenance window properties of a server.
+ * Storage profile of a server.
*/
- @JsonProperty(value = "maintenanceWindow")
- private MaintenanceWindow maintenanceWindow;
+ @JsonProperty(value = "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 = "sourceServerResourceId")
- private String sourceServerResourceId;
+ @JsonProperty(value = "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 = "pointInTimeUTC")
- private OffsetDateTime pointInTimeUtc;
+ @JsonProperty(value = "masterServerId")
+ private String masterServerId;
/*
- * availability zone information of the server.
+ * The maximum number of replicas that a master server can have.
*/
- @JsonProperty(value = "availabilityZone")
- private String availabilityZone;
+ @JsonProperty(value = "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 = "createMode")
- private CreateMode createMode;
+ @JsonProperty(value = "publicNetworkAccess")
+ private PublicNetworkAccessEnum publicNetworkAccess;
/*
- * Application-specific metadata in the form of key-value pairs.
+ * List of private endpoint connections on a server
*/
- @JsonProperty(value = "tags")
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
- private Map tags;
+ @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
+ private List privateEndpointConnections;
+
+ /** Creates an instance of ServerProperties class. */
+ public ServerProperties() {
+ }
/**
* Get the administratorLogin property: The administrator's login name of a server. Can only be specified when the
@@ -148,274 +139,264 @@ public ServerProperties 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 ServerProperties object itself.
*/
- public ServerProperties withAdministratorLoginPassword(String administratorLoginPassword) {
- this.administratorLoginPassword = administratorLoginPassword;
+ public ServerProperties 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 ServerProperties object itself.
*/
- public ServerProperties withVersion(ServerVersion version) {
- this.version = version;
+ public ServerProperties 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 ServerProperties object itself.
*/
- public ServerState state() {
- return this.state;
+ public ServerProperties 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 ServerProperties object itself.
*/
- public ServerProperties withStorage(Storage storage) {
- this.storage = storage;
+ public ServerProperties 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 ServerProperties object itself.
*/
- public ServerProperties withBackup(Backup backup) {
- this.backup = backup;
+ public ServerProperties 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 ServerProperties object itself.
*/
- public ServerProperties withNetwork(Network network) {
- this.network = network;
+ public ServerProperties 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 ServerProperties object itself.
*/
- public ServerProperties withHighAvailability(HighAvailability highAvailability) {
- this.highAvailability = highAvailability;
+ public ServerProperties 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 ServerProperties object itself.
*/
- public ServerProperties withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
- this.maintenanceWindow = maintenanceWindow;
+ public ServerProperties 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 ServerProperties object itself.
*/
- public ServerProperties withSourceServerResourceId(String sourceServerResourceId) {
- this.sourceServerResourceId = sourceServerResourceId;
+ public ServerProperties 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 ServerProperties object itself.
*/
- public ServerProperties withPointInTimeUtc(OffsetDateTime pointInTimeUtc) {
- this.pointInTimeUtc = pointInTimeUtc;
+ public ServerProperties 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 ServerProperties object itself.
*/
- public ServerProperties withAvailabilityZone(String availabilityZone) {
- this.availabilityZone = availabilityZone;
+ public ServerProperties 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 ServerProperties object itself.
*/
- public ServerProperties withCreateMode(CreateMode createMode) {
- this.createMode = createMode;
+ public ServerProperties withPublicNetworkAccess(PublicNetworkAccessEnum publicNetworkAccess) {
+ this.publicNetworkAccess = publicNetworkAccess;
return this;
}
/**
- * Get the tags property: Application-specific metadata in the form of key-value pairs.
+ * Get the privateEndpointConnections property: List of private endpoint connections on a server.
*
- * @return the tags value.
+ * @return the privateEndpointConnections value.
*/
- public Map tags() {
- return this.tags;
- }
-
- /**
- * Set the tags property: Application-specific metadata in the form of key-value pairs.
- *
- * @param tags the tags value to set.
- * @return the ServerProperties object itself.
- */
- public ServerProperties withTags(Map tags) {
- this.tags = tags;
- return this;
+ public List privateEndpointConnections() {
+ return this.privateEndpointConnections;
}
/**
@@ -424,20 +405,11 @@ public ServerProperties withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void 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/ServerPropertiesForUpdate.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java
deleted file mode 100644
index d2f6c87bfde0..000000000000
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java
+++ /dev/null
@@ -1,197 +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.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForUpdate;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** The ServerPropertiesForUpdate model. */
-@Fluent
-public final class ServerPropertiesForUpdate {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerPropertiesForUpdate.class);
-
- /*
- * The password of the administrator login.
- */
- @JsonProperty(value = "administratorLoginPassword")
- private String administratorLoginPassword;
-
- /*
- * Storage properties of a server.
- */
- @JsonProperty(value = "storage")
- private Storage storage;
-
- /*
- * Backup properties of a server.
- */
- @JsonProperty(value = "backup")
- private Backup backup;
-
- /*
- * High availability properties of a server.
- */
- @JsonProperty(value = "highAvailability")
- private HighAvailability highAvailability;
-
- /*
- * Maintenance window properties of a server.
- */
- @JsonProperty(value = "maintenanceWindow")
- private MaintenanceWindow maintenanceWindow;
-
- /*
- * The mode to update a new PostgreSQL server.
- */
- @JsonProperty(value = "createMode")
- private CreateModeForUpdate createMode;
-
- /**
- * Get the administratorLoginPassword property: The password of the administrator login.
- *
- * @return the administratorLoginPassword value.
- */
- public String administratorLoginPassword() {
- return this.administratorLoginPassword;
- }
-
- /**
- * Set the administratorLoginPassword property: The password of the administrator login.
- *
- * @param administratorLoginPassword the administratorLoginPassword value to set.
- * @return the ServerPropertiesForUpdate object itself.
- */
- public ServerPropertiesForUpdate withAdministratorLoginPassword(String administratorLoginPassword) {
- this.administratorLoginPassword = administratorLoginPassword;
- return this;
- }
-
- /**
- * Get the storage property: Storage properties of a server.
- *
- * @return the storage value.
- */
- public Storage storage() {
- return this.storage;
- }
-
- /**
- * Set the storage property: Storage properties of a server.
- *
- * @param storage the storage value to set.
- * @return the ServerPropertiesForUpdate object itself.
- */
- public ServerPropertiesForUpdate withStorage(Storage storage) {
- this.storage = storage;
- return this;
- }
-
- /**
- * Get the backup property: Backup properties of a server.
- *
- * @return the backup value.
- */
- public Backup backup() {
- return this.backup;
- }
-
- /**
- * Set the backup property: Backup properties of a server.
- *
- * @param backup the backup value to set.
- * @return the ServerPropertiesForUpdate object itself.
- */
- public ServerPropertiesForUpdate withBackup(Backup backup) {
- this.backup = backup;
- return this;
- }
-
- /**
- * Get the highAvailability property: High availability properties of a server.
- *
- * @return the highAvailability value.
- */
- public HighAvailability highAvailability() {
- return this.highAvailability;
- }
-
- /**
- * Set the highAvailability property: High availability properties of a server.
- *
- * @param highAvailability the highAvailability value to set.
- * @return the ServerPropertiesForUpdate object itself.
- */
- public ServerPropertiesForUpdate withHighAvailability(HighAvailability highAvailability) {
- this.highAvailability = highAvailability;
- return this;
- }
-
- /**
- * Get the maintenanceWindow property: Maintenance window properties of a server.
- *
- * @return the maintenanceWindow value.
- */
- public MaintenanceWindow maintenanceWindow() {
- return this.maintenanceWindow;
- }
-
- /**
- * Set the maintenanceWindow property: Maintenance window properties of a server.
- *
- * @param maintenanceWindow the maintenanceWindow value to set.
- * @return the ServerPropertiesForUpdate object itself.
- */
- public ServerPropertiesForUpdate withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
- this.maintenanceWindow = maintenanceWindow;
- return this;
- }
-
- /**
- * Get the createMode property: The mode to update a new PostgreSQL server.
- *
- * @return the createMode value.
- */
- public CreateModeForUpdate createMode() {
- return this.createMode;
- }
-
- /**
- * Set the createMode property: The mode to update a new PostgreSQL server.
- *
- * @param createMode the createMode value to set.
- * @return the ServerPropertiesForUpdate object itself.
- */
- public ServerPropertiesForUpdate withCreateMode(CreateModeForUpdate createMode) {
- this.createMode = createMode;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (storage() != null) {
- storage().validate();
- }
- if (backup() != null) {
- backup().validate();
- }
- if (highAvailability() != null) {
- highAvailability().validate();
- }
- if (maintenanceWindow() != null) {
- maintenanceWindow().validate();
- }
- }
-}
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..b8e2914a345c
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerSecurityAlertPolicyInner.java
@@ -0,0 +1,212 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerSecurityAlertPolicyState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A server security alert policy. */
+@Fluent
+public final class ServerSecurityAlertPolicyInner extends ProxyResource {
+ /*
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private SecurityAlertPolicyProperties innerProperties;
+
+ /** Creates an instance of ServerSecurityAlertPolicyInner class. */
+ public ServerSecurityAlertPolicyInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private SecurityAlertPolicyProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * 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.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SecurityAlertPolicyProperties();
+ }
+ this.innerProperties().withState(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.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SecurityAlertPolicyProperties();
+ }
+ this.innerProperties().withDisabledAlerts(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.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SecurityAlertPolicyProperties();
+ }
+ this.innerProperties().withEmailAddresses(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.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SecurityAlertPolicyProperties();
+ }
+ this.innerProperties().withEmailAccountAdmins(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.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SecurityAlertPolicyProperties();
+ }
+ this.innerProperties().withStorageEndpoint(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.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SecurityAlertPolicyProperties();
+ }
+ this.innerProperties().withStorageAccountAccessKey(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.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SecurityAlertPolicyProperties();
+ }
+ this.innerProperties().withRetentionDays(retentionDays);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerUpdateParametersProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerUpdateParametersProperties.java
new file mode 100644
index 000000000000..96e0431f277d
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerUpdateParametersProperties.java
@@ -0,0 +1,217 @@
+// 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.resourcemanager.postgresqlflexibleserver.models.MinimalTlsVersionEnum;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.PublicNetworkAccessEnum;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.SslEnforcementEnum;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageProfile;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties that can be updated for a server. */
+@Fluent
+public final class ServerUpdateParametersProperties {
+ /*
+ * Storage profile of a server.
+ */
+ @JsonProperty(value = "storageProfile")
+ private StorageProfile storageProfile;
+
+ /*
+ * The password of the administrator login.
+ */
+ @JsonProperty(value = "administratorLoginPassword")
+ private String administratorLoginPassword;
+
+ /*
+ * The version of a server.
+ */
+ @JsonProperty(value = "version")
+ private ServerVersion version;
+
+ /*
+ * Enable ssl enforcement or not when connect to server.
+ */
+ @JsonProperty(value = "sslEnforcement")
+ private SslEnforcementEnum sslEnforcement;
+
+ /*
+ * Enforce a minimal Tls version for the server.
+ */
+ @JsonProperty(value = "minimalTlsVersion")
+ private MinimalTlsVersionEnum minimalTlsVersion;
+
+ /*
+ * 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 = "publicNetworkAccess")
+ private PublicNetworkAccessEnum publicNetworkAccess;
+
+ /*
+ * The replication role of the server.
+ */
+ @JsonProperty(value = "replicationRole")
+ private String replicationRole;
+
+ /** Creates an instance of ServerUpdateParametersProperties class. */
+ public ServerUpdateParametersProperties() {
+ }
+
+ /**
+ * Get the storageProfile property: Storage profile of a server.
+ *
+ * @return the storageProfile value.
+ */
+ public StorageProfile storageProfile() {
+ return this.storageProfile;
+ }
+
+ /**
+ * Set the storageProfile property: Storage profile of a server.
+ *
+ * @param storageProfile the storageProfile value to set.
+ * @return the ServerUpdateParametersProperties object itself.
+ */
+ public ServerUpdateParametersProperties withStorageProfile(StorageProfile storageProfile) {
+ this.storageProfile = storageProfile;
+ return this;
+ }
+
+ /**
+ * Get the administratorLoginPassword property: The password of the administrator login.
+ *
+ * @return the administratorLoginPassword value.
+ */
+ public String administratorLoginPassword() {
+ return this.administratorLoginPassword;
+ }
+
+ /**
+ * Set the administratorLoginPassword property: The password of the administrator login.
+ *
+ * @param administratorLoginPassword the administratorLoginPassword value to set.
+ * @return the ServerUpdateParametersProperties object itself.
+ */
+ public ServerUpdateParametersProperties withAdministratorLoginPassword(String administratorLoginPassword) {
+ this.administratorLoginPassword = administratorLoginPassword;
+ return this;
+ }
+
+ /**
+ * Get the version property: The version of a server.
+ *
+ * @return the version value.
+ */
+ public ServerVersion version() {
+ return this.version;
+ }
+
+ /**
+ * Set the version property: The version of a server.
+ *
+ * @param version the version value to set.
+ * @return the ServerUpdateParametersProperties object itself.
+ */
+ public ServerUpdateParametersProperties withVersion(ServerVersion version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Get the sslEnforcement property: Enable ssl enforcement or not when connect to server.
+ *
+ * @return the sslEnforcement value.
+ */
+ public SslEnforcementEnum sslEnforcement() {
+ return this.sslEnforcement;
+ }
+
+ /**
+ * Set the sslEnforcement property: Enable ssl enforcement or not when connect to server.
+ *
+ * @param sslEnforcement the sslEnforcement value to set.
+ * @return the ServerUpdateParametersProperties object itself.
+ */
+ public ServerUpdateParametersProperties withSslEnforcement(SslEnforcementEnum sslEnforcement) {
+ this.sslEnforcement = sslEnforcement;
+ return this;
+ }
+
+ /**
+ * Get the minimalTlsVersion property: Enforce a minimal Tls version for the server.
+ *
+ * @return the minimalTlsVersion value.
+ */
+ public MinimalTlsVersionEnum minimalTlsVersion() {
+ return this.minimalTlsVersion;
+ }
+
+ /**
+ * Set the minimalTlsVersion property: Enforce a minimal Tls version for the server.
+ *
+ * @param minimalTlsVersion the minimalTlsVersion value to set.
+ * @return the ServerUpdateParametersProperties object itself.
+ */
+ public ServerUpdateParametersProperties withMinimalTlsVersion(MinimalTlsVersionEnum minimalTlsVersion) {
+ this.minimalTlsVersion = minimalTlsVersion;
+ return this;
+ }
+
+ /**
+ * 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 publicNetworkAccess value.
+ */
+ public PublicNetworkAccessEnum publicNetworkAccess() {
+ return this.publicNetworkAccess;
+ }
+
+ /**
+ * 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 publicNetworkAccess the publicNetworkAccess value to set.
+ * @return the ServerUpdateParametersProperties object itself.
+ */
+ public ServerUpdateParametersProperties withPublicNetworkAccess(PublicNetworkAccessEnum publicNetworkAccess) {
+ this.publicNetworkAccess = publicNetworkAccess;
+ return this;
+ }
+
+ /**
+ * Get the replicationRole property: The replication role of the server.
+ *
+ * @return the replicationRole value.
+ */
+ public String replicationRole() {
+ return this.replicationRole;
+ }
+
+ /**
+ * Set the replicationRole property: The replication role of the server.
+ *
+ * @param replicationRole the replicationRole value to set.
+ * @return the ServerUpdateParametersProperties object itself.
+ */
+ public ServerUpdateParametersProperties withReplicationRole(String replicationRole) {
+ this.replicationRole = replicationRole;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (storageProfile() != null) {
+ storageProfile().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..80dde2ae7565
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkRuleInner.java
@@ -0,0 +1,101 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkRuleState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A virtual network rule. */
+@Fluent
+public final class VirtualNetworkRuleInner extends ProxyResource {
+ /*
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private VirtualNetworkRuleProperties innerProperties;
+
+ /** Creates an instance of VirtualNetworkRuleInner class. */
+ public VirtualNetworkRuleInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private VirtualNetworkRuleProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the virtualNetworkSubnetId property: The ARM resource id of the virtual network subnet.
+ *
+ * @return the virtualNetworkSubnetId value.
+ */
+ public String virtualNetworkSubnetId() {
+ return this.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualNetworkRuleProperties();
+ }
+ this.innerProperties().withVirtualNetworkSubnetId(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.innerProperties() == null ? null : this.innerProperties().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) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualNetworkRuleProperties();
+ }
+ this.innerProperties().withIgnoreMissingVnetServiceEndpoint(ignoreMissingVnetServiceEndpoint);
+ return this;
+ }
+
+ /**
+ * Get the state property: Virtual Network Rule State.
+ *
+ * @return the state value.
+ */
+ public VirtualNetworkRuleState state() {
+ return this.innerProperties() == null ? null : this.innerProperties().state();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkRuleProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkRuleProperties.java
new file mode 100644
index 000000000000..9152b7581f58
--- /dev/null
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkRuleProperties.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.util.logging.ClientLogger;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkRuleState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of a virtual network rule. */
+@Fluent
+public final class VirtualNetworkRuleProperties {
+ /*
+ * The ARM resource id of the virtual network subnet.
+ */
+ @JsonProperty(value = "virtualNetworkSubnetId", required = true)
+ private String virtualNetworkSubnetId;
+
+ /*
+ * Create firewall rule before the virtual network has vnet service endpoint enabled.
+ */
+ @JsonProperty(value = "ignoreMissingVnetServiceEndpoint")
+ private Boolean ignoreMissingVnetServiceEndpoint;
+
+ /*
+ * Virtual Network Rule State
+ */
+ @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
+ private VirtualNetworkRuleState state;
+
+ /** Creates an instance of VirtualNetworkRuleProperties class. */
+ public VirtualNetworkRuleProperties() {
+ }
+
+ /**
+ * 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 VirtualNetworkRuleProperties object itself.
+ */
+ public VirtualNetworkRuleProperties 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 VirtualNetworkRuleProperties object itself.
+ */
+ public VirtualNetworkRuleProperties 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() {
+ if (virtualNetworkSubnetId() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property virtualNetworkSubnetId in model VirtualNetworkRuleProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkRuleProperties.class);
+}
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/VirtualNetworkSubnetUsageResultInner.java
deleted file mode 100644
index 17d0e45dc47c..000000000000
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java
+++ /dev/null
@@ -1,44 +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.DelegatedSubnetUsage;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/** Virtual network subnet usage data. */
-@Immutable
-public final class VirtualNetworkSubnetUsageResultInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkSubnetUsageResultInner.class);
-
- /*
- * The delegatedSubnetsUsage property.
- */
- @JsonProperty(value = "delegatedSubnetsUsage", access = JsonProperty.Access.WRITE_ONLY)
- private List delegatedSubnetsUsage;
-
- /**
- * Get the delegatedSubnetsUsage property: The delegatedSubnetsUsage property.
- *
- * @return the delegatedSubnetsUsage value.
- */
- public List delegatedSubnetsUsage() {
- return this.delegatedSubnetsUsage;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (delegatedSubnetsUsage() != null) {
- delegatedSubnetsUsage().forEach(e -> e.validate());
- }
- }
-}
diff --git a/sdk/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 ed9b5cfdcbc8..fd02df45d8cc 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
@@ -22,7 +22,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CheckNameAvailabilitiesClient;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner;
import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailabilityRequest;
@@ -30,8 +29,6 @@
/** An instance of this class provides access to all the operations defined in CheckNameAvailabilitiesClient. */
public final class CheckNameAvailabilitiesClientImpl implements CheckNameAvailabilitiesClient {
- private final ClientLogger logger = new ClientLogger(CheckNameAvailabilitiesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final CheckNameAvailabilitiesService service;
@@ -56,7 +53,7 @@ public final class CheckNameAvailabilitiesClientImpl implements CheckNameAvailab
*/
@Host("{$host}")
@ServiceInterface(name = "PostgreSqlManagement")
- private interface CheckNameAvailabilitiesService {
+ public interface CheckNameAvailabilitiesService {
@Headers({"Content-Type: application/json"})
@Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability")
@ExpectedResponses({200})
@@ -77,7 +74,8 @@ Mono> execute(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a resource name availability.
+ * @return represents a resource name availability along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> executeWithResponseAsync(
@@ -101,6 +99,7 @@ private Mono> executeWithResponseAsync(
} else {
nameAvailabilityRequest.validate();
}
+ final String apiVersion = "2017-12-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -108,7 +107,7 @@ private Mono> executeWithResponseAsync(
service
.execute(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
nameAvailabilityRequest,
accept,
@@ -124,7 +123,8 @@ private Mono> executeWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a resource name availability.
+ * @return represents a resource name availability along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> executeWithResponseAsync(
@@ -148,12 +148,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,
@@ -167,48 +168,40 @@ private Mono> executeWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a resource name availability.
+ * @return represents a resource name availability on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono executeAsync(NameAvailabilityRequest nameAvailabilityRequest) {
- return executeWithResponseAsync(nameAvailabilityRequest)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ return executeWithResponseAsync(nameAvailabilityRequest).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
* Check the availability of name for resource.
*
* @param nameAvailabilityRequest The required parameters for checking if resource name is available.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a resource name availability.
+ * @return represents a resource name availability along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public NameAvailabilityInner execute(NameAvailabilityRequest nameAvailabilityRequest) {
- return executeAsync(nameAvailabilityRequest).block();
+ public Response executeWithResponse(
+ NameAvailabilityRequest nameAvailabilityRequest, Context context) {
+ return executeWithResponseAsync(nameAvailabilityRequest, context).block();
}
/**
* Check the availability of name for resource.
*
* @param nameAvailabilityRequest The required parameters for checking if resource name is available.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return represents a resource name availability.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response executeWithResponse(
- NameAvailabilityRequest nameAvailabilityRequest, Context context) {
- return executeWithResponseAsync(nameAvailabilityRequest, context).block();
+ public NameAvailabilityInner execute(NameAvailabilityRequest nameAvailabilityRequest) {
+ return executeWithResponse(nameAvailabilityRequest, Context.NONE).getValue();
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java
index 1e167d912a45..7cb164f9b7bc 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java
@@ -13,10 +13,9 @@
import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilities;
import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailability;
import com.azure.resourcemanager.postgresqlflexibleserver.models.NameAvailabilityRequest;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class CheckNameAvailabilitiesImpl implements CheckNameAvailabilities {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilitiesImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(CheckNameAvailabilitiesImpl.class);
private final CheckNameAvailabilitiesClient innerClient;
@@ -29,15 +28,6 @@ public CheckNameAvailabilitiesImpl(
this.serviceManager = serviceManager;
}
- public NameAvailability execute(NameAvailabilityRequest nameAvailabilityRequest) {
- NameAvailabilityInner inner = this.serviceClient().execute(nameAvailabilityRequest);
- if (inner != null) {
- return new NameAvailabilityImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
public Response executeWithResponse(
NameAvailabilityRequest nameAvailabilityRequest, Context context) {
Response inner =
@@ -53,6 +43,15 @@ public Response executeWithResponse(
}
}
+ public NameAvailability execute(NameAvailabilityRequest nameAvailabilityRequest) {
+ NameAvailabilityInner inner = this.serviceClient().execute(nameAvailabilityRequest);
+ if (inner != null) {
+ return new NameAvailabilityImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
private CheckNameAvailabilitiesClient serviceClient() {
return this.innerClient;
}
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..47c60c431795 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();
}
@@ -55,6 +49,10 @@ public String source() {
return this.innerModel().source();
}
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
public ConfigurationInner innerModel() {
return this.innerObject;
}
@@ -69,7 +67,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 +78,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 +87,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 +107,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 +116,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 +126,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 0c2b3fdb9302..974d43fc3411 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;
@@ -29,20 +28,17 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
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;
/** An instance of this class provides access to all the operations defined in ConfigurationsClient. */
public final class ConfigurationsClientImpl implements ConfigurationsClient {
- private final ClientLogger logger = new ClientLogger(ConfigurationsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final ConfigurationsService service;
@@ -66,26 +62,28 @@ public final class ConfigurationsClientImpl implements ConfigurationsClient {
*/
@Host("{$host}")
@ServiceInterface(name = "PostgreSqlManagement")
- private interface ConfigurationsService {
+ public interface ConfigurationsService {
@Headers({"Content-Type: application/json"})
- @Get(
+ @Put(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
- + "/flexibleServers/{serverName}/configurations")
- @ExpectedResponses({200})
+ + "/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}")
+ + "/servers/{serverName}/configurations/{configurationName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> get(
@@ -99,392 +97,19 @@ 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(
+ @Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL"
- + "/flexibleServers/{serverName}/configurations/{configurationName}")
- @ExpectedResponses({200, 202})
+ + "/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.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of server configurations.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByServerSinglePageAsync(
- String resourceGroupName, String serverName) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (serverName == null) {
- return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .listByServer(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- serverName,
- accept,
- context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * List all the 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 ManagementException 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> listByServerSinglePageAsync(
- String resourceGroupName, String serverName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (serverName == null) {
- return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByServer(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- serverName,
- accept,
- context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
- }
-
- /**
- * List all the 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 ManagementException 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)
- private PagedFlux listByServerAsync(String resourceGroupName, String serverName) {
- return new PagedFlux<>(
- () -> listByServerSinglePageAsync(resourceGroupName, serverName),
- nextLink -> listByServerNextSinglePageAsync(nextLink));
- }
-
- /**
- * 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 ManagementException 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)
- private PagedFlux listByServerAsync(
- String resourceGroupName, String serverName, Context context) {
- return new PagedFlux<>(
- () -> listByServerSinglePageAsync(resourceGroupName, serverName, context),
- nextLink -> listByServerNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * 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 ManagementException 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)
- public PagedIterable listByServer(String resourceGroupName, String serverName) {
- return new PagedIterable<>(listByServerAsync(resourceGroupName, 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 ManagementException 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)
- public PagedIterable listByServer(
- String resourceGroupName, String serverName, Context context) {
- return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, 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 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)
- private Mono> getWithResponseAsync(
- String resourceGroupName, String serverName, String configurationName) {
- 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."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .get(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- serverName,
- configurationName,
- accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * 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 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)
- private Mono> getWithResponseAsync(
- String resourceGroupName, String serverName, String configurationName, 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."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .get(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- serverName,
- configurationName,
- accept,
- 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 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)
- private Mono getAsync(String resourceGroupName, String serverName, String configurationName) {
- return getWithResponseAsync(resourceGroupName, serverName, configurationName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
- }
-
- /**
- * 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 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)
- public ConfigurationInner get(String resourceGroupName, String serverName, String configurationName) {
- return getAsync(resourceGroupName, serverName, configurationName).block();
- }
-
- /**
- * 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 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)
- public Response getWithResponse(
- String resourceGroupName, String serverName, String configurationName, Context context) {
- return getWithResponseAsync(resourceGroupName, serverName, configurationName, context).block();
}
/**
@@ -497,10 +122,10 @@ public Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 represents a Configuration along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(
+ private Mono>> createOrUpdateWithResponseAsync(
String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -530,14 +155,15 @@ private Mono>> updateWithResponseAsync(
} else {
parameters.validate();
}
+ final String apiVersion = "2017-12-01";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
- .update(
+ .createOrUpdate(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -559,10 +185,10 @@ private Mono>> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 represents a Configuration along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(
+ private Mono>> createOrUpdateWithResponseAsync(
String resourceGroupName,
String serverName,
String configurationName,
@@ -596,12 +222,13 @@ private Mono>> updateWithResponseAsync(
} else {
parameters.validate();
}
+ final String apiVersion = "2017-12-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .update(
+ .createOrUpdate(
this.client.getEndpoint(),
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
resourceGroupName,
serverName,
@@ -621,17 +248,21 @@ private Mono>> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 the {@link PollerFlux} for polling of represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, ConfigurationInner> beginUpdateAsync(
+ private PollerFlux, ConfigurationInner> beginCreateOrUpdateAsync(
String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
Mono>> mono =
- updateWithResponseAsync(resourceGroupName, serverName, configurationName, parameters);
+ createOrUpdateWithResponseAsync(resourceGroupName, serverName, configurationName, parameters);
return this
.client
.getLroResult(
- mono, this.client.getHttpPipeline(), ConfigurationInner.class, ConfigurationInner.class, Context.NONE);
+ mono,
+ this.client.getHttpPipeline(),
+ ConfigurationInner.class,
+ ConfigurationInner.class,
+ this.client.getContext());
}
/**
@@ -645,10 +276,10 @@ private PollerFlux, ConfigurationInner> beginUpda
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 the {@link PollerFlux} for polling of represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, ConfigurationInner> beginUpdateAsync(
+ private PollerFlux, ConfigurationInner> beginCreateOrUpdateAsync(
String resourceGroupName,
String serverName,
String configurationName,
@@ -656,7 +287,7 @@ private PollerFlux, ConfigurationInner> beginUpda
Context context) {
context = this.client.mergeContext(context);
Mono>> mono =
- updateWithResponseAsync(resourceGroupName, serverName, configurationName, parameters, context);
+ createOrUpdateWithResponseAsync(resourceGroupName, serverName, configurationName, parameters, context);
return this
.client
.getLroResult(
@@ -673,12 +304,12 @@ private PollerFlux, ConfigurationInner> beginUpda
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 the {@link SyncPoller} for polling of represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, ConfigurationInner> beginUpdate(
+ public SyncPoller, ConfigurationInner> beginCreateOrUpdate(
String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
- return beginUpdateAsync(resourceGroupName, serverName, configurationName, parameters).getSyncPoller();
+ return beginCreateOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters).getSyncPoller();
}
/**
@@ -692,16 +323,17 @@ public SyncPoller, ConfigurationInner> beginUpdat
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 the {@link SyncPoller} for polling of represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, ConfigurationInner> beginUpdate(
+ public SyncPoller