Skip to content

Commit 61a14e0

Browse files
authored
[Automation] Generate Fluent Lite from postgresql#package-flexibleserver-2022-12-01 (Azure#34531)
1 parent bf7ae0d commit 61a14e0

38 files changed

+1218
-170
lines changed

sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
# Release History
22

3-
## 1.0.0-beta.6 (Unreleased)
3+
## 1.0.0-beta.6 (2023-04-18)
44

5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
5+
- 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-2022-12-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
126

137
## 1.0.0-beta.5 (2023-01-11)
148

sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
3232
<dependency>
3333
<groupId>com.azure.resourcemanager</groupId>
3434
<artifactId>azure-resourcemanager-postgresqlflexibleserver</artifactId>
35-
<version>1.0.0-beta.5</version>
35+
<version>1.0.0-beta.6</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ public final class ServersCreateSamples {
757757
.withActiveDirectoryAuth(ActiveDirectoryAuthEnum.ENABLED)
758758
.withPasswordAuth(PasswordAuthEnum.ENABLED)
759759
.withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt"))
760-
.withDataEncryption(new DataEncryption().withType(ArmServerKeyType.fromString("SystemManaged")))
760+
.withDataEncryption(new DataEncryption().withType(ArmServerKeyType.SYSTEM_MANAGED))
761761
.withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeoRedundantBackupEnum.DISABLED))
762762
.withNetwork(
763763
new Network()

sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<!--
2+
~ Copyright (c) Microsoft Corporation. All rights reserved.
3+
~ Licensed under the MIT License.
4+
~ Code generated by Microsoft (R) AutoRest Code Generator.
5+
-->
16
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
27
<modelVersion>4.0.0</modelVersion>
38
<parent>
@@ -38,7 +43,8 @@
3843
</developers>
3944
<properties>
4045
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
41-
<jacoco.skip>true</jacoco.skip>
46+
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
47+
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
4248
</properties>
4349
<dependencies>
4450
<dependency>

sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public PostgreSqlManager authenticate(TokenCredential credential, AzureProfile p
255255
.append("-")
256256
.append("com.azure.resourcemanager.postgresqlflexibleserver")
257257
.append("/")
258-
.append("1.0.0-beta.5");
258+
.append("1.0.0-beta.6");
259259
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
260260
userAgentBuilder
261261
.append(" (")

sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsClient.java

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,54 @@
66

77
import com.azure.core.annotation.ReturnType;
88
import com.azure.core.annotation.ServiceMethod;
9+
import com.azure.core.http.rest.PagedFlux;
910
import com.azure.core.http.rest.PagedIterable;
1011
import com.azure.core.http.rest.Response;
1112
import com.azure.core.management.polling.PollResult;
1213
import com.azure.core.util.Context;
14+
import com.azure.core.util.polling.PollerFlux;
1315
import com.azure.core.util.polling.SyncPoller;
1416
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner;
1517
import com.azure.resourcemanager.postgresqlflexibleserver.models.ActiveDirectoryAdministratorAdd;
18+
import java.nio.ByteBuffer;
19+
import reactor.core.publisher.Flux;
20+
import reactor.core.publisher.Mono;
1621

1722
/** An instance of this class provides access to all the operations defined in AdministratorsClient. */
1823
public interface AdministratorsClient {
24+
/**
25+
* Creates a new server.
26+
*
27+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
28+
* @param serverName The name of the server.
29+
* @param objectId Guid of the objectId for the administrator.
30+
* @param parameters The required parameters for adding an active directory administrator for a server.
31+
* @throws IllegalArgumentException thrown if parameters fail the validation.
32+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
33+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
34+
* @return represents an Active Directory administrator along with {@link Response} on successful completion of
35+
* {@link Mono}.
36+
*/
37+
@ServiceMethod(returns = ReturnType.SINGLE)
38+
Mono<Response<Flux<ByteBuffer>>> createWithResponseAsync(
39+
String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters);
40+
41+
/**
42+
* Creates a new server.
43+
*
44+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
45+
* @param serverName The name of the server.
46+
* @param objectId Guid of the objectId for the administrator.
47+
* @param parameters The required parameters for adding an active directory administrator for a server.
48+
* @throws IllegalArgumentException thrown if parameters fail the validation.
49+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
50+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
51+
* @return the {@link PollerFlux} for polling of represents an Active Directory administrator.
52+
*/
53+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
54+
PollerFlux<PollResult<ActiveDirectoryAdministratorInner>, ActiveDirectoryAdministratorInner> beginCreateAsync(
55+
String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters);
56+
1957
/**
2058
* Creates a new server.
2159
*
@@ -53,6 +91,22 @@ SyncPoller<PollResult<ActiveDirectoryAdministratorInner>, ActiveDirectoryAdminis
5391
ActiveDirectoryAdministratorAdd parameters,
5492
Context context);
5593

94+
/**
95+
* Creates a new server.
96+
*
97+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
98+
* @param serverName The name of the server.
99+
* @param objectId Guid of the objectId for the administrator.
100+
* @param parameters The required parameters for adding an active directory administrator for a server.
101+
* @throws IllegalArgumentException thrown if parameters fail the validation.
102+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
103+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
104+
* @return represents an Active Directory administrator on successful completion of {@link Mono}.
105+
*/
106+
@ServiceMethod(returns = ReturnType.SINGLE)
107+
Mono<ActiveDirectoryAdministratorInner> createAsync(
108+
String resourceGroupName, String serverName, String objectId, ActiveDirectoryAdministratorAdd parameters);
109+
56110
/**
57111
* Creates a new server.
58112
*
@@ -90,6 +144,35 @@ ActiveDirectoryAdministratorInner create(
90144
ActiveDirectoryAdministratorAdd parameters,
91145
Context context);
92146

147+
/**
148+
* Deletes an Active Directory Administrator associated with the server.
149+
*
150+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
151+
* @param serverName The name of the server.
152+
* @param objectId Guid of the objectId for the administrator.
153+
* @throws IllegalArgumentException thrown if parameters fail the validation.
154+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
155+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
156+
* @return the {@link Response} on successful completion of {@link Mono}.
157+
*/
158+
@ServiceMethod(returns = ReturnType.SINGLE)
159+
Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(
160+
String resourceGroupName, String serverName, String objectId);
161+
162+
/**
163+
* Deletes an Active Directory Administrator associated with the server.
164+
*
165+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
166+
* @param serverName The name of the server.
167+
* @param objectId Guid of the objectId for the administrator.
168+
* @throws IllegalArgumentException thrown if parameters fail the validation.
169+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
170+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
171+
* @return the {@link PollerFlux} for polling of long-running operation.
172+
*/
173+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
174+
PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String serverName, String objectId);
175+
93176
/**
94177
* Deletes an Active Directory Administrator associated with the server.
95178
*
@@ -120,6 +203,20 @@ ActiveDirectoryAdministratorInner create(
120203
SyncPoller<PollResult<Void>, Void> beginDelete(
121204
String resourceGroupName, String serverName, String objectId, Context context);
122205

206+
/**
207+
* Deletes an Active Directory Administrator associated with the server.
208+
*
209+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
210+
* @param serverName The name of the server.
211+
* @param objectId Guid of the objectId for the administrator.
212+
* @throws IllegalArgumentException thrown if parameters fail the validation.
213+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
214+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
215+
* @return A {@link Mono} that completes when a successful response is received.
216+
*/
217+
@ServiceMethod(returns = ReturnType.SINGLE)
218+
Mono<Void> deleteAsync(String resourceGroupName, String serverName, String objectId);
219+
123220
/**
124221
* Deletes an Active Directory Administrator associated with the server.
125222
*
@@ -147,6 +244,35 @@ SyncPoller<PollResult<Void>, Void> beginDelete(
147244
@ServiceMethod(returns = ReturnType.SINGLE)
148245
void delete(String resourceGroupName, String serverName, String objectId, Context context);
149246

247+
/**
248+
* Gets information about a server.
249+
*
250+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
251+
* @param serverName The name of the server.
252+
* @param objectId Guid of the objectId for the administrator.
253+
* @throws IllegalArgumentException thrown if parameters fail the validation.
254+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
255+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
256+
* @return information about a server along with {@link Response} on successful completion of {@link Mono}.
257+
*/
258+
@ServiceMethod(returns = ReturnType.SINGLE)
259+
Mono<Response<ActiveDirectoryAdministratorInner>> getWithResponseAsync(
260+
String resourceGroupName, String serverName, String objectId);
261+
262+
/**
263+
* Gets information about a server.
264+
*
265+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
266+
* @param serverName The name of the server.
267+
* @param objectId Guid of the objectId for the administrator.
268+
* @throws IllegalArgumentException thrown if parameters fail the validation.
269+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
270+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
271+
* @return information about a server on successful completion of {@link Mono}.
272+
*/
273+
@ServiceMethod(returns = ReturnType.SINGLE)
274+
Mono<ActiveDirectoryAdministratorInner> getAsync(String resourceGroupName, String serverName, String objectId);
275+
150276
/**
151277
* Gets information about a server.
152278
*
@@ -177,6 +303,19 @@ Response<ActiveDirectoryAdministratorInner> getWithResponse(
177303
@ServiceMethod(returns = ReturnType.SINGLE)
178304
ActiveDirectoryAdministratorInner get(String resourceGroupName, String serverName, String objectId);
179305

306+
/**
307+
* List all the AAD administrators for a given server.
308+
*
309+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
310+
* @param serverName The name of the server.
311+
* @throws IllegalArgumentException thrown if parameters fail the validation.
312+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
313+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
314+
* @return a list of active directory administrators as paginated response with {@link PagedFlux}.
315+
*/
316+
@ServiceMethod(returns = ReturnType.COLLECTION)
317+
PagedFlux<ActiveDirectoryAdministratorInner> listByServerAsync(String resourceGroupName, String serverName);
318+
180319
/**
181320
* List all the AAD administrators for a given server.
182321
*

sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsClient.java

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,44 @@
66

77
import com.azure.core.annotation.ReturnType;
88
import com.azure.core.annotation.ServiceMethod;
9+
import com.azure.core.http.rest.PagedFlux;
910
import com.azure.core.http.rest.PagedIterable;
1011
import com.azure.core.http.rest.Response;
1112
import com.azure.core.util.Context;
1213
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner;
14+
import reactor.core.publisher.Mono;
1315

1416
/** An instance of this class provides access to all the operations defined in BackupsClient. */
1517
public interface BackupsClient {
18+
/**
19+
* Get specific backup for a given server.
20+
*
21+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
22+
* @param serverName The name of the server.
23+
* @param backupName The name of the backup.
24+
* @throws IllegalArgumentException thrown if parameters fail the validation.
25+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
26+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
27+
* @return specific backup for a given server along with {@link Response} on successful completion of {@link Mono}.
28+
*/
29+
@ServiceMethod(returns = ReturnType.SINGLE)
30+
Mono<Response<ServerBackupInner>> getWithResponseAsync(
31+
String resourceGroupName, String serverName, String backupName);
32+
33+
/**
34+
* Get specific backup for a given server.
35+
*
36+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
37+
* @param serverName The name of the server.
38+
* @param backupName The name of the backup.
39+
* @throws IllegalArgumentException thrown if parameters fail the validation.
40+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
41+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
42+
* @return specific backup for a given server on successful completion of {@link Mono}.
43+
*/
44+
@ServiceMethod(returns = ReturnType.SINGLE)
45+
Mono<ServerBackupInner> getAsync(String resourceGroupName, String serverName, String backupName);
46+
1647
/**
1748
* Get specific backup for a given server.
1849
*
@@ -43,6 +74,19 @@ Response<ServerBackupInner> getWithResponse(
4374
@ServiceMethod(returns = ReturnType.SINGLE)
4475
ServerBackupInner get(String resourceGroupName, String serverName, String backupName);
4576

77+
/**
78+
* List all the backups for a given server.
79+
*
80+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
81+
* @param serverName The name of the server.
82+
* @throws IllegalArgumentException thrown if parameters fail the validation.
83+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
84+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
85+
* @return a list of server backups as paginated response with {@link PagedFlux}.
86+
*/
87+
@ServiceMethod(returns = ReturnType.COLLECTION)
88+
PagedFlux<ServerBackupInner> listByServerAsync(String resourceGroupName, String serverName);
89+
4690
/**
4791
* List all the backups for a given server.
4892
*

sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,36 @@
1010
import com.azure.core.util.Context;
1111
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityInner;
1212
import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest;
13+
import reactor.core.publisher.Mono;
1314

1415
/** An instance of this class provides access to all the operations defined in CheckNameAvailabilitiesClient. */
1516
public interface CheckNameAvailabilitiesClient {
17+
/**
18+
* Check the availability of name for resource.
19+
*
20+
* @param nameAvailabilityRequest The required parameters for checking if resource name is available.
21+
* @throws IllegalArgumentException thrown if parameters fail the validation.
22+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
23+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
24+
* @return represents a resource name availability along with {@link Response} on successful completion of {@link
25+
* Mono}.
26+
*/
27+
@ServiceMethod(returns = ReturnType.SINGLE)
28+
Mono<Response<NameAvailabilityInner>> executeWithResponseAsync(
29+
CheckNameAvailabilityRequest nameAvailabilityRequest);
30+
31+
/**
32+
* Check the availability of name for resource.
33+
*
34+
* @param nameAvailabilityRequest The required parameters for checking if resource name is available.
35+
* @throws IllegalArgumentException thrown if parameters fail the validation.
36+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
37+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
38+
* @return represents a resource name availability on successful completion of {@link Mono}.
39+
*/
40+
@ServiceMethod(returns = ReturnType.SINGLE)
41+
Mono<NameAvailabilityInner> executeAsync(CheckNameAvailabilityRequest nameAvailabilityRequest);
42+
1643
/**
1744
* Check the availability of name for resource.
1845
*

0 commit comments

Comments
 (0)