Skip to content

Commit fe46f32

Browse files
author
SDKAuto
committed
CodeGen from PR 23929 in Azure/azure-rest-api-specs
Merge b27295de54181ddbe8e0ce7c25c4dc301fbc7383 into 5d2adf9b7fda669b4a2538c65e937ee74fe3f966
1 parent 7935c65 commit fe46f32

File tree

83 files changed

+118
-3415
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+118
-3415
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release History
22

3+
## 1.0.0-beta.1 (2023-05-17)
4+
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).
6+
37
## 1.0.0-beta.6 (2023-04-18)
48

59
- 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).

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.6");
258+
.append("1.0.0-beta.1");
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/models/ServerInner.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,8 @@ public ServerInner withBackup(Backup backup) {
318318
}
319319

320320
/**
321-
* Get the network property: Network properties of a server.
321+
* Get the network property: Network properties of a server. This Network property is required to be passed only in
322+
* case you want the server to be Private access server.
322323
*
323324
* @return the network value.
324325
*/
@@ -327,7 +328,8 @@ public Network network() {
327328
}
328329

329330
/**
330-
* Set the network property: Network properties of a server.
331+
* Set the network property: Network properties of a server. This Network property is required to be passed only in
332+
* case you want the server to be Private access server.
331333
*
332334
* @param network the network value to set.
333335
* @return the ServerInner object itself.

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ public final class ServerProperties {
8484
private Backup backup;
8585

8686
/*
87-
* Network properties of a server.
87+
* Network properties of a server. This Network property is required to be passed only in case you want the server
88+
* to be Private access server.
8889
*/
8990
@JsonProperty(value = "network")
9091
private Network network;
@@ -313,7 +314,8 @@ public ServerProperties withBackup(Backup backup) {
313314
}
314315

315316
/**
316-
* Get the network property: Network properties of a server.
317+
* Get the network property: Network properties of a server. This Network property is required to be passed only in
318+
* case you want the server to be Private access server.
317319
*
318320
* @return the network value.
319321
*/
@@ -322,7 +324,8 @@ public Network network() {
322324
}
323325

324326
/**
325-
* Set the network property: Network properties of a server.
327+
* Set the network property: Network properties of a server. This Network property is required to be passed only in
328+
* case you want the server to be Private access server.
326329
*
327330
* @param network the network value to set.
328331
* @return the ServerProperties object itself.

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption;
1212
import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability;
1313
import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow;
14+
import com.azure.resourcemanager.postgresqlflexibleserver.models.Network;
1415
import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationRole;
1516
import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion;
1617
import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage;
@@ -79,6 +80,13 @@ public final class ServerPropertiesForUpdate {
7980
@JsonProperty(value = "replicationRole")
8081
private ReplicationRole replicationRole;
8182

83+
/*
84+
* Network properties of a server. These are required to be passed only in case if server is a private access
85+
* server.
86+
*/
87+
@JsonProperty(value = "network")
88+
private Network network;
89+
8290
/** Creates an instance of ServerPropertiesForUpdate class. */
8391
public ServerPropertiesForUpdate() {
8492
}
@@ -283,6 +291,28 @@ public ServerPropertiesForUpdate withReplicationRole(ReplicationRole replication
283291
return this;
284292
}
285293

294+
/**
295+
* Get the network property: Network properties of a server. These are required to be passed only in case if server
296+
* is a private access server.
297+
*
298+
* @return the network value.
299+
*/
300+
public Network network() {
301+
return this.network;
302+
}
303+
304+
/**
305+
* Set the network property: Network properties of a server. These are required to be passed only in case if server
306+
* is a private access server.
307+
*
308+
* @param network the network value to set.
309+
* @return the ServerPropertiesForUpdate object itself.
310+
*/
311+
public ServerPropertiesForUpdate withNetwork(Network network) {
312+
this.network = network;
313+
return this;
314+
}
315+
286316
/**
287317
* Validates the instance.
288318
*
@@ -307,5 +337,8 @@ public void validate() {
307337
if (dataEncryption() != null) {
308338
dataEncryption().validate();
309339
}
340+
if (network() != null) {
341+
network().validate();
342+
}
310343
}
311344
}

sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerImpl.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,13 @@ public ServerImpl withBackup(Backup backup) {
383383
}
384384

385385
public ServerImpl withNetwork(Network network) {
386-
this.innerModel().withNetwork(network);
387-
return this;
386+
if (isInCreateMode()) {
387+
this.innerModel().withNetwork(network);
388+
return this;
389+
} else {
390+
this.updateParameters.withNetwork(network);
391+
return this;
392+
}
388393
}
389394

390395
public ServerImpl withHighAvailability(HighAvailability highAvailability) {

sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Network.java

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,17 @@ public final class Network {
1717
private ServerPublicNetworkAccessState publicNetworkAccess;
1818

1919
/*
20-
* delegated subnet arm resource id.
20+
* Delegated subnet arm resource id. This is required to be passed during create, in case we want the server to be
21+
* VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for
22+
* Private DNS zone.
2123
*/
2224
@JsonProperty(value = "delegatedSubnetResourceId")
2325
private String delegatedSubnetResourceId;
2426

