Skip to content

Commit

Permalink
CodeGen from PR 23929 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge ee47c859b29c2404d96d43617192cab0eb479f93 into e6c0e188a74d051a3a44728ce058e85447553392
  • Loading branch information
SDKAuto committed May 11, 2023
1 parent 5f42080 commit 695fcee
Show file tree
Hide file tree
Showing 80 changed files with 77 additions and 3,401 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History

## 1.0.0-beta.1 (2023-05-11)

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

## 1.0.0-beta.6 (2023-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-2022-12-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
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 @@ -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,12 @@ public final class ServerPropertiesForUpdate {
@JsonProperty(value = "replicationRole")
private ReplicationRole replicationRole;

/*
* Network properties of a server.
*/
@JsonProperty(value = "network")
private Network network;

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

/**
* Get the network property: Network properties of a server.
*
* @return the network value.
*/
public Network network() {
return this.network;
}

/**
* Set the network property: Network properties of a 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 +334,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 @@ -520,7 +520,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 +669,16 @@ 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..
*
* @param network Network properties of a 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,29 @@ public ServerForUpdate withReplicationRole(ReplicationRole replicationRole) {
return this;
}

/**
* Get the network property: Network properties of a 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.
*
* @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.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 695fcee

Please sign in to comment.