Skip to content

Commit

Permalink
CodeGen from PR 24087 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 406ea842753eba7c8bbc882652f3cb69fecaa8ee into 529205bb71049de32c1126c69b6016904261da32
  • Loading branch information
SDKAuto committed May 22, 2023
1 parent fc0ca70 commit a5832f8
Show file tree
Hide file tree
Showing 84 changed files with 118 additions and 3,417 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.7 (Unreleased)
## 1.0.0-beta.1 (2023-05-22)

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

### Features Added

Expand Down
Original file line number Diff line number Diff line change
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.0.0-beta.6</version>
<version>1.0.0-beta.7</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public PostgreSqlManager authenticate(TokenCredential credential, AzureProfile p
.append("-")
.append("com.azure.resourcemanager.postgresqlflexibleserver")
.append("/")
.append("1.0.0-beta.6");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ public ServerInner withBackup(Backup backup) {
}

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

/**
* Set the network property: Network properties of a server.
* Set the network property: Network properties of a server. This Network property is required to be passed only in
* case you want the server to be Private access server.
*
* @param network the network value to set.
* @return the ServerInner object itself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public final class ServerProperties {
private Backup backup;

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

/**
* Get the network property: Network properties of a server.
* Get the network property: Network properties of a server. This Network property is required to be passed only in
* case you want the server to be Private access server.
*
* @return the network value.
*/
Expand All @@ -322,7 +324,8 @@ public Network network() {
}

/**
* Set the network property: Network properties of a server.
* Set the network property: Network properties of a server. This Network property is required to be passed only in
* case you want the server to be Private access server.
*
* @param network the network value to set.
* @return the ServerProperties object itself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption;
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.ReplicationRole;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage;
Expand Down Expand Up @@ -79,6 +80,13 @@ public final class ServerPropertiesForUpdate {
@JsonProperty(value = "replicationRole")
private ReplicationRole replicationRole;

/*
* Network properties of a server. These are required to be passed only in case if server is a private access
* server.
*/
@JsonProperty(value = "network")
private Network network;

/** Creates an instance of ServerPropertiesForUpdate class. */
public ServerPropertiesForUpdate() {
}
Expand Down Expand Up @@ -283,6 +291,28 @@ public ServerPropertiesForUpdate withReplicationRole(ReplicationRole replication
return this;
}

/**
* Get the network property: Network properties of a server. These are required to be passed only in case if server
* is a private access server.
*
* @return the network value.
*/
public Network network() {
return this.network;
}

/**
* Set the network property: Network properties of a server. These are required to be passed only in case if server
* is a private access server.
*
* @param network the network value to set.
* @return the ServerPropertiesForUpdate object itself.
*/
public ServerPropertiesForUpdate withNetwork(Network network) {
this.network = network;
return this;
}

/**
* Validates the instance.
*
Expand All @@ -307,5 +337,8 @@ public void validate() {
if (dataEncryption() != null) {
dataEncryption().validate();
}
if (network() != null) {
network().validate();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,13 @@ public ServerImpl withBackup(Backup backup) {
}

public ServerImpl withNetwork(Network network) {
this.innerModel().withNetwork(network);
return this;
if (isInCreateMode()) {
this.innerModel().withNetwork(network);
return this;
} else {
this.updateParameters.withNetwork(network);
return this;
}
}

public ServerImpl withHighAvailability(HighAvailability highAvailability) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ public final class Network {
private ServerPublicNetworkAccessState publicNetworkAccess;

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

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

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

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

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

/**
* Set the privateDnsZoneArmResourceId property: private dns zone arm resource id.
* Set the privateDnsZoneArmResourceId property: Private dns zone arm resource id. This is required to be passed
* during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass
* this only if we want to update the value for Private DNS zone.
*
* @param privateDnsZoneArmResourceId the privateDnsZoneArmResourceId value to set.
* @return the Network object itself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ public interface Server {
Backup backup();

/**
* Gets the network property: Network properties of a server.
* Gets the network property: Network properties of a server. This Network property is required to be passed only in
* case you want the server to be Private access server.
*
* @return the network value.
*/
Expand Down Expand Up @@ -417,9 +418,11 @@ interface WithBackup {
/** The stage of the Server definition allowing to specify network. */
interface WithNetwork {
/**
* Specifies the network property: Network properties of a server..
* Specifies the network property: Network properties of a server. This Network property is required to be
* passed only in case you want the server to be Private access server..
*
* @param network Network properties of a server.
* @param network Network properties of a server. This Network property is required to be passed only in
* case you want the server to be Private access server.
* @return the next definition stage.
*/
WithCreate withNetwork(Network network);
Expand Down Expand Up @@ -520,7 +523,8 @@ interface Update
UpdateStages.WithAuthConfig,
UpdateStages.WithDataEncryption,
UpdateStages.WithCreateMode,
UpdateStages.WithReplicationRole {
UpdateStages.WithReplicationRole,
UpdateStages.WithNetwork {
/**
* Executes the update request.
*
Expand Down Expand Up @@ -668,6 +672,18 @@ interface WithReplicationRole {
*/
Update withReplicationRole(ReplicationRole replicationRole);
}
/** The stage of the Server update allowing to specify network. */
interface WithNetwork {
/**
* Specifies the network property: Network properties of a server. These are required to be passed only in
* case if server is a private access server..
*
* @param network Network properties of a server. These are required to be passed only in case if server is
* a private access server.
* @return the next definition stage.
*/
Update withNetwork(Network network);
}
}
/**
* Refreshes the resource to sync with Azure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,31 @@ public ServerForUpdate withReplicationRole(ReplicationRole replicationRole) {
return this;
}

/**
* Get the network property: Network properties of a server. These are required to be passed only in case if server
* is a private access server.
*
* @return the network value.
*/
public Network network() {
return this.innerProperties() == null ? null : this.innerProperties().network();
}

/**
* Set the network property: Network properties of a server. These are required to be passed only in case if server
* is a private access server.
*
* @param network the network value to set.
* @return the ServerForUpdate object itself.
*/
public ServerForUpdate withNetwork(Network network) {
if (this.innerProperties() == null) {
this.innerProperties = new ServerPropertiesForUpdate();
}
this.innerProperties().withNetwork(network);
return this;
}

/**
* Validates the instance.
*
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit a5832f8

Please sign in to comment.