Skip to content

Commit

Permalink
[Automation] Generate Fluent Lite from postgresql#package-flexibleser…
Browse files Browse the repository at this point in the history
…ver-2023-12-01-preview (#39780)

* [Automation] Generate Fluent Lite from postgresql#package-flexibleserver-2023-12-01-preview

* Delete sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ResourceProvidersCheckMigrationNameAvailabilityWithResponseMockTests.java

---------

Co-authored-by: Weidong Xu <weidxu@microsoft.com>
  • Loading branch information
azure-sdk and weidongxu-microsoft committed Apr 18, 2024
1 parent b630b6c commit 5e6266a
Show file tree
Hide file tree
Showing 222 changed files with 2,950 additions and 2,767 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
# Release History

## 1.1.0-beta.3 (Unreleased)
## 1.1.0-beta.3 (2024-04-18)

- Azure Resource Manager PostgreSql client library for Java. This package contains Microsoft Azure SDK for PostgreSql Management SDK. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2023-12-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

### Breaking Changes
* `models.MigrateRolesEnum` was added

#### `models.MigrationResource$Definition` was modified

* `withMigrateRoles(models.MigrateRolesEnum)` was added
* `withMigrationInstanceResourceId(java.lang.String)` was added

#### `models.MigrationResourceForPatch` was modified

* `migrateRoles()` was added
* `withMigrateRoles(models.MigrateRolesEnum)` was added

#### `models.MigrationResource$Update` was modified

* `withMigrateRoles(models.MigrateRolesEnum)` was added

### Bugs Fixed
#### `models.MigrationResource` was modified

### Other Changes
* `migrateRoles()` was added
* `migrationInstanceResourceId()` was added

## 1.1.0-beta.2 (2024-01-22)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager PostgreSql client library for Java.

This package contains Microsoft Azure SDK for PostgreSql Management SDK. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2023-06-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for PostgreSql Management SDK. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2023-12-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-postgresqlflexibleserver</artifactId>
<version>1.1.0-beta.2</version>
<version>1.1.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for PostgreSql Management</name>
<description>This package contains Microsoft Azure SDK for PostgreSql Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2023-06-01-preview.</description>
<description>This package contains Microsoft Azure SDK for PostgreSql Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2023-12-01-preview.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down Expand Up @@ -82,6 +82,12 @@
<version>5.9.3</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-engine;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version> <!-- {x-version-update;org.slf4j:slf4j-simple;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand All @@ -100,12 +106,6 @@
<version>1.14.12</version> <!-- {x-version-update;testdep_net.bytebuddy:byte-buddy-agent;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version> <!-- {x-version-update;org.slf4j:slf4j-simple;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-resources</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
Expand Down Expand Up @@ -46,8 +46,8 @@
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ReplicasImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ResourceProvidersImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerCapabilitiesImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerThreatProtectionSettingsImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServersImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerThreatProtectionSettingsImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.VirtualEndpointsImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.VirtualNetworkSubnetUsagesImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Administrators;
Expand All @@ -71,8 +71,8 @@
import com.azure.resourcemanager.postgresqlflexibleserver.models.Replicas;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ResourceProviders;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerCapabilities;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettings;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Servers;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerThreatProtectionSettings;
import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoints;
import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsages;
import java.time.Duration;
Expand Down Expand Up @@ -145,8 +145,10 @@ private PostgreSqlManager(HttpPipeline httpPipeline, AzureProfile profile, Durat
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
this.clientObject = new PostgreSqlManagementClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval).buildClient();
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
.buildClient();
}

/**
Expand Down Expand Up @@ -297,12 +299,19 @@ public PostgreSqlManager authenticate(TokenCredential credential, AzureProfile p
Objects.requireNonNull(profile, "'profile' cannot be null.");

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java").append("-")
.append("com.azure.resourcemanager.postgresqlflexibleserver").append("/").append("1.1.0-beta.2");
userAgentBuilder.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.postgresqlflexibleserver")
.append("/")
.append("1.1.0-beta.3");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ")
.append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)");
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.name"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.version"))
.append("; auto-generated)");
} else {
userAgentBuilder.append(" (auto-generated)");
}
Expand All @@ -321,18 +330,21 @@ public PostgreSqlManager authenticate(TokenCredential credential, AzureProfile p
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)
policies.addAll(this.policies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
.collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList()));
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
.policies(policies.toArray(new HttpPipelinePolicy[0])).build();
.policies(policies.toArray(new HttpPipelinePolicy[0]))
.build();
return new PostgreSqlManager(httpPipeline, profile, defaultPollInterval);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
import reactor.core.publisher.Mono;

/**
* An instance of this class provides access to all the operations defined in
* PrivateEndpointConnectionOperationsClient.
* An instance of this class provides access to all the operations defined in PrivateEndpointConnectionOperationsClient.
*/
public interface PrivateEndpointConnectionOperationsClient {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ public ActiveDirectoryAdministratorInner withTenantId(String tenantId) {
*/
public void validate() {
if (innerProperties() == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
"Missing required property innerProperties in model ActiveDirectoryAdministratorInner"));
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property innerProperties in model ActiveDirectoryAdministratorInner"));
} else {
innerProperties().validate();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ public FirewallRuleInner withEndIpAddress(String endIpAddress) {
*/
public void validate() {
if (innerProperties() == null) {
throw LOGGER.logExceptionAsError(
new IllegalArgumentException("Missing required property innerProperties in model FirewallRuleInner"));
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property innerProperties in model FirewallRuleInner"));
} else {
innerProperties().validate();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,14 @@ public FirewallRuleProperties withEndIpAddress(String endIpAddress) {
*/
public void validate() {
if (startIpAddress() == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
"Missing required property startIpAddress in model FirewallRuleProperties"));
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property startIpAddress in model FirewallRuleProperties"));
}
if (endIpAddress() == null) {
throw LOGGER.logExceptionAsError(
new IllegalArgumentException("Missing required property endIpAddress in model FirewallRuleProperties"));
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property endIpAddress in model FirewallRuleProperties"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ public final class FlexibleServerCapabilityInner extends CapabilityBase {
private List<ServerVersionCapability> supportedServerVersions;

/*
* Gets a value indicating whether fast provisioning is supported. "Enabled" means fast provisioning is supported.
* "Disabled" stands for fast provisioning is not supported.
* Gets a value indicating whether fast provisioning is supported. "Enabled" means fast provisioning is supported. "Disabled" stands for fast provisioning is not supported.
*/
@JsonProperty(value = "fastProvisioningSupported", access = JsonProperty.Access.WRITE_ONLY)
private FastProvisioningSupportedEnum fastProvisioningSupported;
Expand All @@ -56,44 +55,37 @@ public final class FlexibleServerCapabilityInner extends CapabilityBase {
private List<FastProvisioningEditionCapability> supportedFastProvisioningEditions;

/*
* Determines if geo-backup is supported in this region. "Enabled" means geo-backup is supported. "Disabled" stands
* for geo-back is not supported.
* Determines if geo-backup is supported in this region. "Enabled" means geo-backup is supported. "Disabled" stands for geo-back is not supported.
*/
@JsonProperty(value = "geoBackupSupported", access = JsonProperty.Access.WRITE_ONLY)
private GeoBackupSupportedEnum geoBackupSupported;

/*
* A value indicating whether Zone Redundant HA is supported in this region. "Enabled" means zone redundant HA is
* supported. "Disabled" stands for zone redundant HA is not supported.
* A value indicating whether Zone Redundant HA is supported in this region. "Enabled" means zone redundant HA is supported. "Disabled" stands for zone redundant HA is not supported.
*/
@JsonProperty(value = "zoneRedundantHaSupported", access = JsonProperty.Access.WRITE_ONLY)
private ZoneRedundantHaSupportedEnum zoneRedundantHaSupported;

/*
* A value indicating whether Zone Redundant HA and Geo-backup is supported in this region. "Enabled" means zone
* redundant HA and geo-backup is supported. "Disabled" stands for zone redundant HA and geo-backup is not
* supported.
* A value indicating whether Zone Redundant HA and Geo-backup is supported in this region. "Enabled" means zone redundant HA and geo-backup is supported. "Disabled" stands for zone redundant HA and geo-backup is not supported.
*/
@JsonProperty(value = "zoneRedundantHaAndGeoBackupSupported", access = JsonProperty.Access.WRITE_ONLY)
private ZoneRedundantHaAndGeoBackupSupportedEnum zoneRedundantHaAndGeoBackupSupported;

/*
* A value indicating whether storage auto-grow is supported in this region. "Enabled" means storage auto-grow is
* supported. "Disabled" stands for storage auto-grow is not supported.
* A value indicating whether storage auto-grow is supported in this region. "Enabled" means storage auto-grow is supported. "Disabled" stands for storage auto-grow is not supported.
*/
@JsonProperty(value = "storageAutoGrowthSupported", access = JsonProperty.Access.WRITE_ONLY)
private StorageAutoGrowthSupportedEnum storageAutoGrowthSupported;

/*
* A value indicating whether online resize is supported in this region for the given subscription. "Enabled" means
* storage online resize is supported. "Disabled" means storage online resize is not supported.
* A value indicating whether online resize is supported in this region for the given subscription. "Enabled" means storage online resize is supported. "Disabled" means storage online resize is not supported.
*/
@JsonProperty(value = "onlineResizeSupported", access = JsonProperty.Access.WRITE_ONLY)
private OnlineResizeSupportedEnum onlineResizeSupported;

/*
* A value indicating whether this region is restricted. "Enabled" means region is restricted. "Disabled" stands
* for region is not restricted.
* A value indicating whether this region is restricted. "Enabled" means region is restricted. "Disabled" stands for region is not restricted.
*/
@JsonProperty(value = "restricted", access = JsonProperty.Access.WRITE_ONLY)
private RestrictedEnum restricted;
Expand Down Expand Up @@ -173,8 +165,7 @@ public GeoBackupSupportedEnum geoBackupSupported() {

/**
* Get the zoneRedundantHaSupported property: A value indicating whether Zone Redundant HA is supported in this
* region. "Enabled" means zone redundant HA is supported. "Disabled" stands for zone redundant HA is not
* supported.
* region. "Enabled" means zone redundant HA is supported. "Disabled" stands for zone redundant HA is not supported.
*
* @return the zoneRedundantHaSupported value.
*/
Expand All @@ -184,8 +175,8 @@ public ZoneRedundantHaSupportedEnum zoneRedundantHaSupported() {

/**
* Get the zoneRedundantHaAndGeoBackupSupported property: A value indicating whether Zone Redundant HA and
* Geo-backup is supported in this region. "Enabled" means zone redundant HA and geo-backup is supported.
* "Disabled" stands for zone redundant HA and geo-backup is not supported.
* Geo-backup is supported in this region. "Enabled" means zone redundant HA and geo-backup is supported. "Disabled"
* stands for zone redundant HA and geo-backup is not supported.
*
* @return the zoneRedundantHaAndGeoBackupSupported value.
*/
Expand All @@ -195,8 +186,7 @@ public ZoneRedundantHaAndGeoBackupSupportedEnum zoneRedundantHaAndGeoBackupSuppo

/**
* Get the storageAutoGrowthSupported property: A value indicating whether storage auto-grow is supported in this
* region. "Enabled" means storage auto-grow is supported. "Disabled" stands for storage auto-grow is not
* supported.
* region. "Enabled" means storage auto-grow is supported. "Disabled" stands for storage auto-grow is not supported.
*
* @return the storageAutoGrowthSupported value.
*/
Expand Down
Loading

0 comments on commit 5e6266a

Please sign in to comment.