2527
/*
26-
* private dns zone arm resource id.
28+
* Private dns zone arm resource id. This is required to be passed during create, in case we want the server to be
29+
* VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for
30+
* Private DNS zone.
2731
*/
2832
@JsonProperty(value = "privateDnsZoneArmResourceId")
2933
private String privateDnsZoneArmResourceId;
@@ -42,7 +46,9 @@ public ServerPublicNetworkAccessState publicNetworkAccess() {
4246
}
4347

4448
/**
45-
* Get the delegatedSubnetResourceId property: delegated subnet arm resource id.
49+
* Get the delegatedSubnetResourceId property: Delegated subnet arm resource id. This is required to be passed
50+
* during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass
51+
* this only if we want to update the value for Private DNS zone.
4652
*
4753
* @return the delegatedSubnetResourceId value.
4854
*/
@@ -51,7 +57,9 @@ public String delegatedSubnetResourceId() {
5157
}
5258

5359
/**
54-
* Set the delegatedSubnetResourceId property: delegated subnet arm resource id.
60+
* Set the delegatedSubnetResourceId property: Delegated subnet arm resource id. This is required to be passed
61+
* during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass
62+
* this only if we want to update the value for Private DNS zone.
5563
*
5664
* @param delegatedSubnetResourceId the delegatedSubnetResourceId value to set.
5765
* @return the Network object itself.
@@ -62,7 +70,9 @@ public Network withDelegatedSubnetResourceId(String delegatedSubnetResourceId) {
6270
}
6371

6472
/**
65-
* Get the privateDnsZoneArmResourceId property: private dns zone arm resource id.
73+
* Get the privateDnsZoneArmResourceId property: Private dns zone arm resource id. This is required to be passed
74+
* during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass
75+
* this only if we want to update the value for Private DNS zone.
6676
*
6777
* @return the privateDnsZoneArmResourceId value.
6878
*/
@@ -71,7 +81,9 @@ public String privateDnsZoneArmResourceId() {
7181
}
7282

7383
/**
74-
* Set the privateDnsZoneArmResourceId property: private dns zone arm resource id.
84+
* Set the privateDnsZoneArmResourceId property: Private dns zone arm resource id. This is required to be passed
85+
* during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass
86+
* this only if we want to update the value for Private DNS zone.
7587
*
7688
* @param privateDnsZoneArmResourceId the privateDnsZoneArmResourceId value to set.
7789
* @return the Network object itself.

sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Server.java

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ public interface Server {
141141
Backup backup();
142142

143143
/**
144-
* Gets the network property: Network properties of a server.
144+
* Gets the network property: Network properties of a server. This Network property is required to be passed only in
145+
* case you want the server to be Private access server.
145146
*
146147
* @return the network value.
147148
*/
@@ -417,9 +418,11 @@ interface WithBackup {
417418
/** The stage of the Server definition allowing to specify network. */
418419
interface WithNetwork {
419420
/**
420-
* Specifies the network property: Network properties of a server..
421+
* Specifies the network property: Network properties of a server. This Network property is required to be
422+
* passed only in case you want the server to be Private access server..
421423
*
422-
* @param network Network properties of a server.
424+
* @param network Network properties of a server. This Network property is required to be passed only in
425+
* case you want the server to be Private access server.
423426
* @return the next definition stage.
424427
*/
425428
WithCreate withNetwork(Network network);
@@ -520,7 +523,8 @@ interface Update
520523
UpdateStages.WithAuthConfig,
521524
UpdateStages.WithDataEncryption,
522525
UpdateStages.WithCreateMode,
523-
UpdateStages.WithReplicationRole {
526+
UpdateStages.WithReplicationRole,
527+
UpdateStages.WithNetwork {
524528
/**
525529
* Executes the update request.
526530
*
@@ -668,6 +672,18 @@ interface WithReplicationRole {
668672
*/
669673
Update withReplicationRole(ReplicationRole replicationRole);
670674
}
675+
/** The stage of the Server update allowing to specify network. */
676+
interface WithNetwork {
677+
/**
678+
* Specifies the network property: Network properties of a server. These are required to be passed only in
679+
* case if server is a private access server..
680+
*
681+
* @param network Network properties of a server. These are required to be passed only in case if server is
682+
* a private access server.
683+
* @return the next definition stage.
684+
*/
685+
Update withNetwork(Network network);
686+
}
671687
}
672688
/**
673689
* Refreshes the resource to sync with Azure.

sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForUpdate.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,31 @@ public ServerForUpdate withReplicationRole(ReplicationRole replicationRole) {
341341
return this;
342342
}
343343

344+
/**
345+
* Get the network property: Network properties of a server. These are required to be passed only in case if server
346+
* is a private access server.
347+
*
348+
* @return the network value.
349+
*/
350+
public Network network() {
351+
return this.innerProperties() == null ? null : this.innerProperties().network();
352+
}
353+
354+
/**
355+
* Set the network property: Network properties of a server. These are required to be passed only in case if server
356+
* is a private access server.
357+
*
358+
* @param network the network value to set.
359+
* @return the ServerForUpdate object itself.
360+
*/
361+
public ServerForUpdate withNetwork(Network network) {
362+
if (this.innerProperties() == null) {
363+
this.innerProperties = new ServerPropertiesForUpdate();
364+
}
365+
this.innerProperties().withNetwork(network);
366+
return this;
367+
}
368+
344369
/**
345370
* Validates the instance.
346371
*

sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ActiveDirectoryAdministratorAddTests.java

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)