diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md
index de2eb0d7c1bf2..3448b7fff2ed7 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md
@@ -1,14 +1,478 @@
# Release History
-## 1.1.0-beta.4 (Unreleased)
+## 1.0.0-beta.1 (2024-09-25)
-### Features Added
+- Azure Resource Manager PostgreSqlServer client library for Java. This package contains Microsoft Azure SDK for PostgreSqlServer 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-2024-08-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Breaking Changes
-### Bugs Fixed
+* `models.NodeTypeCapability` was removed
+
+* `models.StorageMBCapability` was removed
+
+* `models.HyperscaleNodeEditionCapability` was removed
+
+* `models.CapabilityProperties` was removed
+
+* `PostgreSqlManager$Configurable` was removed
+
+* `models.VcoreCapability` was removed
+
+* `PostgreSqlManager` was removed
+
+#### `models.StorageTierCapability` was modified
+
+* `java.lang.Long iops()` -> `java.lang.Integer iops()`
+* `tierName()` was removed
+* `isBaseline()` was removed
+* `java.lang.String status()` -> `models.CapabilityStatus status()`
+
+#### `models.FastProvisioningEditionCapability` was modified
+
+* `java.lang.Long supportedStorageGb()` -> `java.lang.Integer supportedStorageGb()`
+
+#### `models.ServerVersionCapability` was modified
+
+* `supportedVcores()` was removed
+* `java.lang.String status()` -> `models.CapabilityStatus status()`
+
+#### `models.FlexibleServerEditionCapability` was modified
+
+* `java.lang.String status()` -> `models.CapabilityStatus status()`
+* `supportedServerVersions()` was removed
+
+#### `models.StorageEditionCapability` was modified
+
+* `supportedStorageMB()` was removed
+* `java.lang.String status()` -> `models.CapabilityStatus status()`
+
+### Features Added
+
+* `models.ServerThreatProtectionSettingsModel$UpdateStages` was added
+
+* `models.ExecutionStatus` was added
+
+* `models.MigrationResource$Definition` was added
+
+* `models.LogFiles` was added
+
+* `models.ThreatProtectionState` was added
+
+* `models.MigrationResourceListResult` was added
+
+* `models.ServerThreatProtectionSettingsModel` was added
+
+* `models.LtrBackupResponse` was added
+
+* `models.MigrationOption` was added
+
+* `models.PrivateLinkResource` was added
+
+* `models.Migrations` was added
+
+* `models.Replica` was added
+
+* `models.ServerThreatProtectionSettingsModel$Update` was added
+
+* `models.MigrationMode` was added
+
+* `models.LtrBackupRequest` was added
+
+* `models.FlexibleServersTriggerLtrPreBackupResponse` was added
+
+* `models.ZoneRedundantHaSupportedEnum` was added
+
+* `models.ValidationState` was added
+
+* `models.ReadReplicaPromoteMode` was added
+
+* `models.PrivateEndpointConnectionProvisioningState` was added
+
+* `models.MigrationResourceForPatch` was added
+
+* `models.ServerThreatProtectionListResult` was added
+
+* `models.RestrictedEnum` was added
+
+* `models.PrivateLinkResources` was added
+
+* `models.VirtualEndpoints` was added
+
+* `models.OverwriteDbsInTargetEnum` was added
+
+* `models.VirtualEndpointResource$Definition` was added
+
+* `models.MigrationState` was added
+
+* `PostgreSqlServerManager` was added
+
+* `models.CapabilityStatus` was added
+
+* `models.AzureManagedDiskPerformanceTiers` was added
+
+* `models.StorageAutoGrowthSupportedEnum` was added
+
+* `models.PrivateLinkServiceConnectionState` was added
+
+* `models.MigrationResource$Update` was added
+
+* `models.VirtualEndpointResource$Update` was added
+
+* `models.ResourceProviders` was added
+
+* `models.PrivateLinkResourceListResult` was added
+
+* `models.MigrationStatus` was added
+
+* `models.PrivateEndpointConnections` was added
+
+* `models.StartDataMigrationEnum` was added
+
+* `models.ZoneRedundantHaAndGeoBackupSupportedEnum` was added
+
+* `models.StorageMbCapability` was added
+
+* `models.OnlineResizeSupportedEnum` was added
+
+* `models.MigrationNameAvailabilityResource` was added
+
+* `models.ServerSku` was added
+
+* `models.ThreatProtectionName` was added
+
+* `models.PrivateEndpoint` was added
+
+* `models.BackupStoreDetails` was added
+
+* `models.ServerThreatProtectionSettingsModel$Definition` was added
+
+* `models.MigrationResource$UpdateStages` was added
+
+* `models.FlexibleServers` was added
+
+* `models.LogicalReplicationOnSourceDbEnum` was added
+
+* `models.MigrationDbState` was added
+
+* `models.KeyStatusEnum` was added
+
+* `models.CancelEnum` was added
+
+* `models.MigrationListFilter` was added
+
+* `models.FlexibleServerCapability` was added
+
+* `models.ReplicationState` was added
+
+* `models.PrivateEndpointServiceConnectionStatus` was added
+
+* `models.CapabilityBase` was added
+
+* `models.MigrationNameAvailabilityReason` was added
+
+* `models.LtrBackupOperations` was added
+
+* `models.LtrServerBackupOperation` was added
+
+* `models.ServerCapabilities` was added
+
+* `models.ValidationDetails` was added
+
+* `models.ReplicationPromoteOption` was added
+
+* `models.FastProvisioningSupportedEnum` was added
+
+* `models.LogFile` was added
+
+* `models.VirtualEndpointResourceForPatch` was added
+
+* `models.BackupRequestBase` was added
+
+* `models.ServerSkuCapability` was added
+
+* `models.StorageType` was added
+
+* `models.ValidationMessage` was added
+
+* `models.VirtualEndpointResource` was added
+
+* `models.SourceType` was added
+
+* `models.LogFileListResult` was added
+
+* `models.StorageAutoGrow` was added
+
+* `models.PrivateEndpointConnectionOperations` was added
+
+* `models.VirtualEndpointsListResult` was added
+
+* `models.BackupSettings` was added
+
+* `models.MigrationSubStateDetails` was added
+
+* `models.LtrServerBackupOperationList` was added
+
+* `models.PrivateEndpointConnectionListResult` was added
+
+* `models.DbMigrationStatus` was added
+
+* `models.MigrateRolesEnum` was added
+
+* `models.ValidationSummaryItem` was added
+
+* `models.LtrPreBackupRequest` was added
+
+* `models.LtrPreBackupResponse` was added
+
+* `models.ServerThreatProtectionSettingsModel$DefinitionStages` was added
+
+* `models.MigrationResource` was added
+
+* `models.HaMode` was added
+
+* `models.GeoBackupSupportedEnum` was added
+
+* `models.MigrationSecretParameters` was added
+
+* `models.TriggerCutoverEnum` was added
+
+* `models.VirtualEndpointType` was added
+
+* `models.DbLevelValidationStatus` was added
+
+* `models.ServerThreatProtectionSettings` was added
+
+* `models.MigrationResource$DefinitionStages` was added
+
+* `models.MigrationSubState` was added
+
+* `models.PrivateEndpointConnection` was added
+
+* `models.VirtualEndpointResource$DefinitionStages` was added
+
+* `models.DbServerMetadata` was added
+
+* `models.FlexibleServersTriggerLtrPreBackupHeaders` was added
+
+* `models.AdminCredentials` was added
+
+* `models.VirtualEndpointResource$UpdateStages` was added
+
+* `PostgreSqlServerManager$Configurable` was added
+
+* `models.SslMode` was added
+
+#### `models.Backup` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.StorageTierCapability` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `reason()` was added
+
+#### `models.HighAvailability` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.VirtualNetworkSubnetUsageParameter` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.Backups` was modified
+
+* `delete(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+* `create(java.lang.String,java.lang.String,java.lang.String)` was added
+* `delete(java.lang.String,java.lang.String,java.lang.String)` was added
+* `create(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+
+#### `models.ActiveDirectoryAdministratorAdd` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.CheckNameAvailabilityResponse` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.FastProvisioningEditionCapability` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `serverCount()` was added
+* `supportedTier()` was added
+* `status()` was added
+* `reason()` was added
+
+#### `models.Storage` was modified
+
+* `withThroughput(java.lang.Integer)` was added
+* `withType(models.StorageType)` was added
+* `tier()` was added
+* `withTier(models.AzureManagedDiskPerformanceTiers)` was added
+* `iops()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `autoGrow()` was added
+* `type()` was added
+* `throughput()` was added
+* `withIops(java.lang.Integer)` was added
+* `withAutoGrow(models.StorageAutoGrow)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.UserIdentity` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.OperationDisplay` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.UserAssignedIdentity` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.DelegatedSubnetUsage` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ServerForUpdate` was modified
+
+* `withReplica(models.Replica)` was added
+* `replica()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `administratorLogin()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `withAdministratorLogin(java.lang.String)` was added
+
+#### `models.DatabaseListResult` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.FirewallRuleListResult` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.DataEncryption` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `withGeoBackupEncryptionKeyStatus(models.KeyStatusEnum)` was added
+* `withPrimaryEncryptionKeyStatus(models.KeyStatusEnum)` was added
+* `withGeoBackupKeyUri(java.lang.String)` was added
+* `geoBackupUserAssignedIdentityId()` was added
+* `geoBackupKeyUri()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `primaryEncryptionKeyStatus()` was added
+* `geoBackupEncryptionKeyStatus()` was added
+* `withGeoBackupUserAssignedIdentityId(java.lang.String)` was added
+
+#### `models.RestartParameter` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ServerVersionCapability` was modified
+
+* `reason()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.AdministratorListResult` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.FlexibleServerEditionCapability` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `defaultSkuName()` was added
+* `reason()` was added
+* `supportedServerSkus()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.CapabilitiesListResult` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ConfigurationForUpdate` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.Operation` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ServerBackupListResult` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.MaintenanceWindow` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.Network` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `withPublicNetworkAccess(models.ServerPublicNetworkAccessState)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.Sku` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ConfigurationListResult` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.CheckNameAvailabilityRequest` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.Server$Update` was modified
+
+* `withReplica(models.Replica)` was added
+* `withAdministratorLogin(java.lang.String)` was added
+
+#### `models.Server` was modified
+
+* `privateEndpointConnections()` was added
+* `replica()` was added
+
+#### `models.ServerListResult` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.StorageEditionCapability` was modified
+
+* `reason()` was added
+* `supportedStorageMb()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `defaultStorageSizeMb()` was added
+
+#### `models.AuthConfig` was modified
-### Other Changes
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
## 1.1.0-beta.3 (2024-04-18)
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md
index a1f3f818854c0..d829e89766f10 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md
@@ -1,8 +1,8 @@
-# Azure Resource Manager PostgreSql client library for Java
+# Azure Resource Manager PostgreSqlServer client library for Java
-Azure Resource Manager PostgreSql client library for Java.
+Azure Resource Manager PostgreSqlServer 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).
+This package contains Microsoft Azure SDK for PostgreSqlServer 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-2024-08-01. 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
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-postgresqlflexibleserver
- 1.1.0-beta.3
+ 1.1.0-beta.4
```
[//]: # ({x-version-update-end})
@@ -45,22 +45,18 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
### Authentication
-By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.
+Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
-- `AZURE_CLIENT_ID` for Azure client ID.
-- `AZURE_TENANT_ID` for Azure tenant ID.
-- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-
-With above configuration, `azure` client can be authenticated using the following code:
+Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
-PostgreSqlManager manager = PostgreSqlManager
+PostgreSqlServerManager manager = PostgreSqlServerManager
.authenticate(credential, profile);
```
@@ -120,6 +116,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
+[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md
index f37d9e424efed..e44357c07c141 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md
@@ -10,6 +10,8 @@
## Backups
+- [Create](#backups_create)
+- [Delete](#backups_delete)
- [Get](#backups_get)
- [ListByServer](#backups_listbyserver)
@@ -91,10 +93,6 @@
- [Get](#privatelinkresources_get)
- [ListByServer](#privatelinkresources_listbyserver)
-## QuotaUsages
-
-- [List](#quotausages_list)
-
## Replicas
- [ListByServer](#replicas_listbyserver)
@@ -146,15 +144,17 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType;
*/
public final class AdministratorsCreateSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/AdministratorAdd.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/AdministratorAdd.
+ * json
*/
/**
* Sample code: Adds an Active DIrectory Administrator for the server.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void addsAnActiveDIrectoryAdministratorForTheServer(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.administrators()
.define("oooooooo-oooo-oooo-oooo-oooooooooooo")
.withExistingFlexibleServer("testrg", "testserver")
@@ -174,15 +174,17 @@ public final class AdministratorsCreateSamples {
*/
public final class AdministratorsDeleteSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/AdministratorDelete.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * AdministratorDelete.json
*/
/**
* Sample code: AdministratorDelete.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- administratorDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ administratorDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.administrators()
.delete("testrg", "testserver", "oooooooo-oooo-oooo-oooo-oooooooooooo", com.azure.core.util.Context.NONE);
}
@@ -197,14 +199,16 @@ public final class AdministratorsDeleteSamples {
*/
public final class AdministratorsGetSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/AdministratorGet.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/AdministratorGet.
+ * json
*/
/**
* Sample code: ServerGet.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void serverGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void serverGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.administrators()
.getWithResponse("testrg", "pgtestsvc1", "oooooooo-oooo-oooo-oooo-oooooooooooo",
com.azure.core.util.Context.NONE);
@@ -220,20 +224,69 @@ public final class AdministratorsGetSamples {
*/
public final class AdministratorsListByServerSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/AdministratorsListByServer.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * AdministratorsListByServer.json
*/
/**
* Sample code: AdministratorsListByServer.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- administratorsListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ administratorsListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.administrators().listByServer("testrg", "pgtestsvc1", com.azure.core.util.Context.NONE);
}
}
```
+### Backups_Create
+
+```java
+/**
+ * Samples for Backups Create.
+ */
+public final class BackupsCreateSamples {
+ /*
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/BackupCreate.json
+ */
+ /**
+ * Sample code: Create a new Backup for a flexible server.
+ *
+ * @param manager Entry point to PostgreSqlServerManager.
+ */
+ public static void createANewBackupForAFlexibleServer(
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
+ manager.backups()
+ .create("TestGroup", "postgresqltestserver", "backup_20210615T160516", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Backups_Delete
+
+```java
+/**
+ * Samples for Backups Delete.
+ */
+public final class BackupsDeleteSamples {
+ /*
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/BackupDelete.json
+ */
+ /**
+ * Sample code: Delete a specific backup.
+ *
+ * @param manager Entry point to PostgreSqlServerManager.
+ */
+ public static void
+ deleteASpecificBackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
+ manager.backups().delete("TestGroup", "testserver", "backup_20210615T160516", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Backups_Get
```java
@@ -242,15 +295,16 @@ public final class AdministratorsListByServerSamples {
*/
public final class BackupsGetSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/BackupGet.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/BackupGet.json
*/
/**
* Sample code: Get a backup for a server.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- getABackupForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ getABackupForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.backups()
.getWithResponse("TestGroup", "postgresqltestserver", "daily_20210615T160516",
com.azure.core.util.Context.NONE);
@@ -266,15 +320,17 @@ public final class BackupsGetSamples {
*/
public final class BackupsListByServerSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/BackupListByServer.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/BackupListByServer
+ * .json
*/
/**
* Sample code: List backups for a server.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- listBackupsForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ listBackupsForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.backups().listByServer("TestGroup", "postgresqltestserver", com.azure.core.util.Context.NONE);
}
}
@@ -290,14 +346,17 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvaila
*/
public final class CheckNameAvailabilityExecuteSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/CheckNameAvailability.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * CheckNameAvailability.json
*/
/**
* Sample code: NameAvailability.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void nameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ nameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.checkNameAvailabilities()
.executeWithResponse(new CheckNameAvailabilityRequest().withName("name1")
.withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE);
@@ -315,14 +374,17 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvaila
*/
public final class CheckNameAvailabilityWithLocationExecuteSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/CheckNameAvailabilityLocationBased.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * CheckNameAvailabilityLocationBased.json
*/
/**
* Sample code: NameAvailability.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void nameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ nameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.checkNameAvailabilityWithLocations()
.executeWithResponse("westus", new CheckNameAvailabilityRequest().withName("name1")
.withType("Microsoft.DBforPostgreSQL/flexibleServers"), com.azure.core.util.Context.NONE);
@@ -338,14 +400,17 @@ public final class CheckNameAvailabilityWithLocationExecuteSamples {
*/
public final class ConfigurationsGetSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ConfigurationGet.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/ConfigurationGet.
+ * json
*/
/**
* Sample code: ConfigurationGet.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void configurationGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ configurationGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.configurations()
.getWithResponse("testrg", "testserver", "array_nulls", com.azure.core.util.Context.NONE);
}
@@ -360,14 +425,17 @@ public final class ConfigurationsGetSamples {
*/
public final class ConfigurationsListByServerSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ConfigurationListByServer.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ConfigurationListByServer.json
*/
/**
* Sample code: ConfigurationList.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void configurationList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ configurationList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.configurations().listByServer("testrg", "testserver", com.azure.core.util.Context.NONE);
}
}
@@ -381,15 +449,17 @@ public final class ConfigurationsListByServerSamples {
*/
public final class ConfigurationsPutSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ConfigurationUpdate.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ConfigurationUpdate.json
*/
/**
* Sample code: Update a user configuration.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- updateAUserConfiguration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ updateAUserConfiguration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.configurations()
.define("event_scheduler")
.withExistingFlexibleServer("testrg", "testserver")
@@ -410,15 +480,17 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.Configuration;
*/
public final class ConfigurationsUpdateSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ConfigurationUpdate.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ConfigurationUpdate.json
*/
/**
* Sample code: Update a user configuration.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- updateAUserConfiguration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ updateAUserConfiguration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
Configuration resource = manager.configurations()
.getWithResponse("testrg", "testserver", "event_scheduler", com.azure.core.util.Context.NONE)
.getValue();
@@ -435,14 +507,17 @@ public final class ConfigurationsUpdateSamples {
*/
public final class DatabasesCreateSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/DatabaseCreate.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/DatabaseCreate.
+ * json
*/
/**
* Sample code: Create a database.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void createADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ createADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.databases()
.define("db1")
.withExistingFlexibleServer("TestGroup", "testserver")
@@ -461,14 +536,17 @@ public final class DatabasesCreateSamples {
*/
public final class DatabasesDeleteSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/DatabaseDelete.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/DatabaseDelete.
+ * json
*/
/**
* Sample code: Delete a database.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void deleteADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ deleteADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.databases().delete("TestGroup", "testserver", "db1", com.azure.core.util.Context.NONE);
}
}
@@ -482,14 +560,16 @@ public final class DatabasesDeleteSamples {
*/
public final class DatabasesGetSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/DatabaseGet.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/DatabaseGet.json
*/
/**
* Sample code: Get a database.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void getADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ getADatabase(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.databases().getWithResponse("TestGroup", "testserver", "db1", com.azure.core.util.Context.NONE);
}
}
@@ -503,15 +583,17 @@ public final class DatabasesGetSamples {
*/
public final class DatabasesListByServerSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/DatabasesListByServer.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * DatabasesListByServer.json
*/
/**
* Sample code: List databases in a server.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- listDatabasesInAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ listDatabasesInAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.databases().listByServer("TestGroup", "testserver", com.azure.core.util.Context.NONE);
}
}
@@ -525,15 +607,17 @@ public final class DatabasesListByServerSamples {
*/
public final class FirewallRulesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/FirewallRuleCreate.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/FirewallRuleCreate
+ * .json
*/
/**
* Sample code: FirewallRuleCreate.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- firewallRuleCreate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ firewallRuleCreate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.firewallRules()
.define("rule1")
.withExistingFlexibleServer("testrg", "testserver")
@@ -552,15 +636,17 @@ public final class FirewallRulesCreateOrUpdateSamples {
*/
public final class FirewallRulesDeleteSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/FirewallRuleDelete.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/FirewallRuleDelete
+ * .json
*/
/**
* Sample code: FirewallRuleDelete.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- firewallRuleDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ firewallRuleDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.firewallRules().delete("testrg", "testserver", "rule1", com.azure.core.util.Context.NONE);
}
}
@@ -574,14 +660,17 @@ public final class FirewallRulesDeleteSamples {
*/
public final class FirewallRulesGetSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/FirewallRuleGet.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/FirewallRuleGet.
+ * json
*/
/**
* Sample code: FirewallRuleList.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void firewallRuleList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ firewallRuleList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.firewallRules().getWithResponse("testrg", "testserver", "rule1", com.azure.core.util.Context.NONE);
}
}
@@ -595,14 +684,17 @@ public final class FirewallRulesGetSamples {
*/
public final class FirewallRulesListByServerSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/FirewallRuleListByServer.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * FirewallRuleListByServer.json
*/
/**
* Sample code: FirewallRuleList.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void firewallRuleList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ firewallRuleList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.firewallRules().listByServer("testrg", "testserver", com.azure.core.util.Context.NONE);
}
}
@@ -621,15 +713,17 @@ import java.util.Arrays;
*/
public final class FlexibleServerStartLtrBackupSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/LongTermRetentionBackup.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * LongTermRetentionBackup.json
*/
/**
* Sample code: Sample_ExecuteBackup.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- sampleExecuteBackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ sampleExecuteBackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.flexibleServers()
.startLtrBackup("rgLongTermRetention", "pgsqlltrtestserver",
new LtrBackupRequest().withBackupSettings(new BackupSettings().withBackupName("backup1"))
@@ -650,14 +744,17 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupReq
*/
public final class FlexibleServerTriggerLtrPreBackupSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/LongTermRetentionPreBackup.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * LongTermRetentionPreBackup.json
*/
/**
* Sample code: Sample_Prebackup.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void samplePrebackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ samplePrebackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.flexibleServers()
.triggerLtrPreBackupWithResponse("rgLongTermRetention", "pgsqlltrtestserver",
new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("backup1")),
@@ -674,15 +771,17 @@ public final class FlexibleServerTriggerLtrPreBackupSamples {
*/
public final class GetPrivateDnsZoneSuffixExecuteSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/GetPrivateDnsZoneSuffix.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * GetPrivateDnsZoneSuffix.json
*/
/**
* Sample code: GetPrivateDnsZoneSuffix.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- getPrivateDnsZoneSuffix(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ getPrivateDnsZoneSuffix(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.getPrivateDnsZoneSuffixes().executeWithResponse(com.azure.core.util.Context.NONE);
}
}
@@ -696,15 +795,18 @@ public final class GetPrivateDnsZoneSuffixExecuteSamples {
*/
public final class LocationBasedCapabilitiesExecuteSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/CapabilitiesByLocation.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * CapabilitiesByLocation.json
*/
/**
* Sample code: CapabilitiesList.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void capabilitiesList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
- manager.locationBasedCapabilities().execute("westus", com.azure.core.util.Context.NONE);
+ public static void
+ capabilitiesList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
+ manager.locationBasedCapabilities().execute("eastus", com.azure.core.util.Context.NONE);
}
}
```
@@ -717,15 +819,17 @@ public final class LocationBasedCapabilitiesExecuteSamples {
*/
public final class LogFilesListByServerSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/LogFilesListByServer.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * LogFilesListByServer.json
*/
/**
* Sample code: List all server log files for a server.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void
- listAllServerLogFilesForAServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void listAllServerLogFilesForAServer(
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.logFiles().listByServer("testrg", "postgresqltestsvc1", com.azure.core.util.Context.NONE);
}
}
@@ -739,14 +843,16 @@ public final class LogFilesListByServerSamples {
*/
public final class LtrBackupOperationsGetSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/LongTermRetentionOperationGet.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * LongTermRetentionOperationGet.json
*/
/**
* Sample code: Sample.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void sample(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void sample(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.ltrBackupOperations()
.getWithResponse("rgLongTermRetention", "pgsqlltrtestserver", "backup1", com.azure.core.util.Context.NONE);
}
@@ -761,15 +867,17 @@ public final class LtrBackupOperationsGetSamples {
*/
public final class LtrBackupOperationsListByServerSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/LongTermRetentionOperationListByServer.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * LongTermRetentionOperationListByServer.json
*/
/**
* Sample code: Sample List of Long Tern Retention Operations by Flexible Server.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void sampleListOfLongTernRetentionOperationsByFlexibleServer(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.ltrBackupOperations()
.listByServer("rgLongTermRetention", "pgsqlltrtestserver", com.azure.core.util.Context.NONE);
}
@@ -794,15 +902,17 @@ import java.util.Arrays;
*/
public final class MigrationsCreateSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/Migrations_Create_With_PrivateEndpoint_Servers.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * Migrations_Create_With_PrivateEndpoint_Servers.json
*/
/**
* Sample code: Migrations Create with private endpoint.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void migrationsCreateWithPrivateEndpoint(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.migrations()
.define("testmigration")
.withRegion("westus")
@@ -821,15 +931,17 @@ public final class MigrationsCreateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/Migrations_Create_With_Roles.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * Migrations_Create_With_Roles.json
*/
/**
* Sample code: Migrations Create with roles.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- migrationsCreateWithRoles(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ migrationsCreateWithRoles(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.migrations()
.define("testmigration")
.withRegion("westus")
@@ -847,15 +959,17 @@ public final class MigrationsCreateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/Migrations_Create_Validate_Only.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * Migrations_Create_Validate_Only.json
*/
/**
* Sample code: Create Pre-migration Validation.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void
- createPreMigrationValidation(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void createPreMigrationValidation(
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.migrations()
.define("testmigration")
.withRegion("westus")
@@ -873,15 +987,17 @@ public final class MigrationsCreateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/Migrations_Create_With_Other_Users.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * Migrations_Create_With_Other_Users.json
*/
/**
* Sample code: Migrations Create by passing user names.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void migrationsCreateByPassingUserNames(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.migrations()
.define("testmigration")
.withRegion("westus")
@@ -899,14 +1015,17 @@ public final class MigrationsCreateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/Migrations_Create.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/Migrations_Create.
+ * json
*/
/**
* Sample code: Migrations_Create.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void migrationsCreate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ migrationsCreate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.migrations()
.define("testmigration")
.withRegion("westus")
@@ -925,15 +1044,17 @@ public final class MigrationsCreateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/Migrations_Create_Other_SourceTypes_Validate_Migrate.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * Migrations_Create_Other_SourceTypes_Validate_Migrate.json
*/
/**
* Sample code: Create Migration with other source types for Validate and Migrate.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void createMigrationWithOtherSourceTypesForValidateAndMigrate(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.migrations()
.define("testmigration")
.withRegion("westus")
@@ -961,14 +1082,17 @@ public final class MigrationsCreateSamples {
*/
public final class MigrationsDeleteSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/Migrations_Delete.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/Migrations_Delete.
+ * json
*/
/**
* Sample code: Migrations_Delete.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void migrationsDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ migrationsDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.migrations()
.deleteWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration",
com.azure.core.util.Context.NONE);
@@ -984,74 +1108,85 @@ public final class MigrationsDeleteSamples {
*/
public final class MigrationsGetSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/Migrations_GetMigrationWithSuccessfulValidationOnly.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * Migrations_GetMigrationWithSuccessfulValidationOnly.json
*/
/**
* Sample code: Migrations_GetMigrationWithSuccessfulValidationOnly.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void migrationsGetMigrationWithSuccessfulValidationOnly(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.migrations()
.getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget",
"testmigrationwithsuccessfulvalidationonly", com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/Migrations_Get.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/Migrations_Get.
+ * json
*/
/**
* Sample code: Migrations_Get.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void migrationsGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ migrationsGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.migrations()
.getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration",
com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/Migrations_GetMigrationWithSuccessfulValidationButMigrationFailure.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * Migrations_GetMigrationWithSuccessfulValidationButMigrationFailure.json
*/
/**
* Sample code: Migrations_GetMigrationWithSuccessfulValidationButMigrationFailure.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void migrationsGetMigrationWithSuccessfulValidationButMigrationFailure(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.migrations()
.getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget",
"testmigrationwithsuccessfulvalidationbutmigrationfailure", com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/Migrations_GetMigrationWithSuccessfulValidationAndMigration.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * Migrations_GetMigrationWithSuccessfulValidationAndMigration.json
*/
/**
* Sample code: Migrations_GetMigrationWithSuccessfulValidationAndMigration.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void migrationsGetMigrationWithSuccessfulValidationAndMigration(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.migrations()
.getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget",
"testmigrationwithsuccessfulvalidationandmigration", com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/Migrations_GetMigrationWithValidationFailures.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * Migrations_GetMigrationWithValidationFailures.json
*/
/**
* Sample code: Migrations_GetMigrationWithValidationFailures.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void migrationsGetMigrationWithValidationFailures(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.migrations()
.getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget",
"testmigrationwithvalidationfailure", com.azure.core.util.Context.NONE);
@@ -1069,15 +1204,17 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationListFi
*/
public final class MigrationsListByTargetServerSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/Migrations_ListByTargetServer.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * Migrations_ListByTargetServer.json
*/
/**
* Sample code: Migrations_ListByTargetServer.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void
- migrationsListByTargetServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void migrationsListByTargetServer(
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.migrations()
.listByTargetServer("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", MigrationListFilter.ALL,
com.azure.core.util.Context.NONE);
@@ -1097,14 +1234,17 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResour
*/
public final class MigrationsUpdateSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/Migrations_Cancel.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/Migrations_Cancel.
+ * json
*/
/**
* Sample code: Cancel migration.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void cancelMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ cancelMigration(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
MigrationResource resource = manager.migrations()
.getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration",
com.azure.core.util.Context.NONE)
@@ -1113,14 +1253,17 @@ public final class MigrationsUpdateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/Migrations_Update.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/Migrations_Update.
+ * json
*/
/**
* Sample code: Migrations_Update.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void migrationsUpdate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ migrationsUpdate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
MigrationResource resource = manager.migrations()
.getWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget", "testmigration",
com.azure.core.util.Context.NONE)
@@ -1138,14 +1281,16 @@ public final class MigrationsUpdateSamples {
*/
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/OperationList.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/OperationList.json
*/
/**
* Sample code: OperationList.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void operationList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ operationList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.operations().listWithResponse(com.azure.core.util.Context.NONE);
}
}
@@ -1159,15 +1304,17 @@ public final class OperationsListSamples {
*/
public final class PrivateEndpointConnectionOperationDeleteSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/PrivateEndpointConnectionDelete.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * PrivateEndpointConnectionDelete.json
*/
/**
* Sample code: Deletes a private endpoint connection with a given name.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void deletesAPrivateEndpointConnectionWithAGivenName(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.privateEndpointConnectionOperations()
.delete("Default", "test-svr", "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e",
com.azure.core.util.Context.NONE);
@@ -1187,15 +1334,17 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServ
*/
public final class PrivateEndpointConnectionOperationUpdateSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/PrivateEndpointConnectionUpdate.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * PrivateEndpointConnectionUpdate.json
*/
/**
* Sample code: Approve or reject a private endpoint connection with a given name.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.privateEndpointConnectionOperations()
.update("Default", "test-svr", "private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e",
new PrivateEndpointConnectionInner().withPrivateLinkServiceConnectionState(
@@ -1214,15 +1363,17 @@ public final class PrivateEndpointConnectionOperationUpdateSamples {
*/
public final class PrivateEndpointConnectionsGetSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/PrivateEndpointConnectionGet.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * PrivateEndpointConnectionGet.json
*/
/**
* Sample code: Gets private endpoint connection.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void
- getsPrivateEndpointConnection(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void getsPrivateEndpointConnection(
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.privateEndpointConnections()
.getWithResponse("Default", "test-svr",
"private-endpoint-connection-name.1fa229cd-bf3f-47f0-8c49-afb36723997e",
@@ -1239,15 +1390,17 @@ public final class PrivateEndpointConnectionsGetSamples {
*/
public final class PrivateEndpointConnectionsListByServerSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/PrivateEndpointConnectionList.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * PrivateEndpointConnectionList.json
*/
/**
* Sample code: Gets list of private endpoint connections on a server.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void getsListOfPrivateEndpointConnectionsOnAServer(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.privateEndpointConnections().listByServer("Default", "test-svr", com.azure.core.util.Context.NONE);
}
}
@@ -1261,15 +1414,17 @@ public final class PrivateEndpointConnectionsListByServerSamples {
*/
public final class PrivateLinkResourcesGetSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/PrivateLinkResourcesGet.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * PrivateLinkResourcesGet.json
*/
/**
* Sample code: Gets a private link resource for PostgreSQL.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void getsAPrivateLinkResourceForPostgreSQL(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.privateLinkResources().getWithResponse("Default", "test-svr", "plr", com.azure.core.util.Context.NONE);
}
}
@@ -1283,42 +1438,22 @@ public final class PrivateLinkResourcesGetSamples {
*/
public final class PrivateLinkResourcesListByServerSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/PrivateLinkResourcesList.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * PrivateLinkResourcesList.json
*/
/**
* Sample code: Gets private link resources for PostgreSQL.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void getsPrivateLinkResourcesForPostgreSQL(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.privateLinkResources().listByServer("Default", "test-svr", com.azure.core.util.Context.NONE);
}
}
```
-### QuotaUsages_List
-
-```java
-/**
- * Samples for QuotaUsages List.
- */
-public final class QuotaUsagesListSamples {
- /*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/QuotaUsagesForFlexibleServers.json
- */
- /**
- * Sample code: List of quota usages for flexible servers.
- *
- * @param manager Entry point to PostgreSqlManager.
- */
- public static void listOfQuotaUsagesForFlexibleServers(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
- manager.quotaUsages().list("westus", com.azure.core.util.Context.NONE);
- }
-}
-```
-
### Replicas_ListByServer
```java
@@ -1327,15 +1462,17 @@ public final class QuotaUsagesListSamples {
*/
public final class ReplicasListByServerSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ReplicasListByServer.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ReplicasListByServer.json
*/
/**
* Sample code: ReplicasListByServer.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- replicasListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ replicasListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.replicas().listByServer("testrg", "sourcepgservername", com.azure.core.util.Context.NONE);
}
}
@@ -1351,15 +1488,17 @@ import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.Migratio
*/
public final class ResourceProviderCheckMigrationNameAvailabilitySamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/CheckMigrationNameAvailability.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * CheckMigrationNameAvailability.json
*/
/**
* Sample code: CheckMigrationNameAvailability.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void
- checkMigrationNameAvailability(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void checkMigrationNameAvailability(
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.resourceProviders()
.checkMigrationNameAvailabilityWithResponse("ffffffff-ffff-ffff-ffff-ffffffffffff", "testrg", "testtarget",
new MigrationNameAvailabilityResourceInner().withName("name1")
@@ -1377,15 +1516,17 @@ public final class ResourceProviderCheckMigrationNameAvailabilitySamples {
*/
public final class ServerCapabilitiesListSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerCapabilities.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/ServerCapabilities
+ * .json
*/
/**
* Sample code: ServerCapabilitiesList.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- serverCapabilitiesList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ serverCapabilitiesList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.serverCapabilities().list("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE);
}
}
@@ -1403,15 +1544,17 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectio
*/
public final class ServerThreatProtectionSettingsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerThreatProtectionSettingsCreateOrUpdate.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ServerThreatProtectionSettingsCreateOrUpdate.json
*/
/**
* Sample code: Update a server's Threat Protection settings.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void updateAServerSThreatProtectionSettings(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
ServerThreatProtectionSettingsModel resource = manager.serverThreatProtectionSettings()
.getWithResponse("threatprotection-4799", "threatprotection-6440", ThreatProtectionName.DEFAULT,
com.azure.core.util.Context.NONE)
@@ -1431,15 +1574,17 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectio
*/
public final class ServerThreatProtectionSettingsGetSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerThreatProtectionSettingsGet.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ServerThreatProtectionSettingsGet.json
*/
/**
* Sample code: Get a server's Threat Protection settings.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void getAServerSThreatProtectionSettings(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.serverThreatProtectionSettings()
.getWithResponse("threatprotection-6852", "threatprotection-2080", ThreatProtectionName.DEFAULT,
com.azure.core.util.Context.NONE);
@@ -1455,15 +1600,17 @@ public final class ServerThreatProtectionSettingsGetSamples {
*/
public final class ServerThreatProtectionSettingsListByServerSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerThreatProtectionSettingsListByServer.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ServerThreatProtectionSettingsListByServer.json
*/
/**
* Sample code: Get a server's Advanced Threat Protection settings.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void getAServerSAdvancedThreatProtectionSettings(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.serverThreatProtectionSettings()
.listByServer("threatprotection-6852", "threatprotection-2080", com.azure.core.util.Context.NONE);
}
@@ -1502,15 +1649,17 @@ import java.util.Map;
*/
public final class ServersCreateSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerCreateWithDataEncryptionEnabled.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ServerCreateWithDataEncryptionEnabled.json
*/
/**
* Sample code: ServerCreateWithDataEncryptionEnabled.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void serverCreateWithDataEncryptionEnabled(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers()
.define("pgtestsvc4")
.withRegion("westus")
@@ -1542,15 +1691,17 @@ public final class ServersCreateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerCreateReviveDropped.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ServerCreateReviveDropped.json
*/
/**
* Sample code: ServerCreateReviveDropped.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- serverCreateReviveDropped(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ serverCreateReviveDropped(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers()
.define("pgtestsvc5-rev")
.withRegion("westus")
@@ -1563,15 +1714,17 @@ public final class ServersCreateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerCreateGeoRestoreWithDataEncryptionEnabled.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ServerCreateGeoRestoreWithDataEncryptionEnabled.json
*/
/**
* Sample code: Create a database as a geo-restore in geo-paired location.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void createADatabaseAsAGeoRestoreInGeoPairedLocation(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers()
.define("pgtestsvc5geo")
.withRegion("eastus")
@@ -1596,14 +1749,16 @@ public final class ServersCreateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerCreate.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/ServerCreate.json
*/
/**
* Sample code: Create a new server.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void createANewServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ createANewServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers()
.define("pgtestsvc4")
.withRegion("westus")
@@ -1628,15 +1783,17 @@ public final class ServersCreateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerCreateWithAadAuthEnabled.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ServerCreateWithAadAuthEnabled.json
*/
/**
* Sample code: Create a new server with active directory authentication enabled.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void createANewServerWithActiveDirectoryAuthenticationEnabled(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers()
.define("pgtestsvc4")
.withRegion("westus")
@@ -1665,15 +1822,17 @@ public final class ServersCreateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerCreateReplica.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ServerCreateReplica.json
*/
/**
* Sample code: ServerCreateReplica.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- serverCreateReplica(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ serverCreateReplica(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers()
.define("pgtestsvc5rep")
.withRegion("westus")
@@ -1695,15 +1854,17 @@ public final class ServersCreateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerCreatePointInTimeRestore.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ServerCreatePointInTimeRestore.json
*/
/**
* Sample code: Create a database as a point in time restore.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void createADatabaseAsAPointInTimeRestore(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers()
.define("pgtestsvc5")
.withRegion("westus")
@@ -1737,14 +1898,16 @@ public final class ServersCreateSamples {
*/
public final class ServersDeleteSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerDelete.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/ServerDelete.json
*/
/**
* Sample code: ServerDelete.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void serverDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ serverDelete(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers().delete("testrg", "testserver", com.azure.core.util.Context.NONE);
}
}
@@ -1758,39 +1921,45 @@ public final class ServersDeleteSamples {
*/
public final class ServersGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerGetWithPrivateEndpoints.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ServerGetWithPrivateEndpoints.json
*/
/**
* Sample code: ServerGetWithPrivateEndpoints.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void
- serverGetWithPrivateEndpoints(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void serverGetWithPrivateEndpoints(
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers().getByResourceGroupWithResponse("testrg", "pgtestsvc2", com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerGet.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/ServerGet.json
*/
/**
* Sample code: ServerGet.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void serverGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void serverGet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers().getByResourceGroupWithResponse("testrg", "pgtestsvc1", com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerGetWithVnet.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/ServerGetWithVnet.
+ * json
*/
/**
* Sample code: ServerGetWithVnet.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void serverGetWithVnet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ serverGetWithVnet(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers().getByResourceGroupWithResponse("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE);
}
}
@@ -1804,14 +1973,15 @@ public final class ServersGetByResourceGroupSamples {
*/
public final class ServersListSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerList.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/ServerList.json
*/
/**
* Sample code: ServerList.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void serverList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void serverList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers().list(com.azure.core.util.Context.NONE);
}
}
@@ -1825,15 +1995,17 @@ public final class ServersListSamples {
*/
public final class ServersListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerListByResourceGroup.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ServerListByResourceGroup.json
*/
/**
* Sample code: ServerListByResourceGroup.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- serverListByResourceGroup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ serverListByResourceGroup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers().listByResourceGroup("testrg", com.azure.core.util.Context.NONE);
}
}
@@ -1850,27 +2022,31 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParamete
*/
public final class ServersRestartSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerRestart.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/ServerRestart.json
*/
/**
* Sample code: ServerRestart.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void serverRestart(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ serverRestart(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers().restart("testrg", "testserver", null, com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerRestartWithFailover.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ServerRestartWithFailover.json
*/
/**
* Sample code: ServerRestartWithFailover.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- serverRestartWithFailover(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ serverRestartWithFailover(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers()
.restart("testrg", "testserver",
new RestartParameter().withRestartWithFailover(true).withFailoverMode(FailoverMode.FORCED_FAILOVER),
@@ -1887,14 +2063,15 @@ public final class ServersRestartSamples {
*/
public final class ServersStartSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerStart.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/ServerStart.json
*/
/**
* Sample code: ServerStart.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void serverStart(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void serverStart(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers().start("testrg", "testserver", com.azure.core.util.Context.NONE);
}
}
@@ -1908,14 +2085,15 @@ public final class ServersStartSamples {
*/
public final class ServersStopSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerStop.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/ServerStop.json
*/
/**
* Sample code: ServerStop.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void serverStop(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void serverStop(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.servers().stop("testrg", "testserver", com.azure.core.util.Context.NONE);
}
}
@@ -1953,15 +2131,17 @@ import java.util.Map;
*/
public final class ServersUpdateSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerUpdateWithAadAuthEnabled.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ServerUpdateWithAadAuthEnabled.json
*/
/**
* Sample code: ServerUpdateWithAadAuthEnabled.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void
- serverUpdateWithAadAuthEnabled(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void serverUpdateWithAadAuthEnabled(
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
Server resource = manager.servers()
.getByResourceGroupWithResponse("TestGroup", "pgtestsvc4", com.azure.core.util.Context.NONE)
.getValue();
@@ -1980,15 +2160,17 @@ public final class ServersUpdateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerUpdateWithDataEncryptionEnabled.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ServerUpdateWithDataEncryptionEnabled.json
*/
/**
* Sample code: ServerUpdateWithDataEncryptionEnabled.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void serverUpdateWithDataEncryptionEnabled(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
Server resource = manager.servers()
.getByResourceGroupWithResponse("TestGroup", "pgtestsvc4", com.azure.core.util.Context.NONE)
.getValue();
@@ -2013,17 +2195,19 @@ public final class ServersUpdateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/PromoteReplicaAsPlannedSwitchover.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * PromoteReplicaAsPlannedSwitchover.json
*/
/**
* Sample code: SwitchOver a replica server as planned, i.e. it will wait for replication to complete before
* promoting replica as Primary and original primary as replica.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
switchOverAReplicaServerAsPlannedIEItWillWaitForReplicationToCompleteBeforePromotingReplicaAsPrimaryAndOriginalPrimaryAsReplica(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
Server resource = manager.servers()
.getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE)
.getValue();
@@ -2034,17 +2218,19 @@ public final class ServersUpdateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/PromoteReplicaAsForcedSwitchover.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * PromoteReplicaAsForcedSwitchover.json
*/
/**
* Sample code: SwitchOver a replica server as forced, i.e. it will replica as Primary and original primary as
* replica immediately without waiting for primary and replica to be in sync.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
switchOverAReplicaServerAsForcedIEItWillReplicaAsPrimaryAndOriginalPrimaryAsReplicaImmediatelyWithoutWaitingForPrimaryAndReplicaToBeInSync(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
Server resource = manager.servers()
.getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE)
.getValue();
@@ -2055,14 +2241,16 @@ public final class ServersUpdateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerUpdate.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/ServerUpdate.json
*/
/**
* Sample code: ServerUpdate.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void serverUpdate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void
+ serverUpdate(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
Server resource = manager.servers()
.getByResourceGroupWithResponse("TestGroup", "pgtestsvc4", com.azure.core.util.Context.NONE)
.getValue();
@@ -2078,15 +2266,17 @@ public final class ServersUpdateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerUpdateWithMajorVersionUpgrade.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ServerUpdateWithMajorVersionUpgrade.json
*/
/**
* Sample code: ServerUpdateWithMajorVersionUpgrade.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void serverUpdateWithMajorVersionUpgrade(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
Server resource = manager.servers()
.getByResourceGroupWithResponse("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE)
.getValue();
@@ -2094,15 +2284,17 @@ public final class ServersUpdateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * ServerUpdateWithCustomerMaintenanceWindow.json
*/
/**
* Sample code: ServerUpdateWithCustomerMaintenanceWindow.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void serverUpdateWithCustomerMaintenanceWindow(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
Server resource = manager.servers()
.getByResourceGroupWithResponse("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE)
.getValue();
@@ -2116,17 +2308,19 @@ public final class ServersUpdateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/PromoteReplicaAsForcedStandaloneServer.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * PromoteReplicaAsForcedStandaloneServer.json
*/
/**
* Sample code: Promote a replica server as a Standalone server as forced, i.e. it will promote a replica server
* immediately without waiting for primary and replica to be in sync.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
promoteAReplicaServerAsAStandaloneServerAsForcedIEItWillPromoteAReplicaServerImmediatelyWithoutWaitingForPrimaryAndReplicaToBeInSync(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
Server resource = manager.servers()
.getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE)
.getValue();
@@ -2137,16 +2331,18 @@ public final class ServersUpdateSamples {
}
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/PromoteReplicaAsPlannedStandaloneServer.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * PromoteReplicaAsPlannedStandaloneServer.json
*/
/**
* Sample code: Promote a replica server as a Standalone server as planned, i.e. it will wait for replication to
* complete.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void promoteAReplicaServerAsAStandaloneServerAsPlannedIEItWillWaitForReplicationToComplete(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
Server resource = manager.servers()
.getByResourceGroupWithResponse("testResourceGroup", "pgtestsvc4-replica", com.azure.core.util.Context.NONE)
.getValue();
@@ -2181,15 +2377,17 @@ import java.util.Arrays;
*/
public final class VirtualEndpointsCreateSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/VirtualEndpointCreate.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * VirtualEndpointCreate.json
*/
/**
* Sample code: Create a new virtual endpoint for a flexible server.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void createANewVirtualEndpointForAFlexibleServer(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.virtualEndpoints()
.define("pgVirtualEndpoint1")
.withExistingFlexibleServer("testrg", "pgtestsvc4")
@@ -2208,15 +2406,17 @@ public final class VirtualEndpointsCreateSamples {
*/
public final class VirtualEndpointsDeleteSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/VirtualEndpointDelete.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * VirtualEndpointDelete.json
*/
/**
* Sample code: Delete a virtual endpoint.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- deleteAVirtualEndpoint(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ deleteAVirtualEndpoint(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.virtualEndpoints()
.delete("testrg", "pgtestsvc4", "pgVirtualEndpoint1", com.azure.core.util.Context.NONE);
}
@@ -2231,15 +2431,17 @@ public final class VirtualEndpointsDeleteSamples {
*/
public final class VirtualEndpointsGetSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/VirtualEndpointsGet.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * VirtualEndpointsGet.json
*/
/**
* Sample code: Get a virtual endpoint.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void
- getAVirtualEndpoint(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ getAVirtualEndpoint(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.virtualEndpoints()
.getWithResponse("testrg", "pgtestsvc4", "pgVirtualEndpoint1", com.azure.core.util.Context.NONE);
}
@@ -2254,15 +2456,17 @@ public final class VirtualEndpointsGetSamples {
*/
public final class VirtualEndpointsListByServerSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/VirtualEndpointsListByServer.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * VirtualEndpointsListByServer.json
*/
/**
* Sample code: VirtualEndpointListByServer.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void
- virtualEndpointListByServer(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void virtualEndpointListByServer(
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.virtualEndpoints().listByServer("testrg", "pgtestsvc4", com.azure.core.util.Context.NONE);
}
}
@@ -2280,15 +2484,17 @@ import java.util.Arrays;
*/
public final class VirtualEndpointsUpdateSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/VirtualEndpointUpdate.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * VirtualEndpointUpdate.json
*/
/**
* Sample code: Update a virtual endpoint for a server to update the.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
public static void updateAVirtualEndpointForAServerToUpdateThe(
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
VirtualEndpointResource resource = manager.virtualEndpoints()
.getWithResponse("testrg", "pgtestsvc4", "pgVirtualEndpoint1", com.azure.core.util.Context.NONE)
.getValue();
@@ -2310,15 +2516,17 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkS
*/
public final class VirtualNetworkSubnetUsageExecuteSamples {
/*
- * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-12-01-preview/examples/VirtualNetworkSubnetUsage.json
+ * x-ms-original-file:
+ * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2024-08-01/examples/
+ * VirtualNetworkSubnetUsage.json
*/
/**
* Sample code: VirtualNetworkSubnetUsageList.
*
- * @param manager Entry point to PostgreSqlManager.
+ * @param manager Entry point to PostgreSqlServerManager.
*/
- public static void
- virtualNetworkSubnetUsageList(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
+ public static void virtualNetworkSubnetUsageList(
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager) {
manager.virtualNetworkSubnetUsages()
.executeWithResponse("westus", new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId(
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/testvnet"),
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml
index 9ac6af349f048..133c36d315f59 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml
@@ -17,8 +17,8 @@
1.1.0-beta.4
jar
- Microsoft Azure SDK for PostgreSql Management
- 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.
+ Microsoft Azure SDK for PostgreSqlServer Management
+ This package contains Microsoft Azure SDK for PostgreSqlServer 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-2024-08-01.
https://github.com/Azure/azure-sdk-for-java
@@ -48,6 +48,11 @@
true
+
+ com.azure
+ azure-json
+ 1.3.0
+
com.azure
azure-core
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlServerManager.java
similarity index 92%
rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java
rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlServerManager.java
index a0468b360fe58..aca6a052e7a44 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlServerManager.java
@@ -23,7 +23,7 @@
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PostgreSqlManagementClient;
+import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PostgreSqlServerManagementClient;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.AdministratorsImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.BackupsImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.CheckNameAvailabilitiesImpl;
@@ -38,11 +38,10 @@
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.LtrBackupOperationsImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.MigrationsImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.OperationsImpl;
-import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PostgreSqlManagementClientBuilder;
+import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PostgreSqlServerManagementClientBuilder;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateEndpointConnectionOperationsImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateEndpointConnectionsImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.PrivateLinkResourcesImpl;
-import com.azure.resourcemanager.postgresqlflexibleserver.implementation.QuotaUsagesImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ReplicasImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ResourceProvidersImpl;
import com.azure.resourcemanager.postgresqlflexibleserver.implementation.ServerCapabilitiesImpl;
@@ -67,7 +66,6 @@
import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionOperations;
import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnections;
import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkResources;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.QuotaUsages;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Replicas;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ResourceProviders;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerCapabilities;
@@ -83,12 +81,12 @@
import java.util.stream.Collectors;
/**
- * Entry point to PostgreSqlManager.
+ * Entry point to PostgreSqlServerManager.
* 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.
*/
-public final class PostgreSqlManager {
+public final class PostgreSqlServerManager {
private Administrators administrators;
private Backups backups;
@@ -127,8 +125,6 @@ public final class PostgreSqlManager {
private PrivateLinkResources privateLinkResources;
- private QuotaUsages quotaUsages;
-
private Replicas replicas;
private LogFiles logFiles;
@@ -139,12 +135,12 @@ public final class PostgreSqlManager {
private VirtualNetworkSubnetUsages virtualNetworkSubnetUsages;
- private final PostgreSqlManagementClient clientObject;
+ private final PostgreSqlServerManagementClient clientObject;
- private PostgreSqlManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ private PostgreSqlServerManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
- this.clientObject = new PostgreSqlManagementClientBuilder().pipeline(httpPipeline)
+ this.clientObject = new PostgreSqlServerManagementClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
@@ -152,38 +148,38 @@ private PostgreSqlManager(HttpPipeline httpPipeline, AzureProfile profile, Durat
}
/**
- * Creates an instance of PostgreSql service API entry point.
+ * Creates an instance of PostgreSqlServer service API entry point.
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
- * @return the PostgreSql service API instance.
+ * @return the PostgreSqlServer service API instance.
*/
- public static PostgreSqlManager authenticate(TokenCredential credential, AzureProfile profile) {
+ public static PostgreSqlServerManager authenticate(TokenCredential credential, AzureProfile profile) {
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
return configure().authenticate(credential, profile);
}
/**
- * Creates an instance of PostgreSql service API entry point.
+ * Creates an instance of PostgreSqlServer service API entry point.
*
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
* @param profile the Azure profile for client.
- * @return the PostgreSql service API instance.
+ * @return the PostgreSqlServer service API instance.
*/
- public static PostgreSqlManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ public static PostgreSqlServerManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
- return new PostgreSqlManager(httpPipeline, profile, null);
+ return new PostgreSqlServerManager(httpPipeline, profile, null);
}
/**
- * Gets a Configurable instance that can be used to create PostgreSqlManager with optional configuration.
+ * Gets a Configurable instance that can be used to create PostgreSqlServerManager with optional configuration.
*
* @return the Configurable instance allowing configurations.
*/
public static Configurable configure() {
- return new PostgreSqlManager.Configurable();
+ return new PostgreSqlServerManager.Configurable();
}
/**
@@ -288,13 +284,13 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
}
/**
- * Creates an instance of PostgreSql service API entry point.
+ * Creates an instance of PostgreSqlServer service API entry point.
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
- * @return the PostgreSql service API instance.
+ * @return the PostgreSqlServer service API instance.
*/
- public PostgreSqlManager authenticate(TokenCredential credential, AzureProfile profile) {
+ public PostgreSqlServerManager authenticate(TokenCredential credential, AzureProfile profile) {
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
@@ -303,7 +299,7 @@ public PostgreSqlManager authenticate(TokenCredential credential, AzureProfile p
.append("-")
.append("com.azure.resourcemanager.postgresqlflexibleserver")
.append("/")
- .append("1.1.0-beta.3");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -345,7 +341,7 @@ public PostgreSqlManager authenticate(TokenCredential credential, AzureProfile p
HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
.policies(policies.toArray(new HttpPipelinePolicy[0]))
.build();
- return new PostgreSqlManager(httpPipeline, profile, defaultPollInterval);
+ return new PostgreSqlServerManager(httpPipeline, profile, defaultPollInterval);
}
}
@@ -583,18 +579,6 @@ public PrivateLinkResources privateLinkResources() {
return privateLinkResources;
}
- /**
- * Gets the resource collection API of QuotaUsages.
- *
- * @return Resource collection API of QuotaUsages.
- */
- public QuotaUsages quotaUsages() {
- if (this.quotaUsages == null) {
- this.quotaUsages = new QuotaUsagesImpl(clientObject.getQuotaUsages(), this);
- }
- return quotaUsages;
- }
-
/**
* Gets the resource collection API of Replicas.
*
@@ -659,12 +643,12 @@ public VirtualNetworkSubnetUsages virtualNetworkSubnetUsages() {
}
/**
- * Gets wrapped service client PostgreSqlManagementClient providing direct access to the underlying auto-generated
- * API implementation, based on Azure REST API.
+ * Gets wrapped service client PostgreSqlServerManagementClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
*
- * @return Wrapped service client PostgreSqlManagementClient.
+ * @return Wrapped service client PostgreSqlServerManagementClient.
*/
- public PostgreSqlManagementClient serviceClient() {
+ public PostgreSqlServerManagementClient serviceClient() {
return this.clientObject;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsClient.java
index 4b4ef7d1a6e14..02ac67d512187 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsClient.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsClient.java
@@ -9,14 +9,223 @@
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/**
* An instance of this class provides access to all the operations defined in BackupsClient.
*/
public interface BackupsClient {
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return server backup properties along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono>> createWithResponseAsync(String resourceGroupName, String serverName,
+ String backupName);
+
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of server backup properties.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ PollerFlux, ServerBackupInner> beginCreateAsync(String resourceGroupName,
+ String serverName, String backupName);
+
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of server backup properties.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ServerBackupInner> beginCreate(String resourceGroupName,
+ String serverName, String backupName);
+
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of server backup properties.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ServerBackupInner> beginCreate(String resourceGroupName,
+ String serverName, String backupName, Context context);
+
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return server backup properties on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono createAsync(String resourceGroupName, String serverName, String backupName);
+
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return server backup properties.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerBackupInner create(String resourceGroupName, String serverName, String backupName);
+
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return server backup properties.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerBackupInner create(String resourceGroupName, String serverName, String backupName, Context context);
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName,
+ String backupName);
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName, String backupName);
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String backupName);
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String backupName,
+ Context context);
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Mono deleteAsync(String resourceGroupName, String serverName, String backupName);
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String backupName);
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String backupName, Context context);
+
/**
* Get specific backup for a given server.
*
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlManagementClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlServerManagementClient.java
similarity index 95%
rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlManagementClient.java
rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlServerManagementClient.java
index 6c7757cc61049..ac5111c62e018 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlManagementClient.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlServerManagementClient.java
@@ -8,9 +8,9 @@
import java.time.Duration;
/**
- * The interface for PostgreSqlManagementClient class.
+ * The interface for PostgreSqlServerManagementClient class.
*/
-public interface PostgreSqlManagementClient {
+public interface PostgreSqlServerManagementClient {
/**
* Gets The ID of the target subscription. The value must be an UUID.
*
@@ -179,13 +179,6 @@ public interface PostgreSqlManagementClient {
*/
PrivateLinkResourcesClient getPrivateLinkResources();
- /**
- * Gets the QuotaUsagesClient object to access its operations.
- *
- * @return the QuotaUsagesClient object.
- */
- QuotaUsagesClient getQuotaUsages();
-
/**
* Gets the ReplicasClient object to access its operations.
*
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/QuotaUsagesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/QuotaUsagesClient.java
deleted file mode 100644
index 59ed9de674a3d..0000000000000
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/QuotaUsagesClient.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.postgresqlflexibleserver.fluent;
-
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.http.rest.PagedFlux;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.QuotaUsageInner;
-
-/**
- * An instance of this class provides access to all the operations defined in QuotaUsagesClient.
- */
-public interface QuotaUsagesClient {
- /**
- * Get quota usages at specified location in a given subscription.
- *
- * @param locationName The name of the location.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return quota usages at specified location in a given subscription as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedFlux listAsync(String locationName);
-
- /**
- * Get quota usages at specified location in a given subscription.
- *
- * @param locationName The name of the location.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return quota usages at specified location in a given subscription as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String locationName);
-
- /**
- * Get quota usages at specified location in a given subscription.
- *
- * @param locationName The name of the location.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return quota usages at specified location in a given subscription as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String locationName, Context context);
-}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ActiveDirectoryAdministratorInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ActiveDirectoryAdministratorInner.java
index 777cba1bb74c3..472a9c5f83661 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ActiveDirectoryAdministratorInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ActiveDirectoryAdministratorInner.java
@@ -8,8 +8,11 @@
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* Represents an Active Directory administrator.
@@ -19,15 +22,28 @@ public final class ActiveDirectoryAdministratorInner extends ProxyResource {
/*
* Properties of the active directory administrator.
*/
- @JsonProperty(value = "properties", required = true)
private AdministratorProperties innerProperties = new AdministratorProperties();
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
/**
* Creates an instance of ActiveDirectoryAdministratorInner class.
*/
@@ -52,6 +68,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
/**
* Get the principalType property: The principal type used to represent the type of Active Directory Administrator.
*
@@ -160,4 +206,51 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryAdministratorInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ActiveDirectoryAdministratorInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ActiveDirectoryAdministratorInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ActiveDirectoryAdministratorInner.
+ */
+ public static ActiveDirectoryAdministratorInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ActiveDirectoryAdministratorInner deserializedActiveDirectoryAdministratorInner
+ = new ActiveDirectoryAdministratorInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedActiveDirectoryAdministratorInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedActiveDirectoryAdministratorInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedActiveDirectoryAdministratorInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedActiveDirectoryAdministratorInner.innerProperties
+ = AdministratorProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedActiveDirectoryAdministratorInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedActiveDirectoryAdministratorInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorProperties.java
index 3d1af6b11bd30..4b5870a0954e5 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorProperties.java
@@ -5,36 +5,36 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* The properties of an Active Directory administrator.
*/
@Fluent
-public final class AdministratorProperties {
+public final class AdministratorProperties implements JsonSerializable {
/*
* The principal type used to represent the type of Active Directory Administrator.
*/
- @JsonProperty(value = "principalType")
private PrincipalType principalType;
/*
* Active Directory administrator principal name.
*/
- @JsonProperty(value = "principalName")
private String principalName;
/*
* The objectId of the Active Directory administrator.
*/
- @JsonProperty(value = "objectId")
private String objectId;
/*
* The tenantId of the Active Directory administrator.
*/
- @JsonProperty(value = "tenantId")
private String tenantId;
/**
@@ -130,4 +130,49 @@ public AdministratorProperties withTenantId(String tenantId) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("principalType", this.principalType == null ? null : this.principalType.toString());
+ jsonWriter.writeStringField("principalName", this.principalName);
+ jsonWriter.writeStringField("objectId", this.objectId);
+ jsonWriter.writeStringField("tenantId", this.tenantId);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AdministratorProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AdministratorProperties if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the AdministratorProperties.
+ */
+ public static AdministratorProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AdministratorProperties deserializedAdministratorProperties = new AdministratorProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("principalType".equals(fieldName)) {
+ deserializedAdministratorProperties.principalType = PrincipalType.fromString(reader.getString());
+ } else if ("principalName".equals(fieldName)) {
+ deserializedAdministratorProperties.principalName = reader.getString();
+ } else if ("objectId".equals(fieldName)) {
+ deserializedAdministratorProperties.objectId = reader.getString();
+ } else if ("tenantId".equals(fieldName)) {
+ deserializedAdministratorProperties.tenantId = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAdministratorProperties;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorPropertiesForAdd.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorPropertiesForAdd.java
index 323aac3fd0988..c13a9e87357e1 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorPropertiesForAdd.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorPropertiesForAdd.java
@@ -5,30 +5,31 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* The properties of an Active Directory administrator.
*/
@Fluent
-public final class AdministratorPropertiesForAdd {
+public final class AdministratorPropertiesForAdd implements JsonSerializable {
/*
* The principal type used to represent the type of Active Directory Administrator.
*/
- @JsonProperty(value = "principalType")
private PrincipalType principalType;
/*
* Active Directory administrator principal name.
*/
- @JsonProperty(value = "principalName")
private String principalName;
/*
* The tenantId of the Active Directory administrator.
*/
- @JsonProperty(value = "tenantId")
private String tenantId;
/**
@@ -104,4 +105,48 @@ public AdministratorPropertiesForAdd withTenantId(String tenantId) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("principalType", this.principalType == null ? null : this.principalType.toString());
+ jsonWriter.writeStringField("principalName", this.principalName);
+ jsonWriter.writeStringField("tenantId", this.tenantId);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AdministratorPropertiesForAdd from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AdministratorPropertiesForAdd if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the AdministratorPropertiesForAdd.
+ */
+ public static AdministratorPropertiesForAdd fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AdministratorPropertiesForAdd deserializedAdministratorPropertiesForAdd
+ = new AdministratorPropertiesForAdd();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("principalType".equals(fieldName)) {
+ deserializedAdministratorPropertiesForAdd.principalType
+ = PrincipalType.fromString(reader.getString());
+ } else if ("principalName".equals(fieldName)) {
+ deserializedAdministratorPropertiesForAdd.principalName = reader.getString();
+ } else if ("tenantId".equals(fieldName)) {
+ deserializedAdministratorPropertiesForAdd.tenantId = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAdministratorPropertiesForAdd;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java
index efca974664e0c..2ddcc39e8fc75 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java
@@ -7,8 +7,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationDataType;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* Represents a Configuration.
@@ -18,15 +21,28 @@ public final class ConfigurationInner extends ProxyResource {
/*
* The properties of a configuration.
*/
- @JsonProperty(value = "properties")
private ConfigurationProperties innerProperties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
/**
* Creates an instance of ConfigurationInner class.
*/
@@ -52,7 +68,37 @@ public SystemData systemData() {
}
/**
- * Get the value property: Value of the configuration.
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the value property: Value of the configuration. Required to update the configuration.
*
* @return the value value.
*/
@@ -61,7 +107,7 @@ public String value() {
}
/**
- * Set the value property: Value of the configuration.
+ * Set the value property: Value of the configuration. Required to update the configuration.
*
* @param value the value value to set.
* @return the ConfigurationInner object itself.
@@ -111,7 +157,7 @@ public String allowedValues() {
}
/**
- * Get the source property: Source of the configuration.
+ * Get the source property: Source of the configuration. Required to update the configuration.
*
* @return the source value.
*/
@@ -120,7 +166,7 @@ public String source() {
}
/**
- * Set the source property: Source of the configuration.
+ * Set the source property: Source of the configuration. Required to update the configuration.
*
* @param source the source value to set.
* @return the ConfigurationInner object itself.
@@ -188,4 +234,49 @@ public void validate() {
innerProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ConfigurationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ConfigurationInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ConfigurationInner.
+ */
+ public static ConfigurationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ConfigurationInner deserializedConfigurationInner = new ConfigurationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedConfigurationInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedConfigurationInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedConfigurationInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedConfigurationInner.innerProperties = ConfigurationProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedConfigurationInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedConfigurationInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationProperties.java
index a26cc1ee156f3..2557185782c2d 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationProperties.java
@@ -5,78 +5,71 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationDataType;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* The properties of a configuration.
*/
@Fluent
-public final class ConfigurationProperties {
+public final class ConfigurationProperties implements JsonSerializable {
/*
- * Value of the configuration.
+ * Value of the configuration. Required to update the configuration.
*/
- @JsonProperty(value = "value")
private String value;
/*
* Description of the configuration.
*/
- @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
private String description;
/*
* Default value of the configuration.
*/
- @JsonProperty(value = "defaultValue", access = JsonProperty.Access.WRITE_ONLY)
private String defaultValue;
/*
* Data type of the configuration.
*/
- @JsonProperty(value = "dataType", access = JsonProperty.Access.WRITE_ONLY)
private ConfigurationDataType dataType;
/*
* Allowed values of the configuration.
*/
- @JsonProperty(value = "allowedValues", access = JsonProperty.Access.WRITE_ONLY)
private String allowedValues;
/*
- * Source of the configuration.
+ * Source of the configuration. Required to update the configuration.
*/
- @JsonProperty(value = "source")
private String source;
/*
* Configuration dynamic or static.
*/
- @JsonProperty(value = "isDynamicConfig", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isDynamicConfig;
/*
* Configuration read-only or not.
*/
- @JsonProperty(value = "isReadOnly", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isReadOnly;
/*
* Configuration is pending restart or not.
*/
- @JsonProperty(value = "isConfigPendingRestart", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isConfigPendingRestart;
/*
* Configuration unit.
*/
- @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY)
private String unit;
/*
* Configuration documentation link.
*/
- @JsonProperty(value = "documentationLink", access = JsonProperty.Access.WRITE_ONLY)
private String documentationLink;
/**
@@ -86,7 +79,7 @@ public ConfigurationProperties() {
}
/**
- * Get the value property: Value of the configuration.
+ * Get the value property: Value of the configuration. Required to update the configuration.
*
* @return the value value.
*/
@@ -95,7 +88,7 @@ public String value() {
}
/**
- * Set the value property: Value of the configuration.
+ * Set the value property: Value of the configuration. Required to update the configuration.
*
* @param value the value value to set.
* @return the ConfigurationProperties object itself.
@@ -142,7 +135,7 @@ public String allowedValues() {
}
/**
- * Get the source property: Source of the configuration.
+ * Get the source property: Source of the configuration. Required to update the configuration.
*
* @return the source value.
*/
@@ -151,7 +144,7 @@ public String source() {
}
/**
- * Set the source property: Source of the configuration.
+ * Set the source property: Source of the configuration. Required to update the configuration.
*
* @param source the source value to set.
* @return the ConfigurationProperties object itself.
@@ -213,4 +206,62 @@ public String documentationLink() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("value", this.value);
+ jsonWriter.writeStringField("source", this.source);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ConfigurationProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ConfigurationProperties if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ConfigurationProperties.
+ */
+ public static ConfigurationProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ConfigurationProperties deserializedConfigurationProperties = new ConfigurationProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ deserializedConfigurationProperties.value = reader.getString();
+ } else if ("description".equals(fieldName)) {
+ deserializedConfigurationProperties.description = reader.getString();
+ } else if ("defaultValue".equals(fieldName)) {
+ deserializedConfigurationProperties.defaultValue = reader.getString();
+ } else if ("dataType".equals(fieldName)) {
+ deserializedConfigurationProperties.dataType = ConfigurationDataType.fromString(reader.getString());
+ } else if ("allowedValues".equals(fieldName)) {
+ deserializedConfigurationProperties.allowedValues = reader.getString();
+ } else if ("source".equals(fieldName)) {
+ deserializedConfigurationProperties.source = reader.getString();
+ } else if ("isDynamicConfig".equals(fieldName)) {
+ deserializedConfigurationProperties.isDynamicConfig = reader.getNullable(JsonReader::getBoolean);
+ } else if ("isReadOnly".equals(fieldName)) {
+ deserializedConfigurationProperties.isReadOnly = reader.getNullable(JsonReader::getBoolean);
+ } else if ("isConfigPendingRestart".equals(fieldName)) {
+ deserializedConfigurationProperties.isConfigPendingRestart
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("unit".equals(fieldName)) {
+ deserializedConfigurationProperties.unit = reader.getString();
+ } else if ("documentationLink".equals(fieldName)) {
+ deserializedConfigurationProperties.documentationLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedConfigurationProperties;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java
index 744ca3ed12acc..bb0ddcb7f6a6b 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java
@@ -7,7 +7,10 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Represents a Database.
@@ -17,15 +20,28 @@ public final class DatabaseInner extends ProxyResource {
/*
* The properties of a database.
*/
- @JsonProperty(value = "properties")
private DatabaseProperties innerProperties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
/**
* Creates an instance of DatabaseInner class.
*/
@@ -50,6 +66,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
/**
* Get the charset property: The charset of the database.
*
@@ -106,4 +152,49 @@ public void validate() {
innerProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DatabaseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DatabaseInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the DatabaseInner.
+ */
+ public static DatabaseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DatabaseInner deserializedDatabaseInner = new DatabaseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedDatabaseInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedDatabaseInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedDatabaseInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedDatabaseInner.innerProperties = DatabaseProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedDatabaseInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDatabaseInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseProperties.java
index 6f74dd0af06cf..d36bf2b3659aa 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseProperties.java
@@ -5,23 +5,25 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* The properties of a database.
*/
@Fluent
-public final class DatabaseProperties {
+public final class DatabaseProperties implements JsonSerializable {
/*
* The charset of the database.
*/
- @JsonProperty(value = "charset")
private String charset;
/*
* The collation of the database.
*/
- @JsonProperty(value = "collation")
private String collation;
/**
@@ -77,4 +79,43 @@ public DatabaseProperties withCollation(String collation) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("charset", this.charset);
+ jsonWriter.writeStringField("collation", this.collation);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DatabaseProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DatabaseProperties if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the DatabaseProperties.
+ */
+ public static DatabaseProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DatabaseProperties deserializedDatabaseProperties = new DatabaseProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("charset".equals(fieldName)) {
+ deserializedDatabaseProperties.charset = reader.getString();
+ } else if ("collation".equals(fieldName)) {
+ deserializedDatabaseProperties.collation = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDatabaseProperties;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java
index 8d31aae3c0437..4494702a88ec9 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java
@@ -8,7 +8,10 @@
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Represents a server firewall rule.
@@ -18,15 +21,28 @@ public final class FirewallRuleInner extends ProxyResource {
/*
* The properties of a firewall rule.
*/
- @JsonProperty(value = "properties", required = true)
private FirewallRuleProperties innerProperties = new FirewallRuleProperties();
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
/**
* Creates an instance of FirewallRuleInner class.
*/
@@ -51,6 +67,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
/**
* Get the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format.
*
@@ -113,4 +159,49 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(FirewallRuleInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FirewallRuleInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FirewallRuleInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the FirewallRuleInner.
+ */
+ public static FirewallRuleInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FirewallRuleInner deserializedFirewallRuleInner = new FirewallRuleInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedFirewallRuleInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedFirewallRuleInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedFirewallRuleInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedFirewallRuleInner.innerProperties = FirewallRuleProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedFirewallRuleInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFirewallRuleInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java
index ce9bfb43aae35..52e91af5d16d0 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java
@@ -6,23 +6,25 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* The properties of a server firewall rule.
*/
@Fluent
-public final class FirewallRuleProperties {
+public final class FirewallRuleProperties implements JsonSerializable {
/*
* The start IP address of the server firewall rule. Must be IPv4 format.
*/
- @JsonProperty(value = "startIpAddress", required = true)
private String startIpAddress;
/*
* The end IP address of the server firewall rule. Must be IPv4 format.
*/
- @JsonProperty(value = "endIpAddress", required = true)
private String endIpAddress;
/**
@@ -90,4 +92,44 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(FirewallRuleProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("startIpAddress", this.startIpAddress);
+ jsonWriter.writeStringField("endIpAddress", this.endIpAddress);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FirewallRuleProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FirewallRuleProperties if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the FirewallRuleProperties.
+ */
+ public static FirewallRuleProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FirewallRuleProperties deserializedFirewallRuleProperties = new FirewallRuleProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("startIpAddress".equals(fieldName)) {
+ deserializedFirewallRuleProperties.startIpAddress = reader.getString();
+ } else if ("endIpAddress".equals(fieldName)) {
+ deserializedFirewallRuleProperties.endIpAddress = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFirewallRuleProperties;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FlexibleServerCapabilityInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FlexibleServerCapabilityInner.java
index c16d8c39e52b1..ddf05ffe6f1cf 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FlexibleServerCapabilityInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FlexibleServerCapabilityInner.java
@@ -5,7 +5,11 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityBase;
+import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityStatus;
import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningEditionCapability;
import com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningSupportedEnum;
import com.azure.resourcemanager.postgresqlflexibleserver.models.FlexibleServerEditionCapability;
@@ -16,7 +20,7 @@
import com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrowthSupportedEnum;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHaAndGeoBackupSupportedEnum;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHaSupportedEnum;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
@@ -27,69 +31,76 @@ public final class FlexibleServerCapabilityInner extends CapabilityBase {
/*
* Name of flexible servers capability
*/
- @JsonProperty(value = "name")
private String name;
/*
* List of supported flexible server editions
*/
- @JsonProperty(value = "supportedServerEditions", access = JsonProperty.Access.WRITE_ONLY)
private List supportedServerEditions;
/*
* The list of server versions supported for this capability.
*/
- @JsonProperty(value = "supportedServerVersions", access = JsonProperty.Access.WRITE_ONLY)
private List 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;
/*
* List of supported server editions for fast provisioning
*/
- @JsonProperty(value = "supportedFastProvisioningEditions", access = JsonProperty.Access.WRITE_ONLY)
private List 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;
+ /*
+ * The reason for the capability not being available.
+ */
+ private String reason;
+
+ /*
+ * The status of the capability.
+ */
+ private CapabilityStatus status;
+
/**
* Creates an instance of FlexibleServerCapabilityInner class.
*/
@@ -215,6 +226,26 @@ public RestrictedEnum restricted() {
return this.restricted;
}
+ /**
+ * Get the reason property: The reason for the capability not being available.
+ *
+ * @return the reason value.
+ */
+ @Override
+ public String reason() {
+ return this.reason;
+ }
+
+ /**
+ * Get the status property: The status of the capability.
+ *
+ * @return the status value.
+ */
+ @Override
+ public CapabilityStatus status() {
+ return this.status;
+ }
+
/**
* Validates the instance.
*
@@ -222,7 +253,6 @@ public RestrictedEnum restricted() {
*/
@Override
public void validate() {
- super.validate();
if (supportedServerEditions() != null) {
supportedServerEditions().forEach(e -> e.validate());
}
@@ -233,4 +263,79 @@ public void validate() {
supportedFastProvisioningEditions().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("name", this.name);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FlexibleServerCapabilityInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FlexibleServerCapabilityInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the FlexibleServerCapabilityInner.
+ */
+ public static FlexibleServerCapabilityInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FlexibleServerCapabilityInner deserializedFlexibleServerCapabilityInner
+ = new FlexibleServerCapabilityInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("status".equals(fieldName)) {
+ deserializedFlexibleServerCapabilityInner.status = CapabilityStatus.fromString(reader.getString());
+ } else if ("reason".equals(fieldName)) {
+ deserializedFlexibleServerCapabilityInner.reason = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedFlexibleServerCapabilityInner.name = reader.getString();
+ } else if ("supportedServerEditions".equals(fieldName)) {
+ List supportedServerEditions
+ = reader.readArray(reader1 -> FlexibleServerEditionCapability.fromJson(reader1));
+ deserializedFlexibleServerCapabilityInner.supportedServerEditions = supportedServerEditions;
+ } else if ("supportedServerVersions".equals(fieldName)) {
+ List supportedServerVersions
+ = reader.readArray(reader1 -> ServerVersionCapability.fromJson(reader1));
+ deserializedFlexibleServerCapabilityInner.supportedServerVersions = supportedServerVersions;
+ } else if ("fastProvisioningSupported".equals(fieldName)) {
+ deserializedFlexibleServerCapabilityInner.fastProvisioningSupported
+ = FastProvisioningSupportedEnum.fromString(reader.getString());
+ } else if ("supportedFastProvisioningEditions".equals(fieldName)) {
+ List supportedFastProvisioningEditions
+ = reader.readArray(reader1 -> FastProvisioningEditionCapability.fromJson(reader1));
+ deserializedFlexibleServerCapabilityInner.supportedFastProvisioningEditions
+ = supportedFastProvisioningEditions;
+ } else if ("geoBackupSupported".equals(fieldName)) {
+ deserializedFlexibleServerCapabilityInner.geoBackupSupported
+ = GeoBackupSupportedEnum.fromString(reader.getString());
+ } else if ("zoneRedundantHaSupported".equals(fieldName)) {
+ deserializedFlexibleServerCapabilityInner.zoneRedundantHaSupported
+ = ZoneRedundantHaSupportedEnum.fromString(reader.getString());
+ } else if ("zoneRedundantHaAndGeoBackupSupported".equals(fieldName)) {
+ deserializedFlexibleServerCapabilityInner.zoneRedundantHaAndGeoBackupSupported
+ = ZoneRedundantHaAndGeoBackupSupportedEnum.fromString(reader.getString());
+ } else if ("storageAutoGrowthSupported".equals(fieldName)) {
+ deserializedFlexibleServerCapabilityInner.storageAutoGrowthSupported
+ = StorageAutoGrowthSupportedEnum.fromString(reader.getString());
+ } else if ("onlineResizeSupported".equals(fieldName)) {
+ deserializedFlexibleServerCapabilityInner.onlineResizeSupported
+ = OnlineResizeSupportedEnum.fromString(reader.getString());
+ } else if ("restricted".equals(fieldName)) {
+ deserializedFlexibleServerCapabilityInner.restricted
+ = RestrictedEnum.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFlexibleServerCapabilityInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileInner.java
index afa898bd1f6df..24ea03ff48f58 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileInner.java
@@ -7,7 +7,10 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.time.OffsetDateTime;
/**
@@ -18,15 +21,28 @@ public final class LogFileInner extends ProxyResource {
/*
* The properties of a logFile.
*/
- @JsonProperty(value = "properties")
private LogFileProperties innerProperties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
/**
* Creates an instance of LogFileInner class.
*/
@@ -51,6 +67,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
/**
* Get the createdTime property: Creation timestamp of the log file.
*
@@ -176,4 +222,49 @@ public void validate() {
innerProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LogFileInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LogFileInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the LogFileInner.
+ */
+ public static LogFileInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LogFileInner deserializedLogFileInner = new LogFileInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedLogFileInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedLogFileInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedLogFileInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedLogFileInner.innerProperties = LogFileProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedLogFileInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLogFileInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileProperties.java
index 5dae643968217..33fca6e804c6d 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LogFileProperties.java
@@ -5,42 +5,43 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
/**
* The properties of a logFile.
*/
@Fluent
-public final class LogFileProperties {
+public final class LogFileProperties implements JsonSerializable {
/*
* Creation timestamp of the log file.
*/
- @JsonProperty(value = "createdTime")
private OffsetDateTime createdTime;
/*
* Last modified timestamp of the log file.
*/
- @JsonProperty(value = "lastModifiedTime")
private OffsetDateTime lastModifiedTime;
/*
* The size in kb of the logFile.
*/
- @JsonProperty(value = "sizeInKb")
private Long sizeInKb;
/*
* Type of the log file.
*/
- @JsonProperty(value = "type")
private String type;
/*
* The url to download the log file from.
*/
- @JsonProperty(value = "url")
private String url;
/**
@@ -156,4 +157,58 @@ public LogFileProperties withUrl(String url) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("createdTime",
+ this.createdTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.createdTime));
+ jsonWriter.writeStringField("lastModifiedTime",
+ this.lastModifiedTime == null
+ ? null
+ : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastModifiedTime));
+ jsonWriter.writeNumberField("sizeInKb", this.sizeInKb);
+ jsonWriter.writeStringField("type", this.type);
+ jsonWriter.writeStringField("url", this.url);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LogFileProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LogFileProperties if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the LogFileProperties.
+ */
+ public static LogFileProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LogFileProperties deserializedLogFileProperties = new LogFileProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("createdTime".equals(fieldName)) {
+ deserializedLogFileProperties.createdTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("lastModifiedTime".equals(fieldName)) {
+ deserializedLogFileProperties.lastModifiedTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("sizeInKb".equals(fieldName)) {
+ deserializedLogFileProperties.sizeInKb = reader.getNullable(JsonReader::getLong);
+ } else if ("type".equals(fieldName)) {
+ deserializedLogFileProperties.type = reader.getString();
+ } else if ("url".equals(fieldName)) {
+ deserializedLogFileProperties.url = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLogFileProperties;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrBackupOperationResponseProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrBackupOperationResponseProperties.java
index 7fc16e1be0d38..86979a58aba91 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrBackupOperationResponseProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrBackupOperationResponseProperties.java
@@ -5,74 +5,72 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ExecutionStatus;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
/**
* Response for the backup request.
*/
@Fluent
-public final class LtrBackupOperationResponseProperties {
+public final class LtrBackupOperationResponseProperties
+ implements JsonSerializable {
/*
* Size of datasource in bytes
*/
- @JsonProperty(value = "datasourceSizeInBytes")
private Long datasourceSizeInBytes;
/*
* Data transferred in bytes
*/
- @JsonProperty(value = "dataTransferredInBytes")
private Long dataTransferredInBytes;
/*
* Name of Backup operation
*/
- @JsonProperty(value = "backupName")
private String backupName;
/*
- * Metadata to be stored in RP. Store everything that will be required to perform a successful restore using this Recovery point. e.g. Versions, DataFormat etc
+ * Metadata to be stored in RP. Store everything that will be required to perform a successful restore using this
+ * Recovery point. e.g. Versions, DataFormat etc
*/
- @JsonProperty(value = "backupMetadata")
private String backupMetadata;
/*
* Service-set extensible enum indicating the status of operation
*/
- @JsonProperty(value = "status", required = true)
private ExecutionStatus status;
/*
* Start time of the operation.
*/
- @JsonProperty(value = "startTime", required = true)
private OffsetDateTime startTime;
/*
* End time of the operation.
*/
- @JsonProperty(value = "endTime")
private OffsetDateTime endTime;
/*
* PercentageCompleted
*/
- @JsonProperty(value = "percentComplete")
private Double percentComplete;
/*
* The error code.
*/
- @JsonProperty(value = "errorCode", access = JsonProperty.Access.WRITE_ONLY)
private String errorCode;
/*
* The error message.
*/
- @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY)
private String errorMessage;
/**
@@ -280,4 +278,75 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(LtrBackupOperationResponseProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString());
+ jsonWriter.writeStringField("startTime",
+ this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime));
+ jsonWriter.writeNumberField("datasourceSizeInBytes", this.datasourceSizeInBytes);
+ jsonWriter.writeNumberField("dataTransferredInBytes", this.dataTransferredInBytes);
+ jsonWriter.writeStringField("backupName", this.backupName);
+ jsonWriter.writeStringField("backupMetadata", this.backupMetadata);
+ jsonWriter.writeStringField("endTime",
+ this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime));
+ jsonWriter.writeNumberField("percentComplete", this.percentComplete);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LtrBackupOperationResponseProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LtrBackupOperationResponseProperties if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the LtrBackupOperationResponseProperties.
+ */
+ public static LtrBackupOperationResponseProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LtrBackupOperationResponseProperties deserializedLtrBackupOperationResponseProperties
+ = new LtrBackupOperationResponseProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("status".equals(fieldName)) {
+ deserializedLtrBackupOperationResponseProperties.status
+ = ExecutionStatus.fromString(reader.getString());
+ } else if ("startTime".equals(fieldName)) {
+ deserializedLtrBackupOperationResponseProperties.startTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("datasourceSizeInBytes".equals(fieldName)) {
+ deserializedLtrBackupOperationResponseProperties.datasourceSizeInBytes
+ = reader.getNullable(JsonReader::getLong);
+ } else if ("dataTransferredInBytes".equals(fieldName)) {
+ deserializedLtrBackupOperationResponseProperties.dataTransferredInBytes
+ = reader.getNullable(JsonReader::getLong);
+ } else if ("backupName".equals(fieldName)) {
+ deserializedLtrBackupOperationResponseProperties.backupName = reader.getString();
+ } else if ("backupMetadata".equals(fieldName)) {
+ deserializedLtrBackupOperationResponseProperties.backupMetadata = reader.getString();
+ } else if ("endTime".equals(fieldName)) {
+ deserializedLtrBackupOperationResponseProperties.endTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("percentComplete".equals(fieldName)) {
+ deserializedLtrBackupOperationResponseProperties.percentComplete
+ = reader.getNullable(JsonReader::getDouble);
+ } else if ("errorCode".equals(fieldName)) {
+ deserializedLtrBackupOperationResponseProperties.errorCode = reader.getString();
+ } else if ("errorMessage".equals(fieldName)) {
+ deserializedLtrBackupOperationResponseProperties.errorMessage = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLtrBackupOperationResponseProperties;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrBackupResponseInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrBackupResponseInner.java
index d838496e46fff..bbedaaf574961 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrBackupResponseInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrBackupResponseInner.java
@@ -5,19 +5,22 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ExecutionStatus;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.time.OffsetDateTime;
/**
* Response for the LTR backup API call.
*/
@Fluent
-public final class LtrBackupResponseInner {
+public final class LtrBackupResponseInner implements JsonSerializable {
/*
* Long Term Retention Backup Operation Resource Properties
*/
- @JsonProperty(value = "properties")
private LtrBackupOperationResponseProperties innerProperties;
/**
@@ -249,4 +252,41 @@ public void validate() {
innerProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LtrBackupResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LtrBackupResponseInner if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the LtrBackupResponseInner.
+ */
+ public static LtrBackupResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LtrBackupResponseInner deserializedLtrBackupResponseInner = new LtrBackupResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("properties".equals(fieldName)) {
+ deserializedLtrBackupResponseInner.innerProperties
+ = LtrBackupOperationResponseProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLtrBackupResponseInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseInner.java
index ed59cf5c3ca12..e7c116634f0a6 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseInner.java
@@ -6,17 +6,20 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Response for the LTR pre-backup API call.
*/
@Fluent
-public final class LtrPreBackupResponseInner {
+public final class LtrPreBackupResponseInner implements JsonSerializable {
/*
* Additional Properties for the pre backup response
*/
- @JsonProperty(value = "properties", required = true)
private LtrPreBackupResponseProperties innerProperties = new LtrPreBackupResponseProperties();
/**
@@ -75,4 +78,42 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(LtrPreBackupResponseInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LtrPreBackupResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LtrPreBackupResponseInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the LtrPreBackupResponseInner.
+ */
+ public static LtrPreBackupResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LtrPreBackupResponseInner deserializedLtrPreBackupResponseInner = new LtrPreBackupResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("properties".equals(fieldName)) {
+ deserializedLtrPreBackupResponseInner.innerProperties
+ = LtrPreBackupResponseProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLtrPreBackupResponseInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseProperties.java
index be360b95b1e6b..bb2f3db3604f2 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseProperties.java
@@ -5,17 +5,21 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Response for the pre-backup request.
*/
@Fluent
-public final class LtrPreBackupResponseProperties {
+public final class LtrPreBackupResponseProperties implements JsonSerializable {
/*
- * Number of storage containers the plugin will use during backup. More than one containers may be used for size limitations, parallelism, or redundancy etc.
+ * Number of storage containers the plugin will use during backup. More than one containers may be used for size
+ * limitations, parallelism, or redundancy etc.
*/
- @JsonProperty(value = "numberOfContainers", required = true)
private int numberOfContainers;
/**
@@ -53,4 +57,42 @@ public LtrPreBackupResponseProperties withNumberOfContainers(int numberOfContain
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeIntField("numberOfContainers", this.numberOfContainers);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LtrPreBackupResponseProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LtrPreBackupResponseProperties if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the LtrPreBackupResponseProperties.
+ */
+ public static LtrPreBackupResponseProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LtrPreBackupResponseProperties deserializedLtrPreBackupResponseProperties
+ = new LtrPreBackupResponseProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("numberOfContainers".equals(fieldName)) {
+ deserializedLtrPreBackupResponseProperties.numberOfContainers = reader.getInt();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLtrPreBackupResponseProperties;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrServerBackupOperationInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrServerBackupOperationInner.java
index 251b3cf063c29..bbc401a8c1a4a 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrServerBackupOperationInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrServerBackupOperationInner.java
@@ -7,8 +7,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ExecutionStatus;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.time.OffsetDateTime;
/**
@@ -19,15 +22,28 @@ public final class LtrServerBackupOperationInner extends ProxyResource {
/*
* Long Term Retention Backup Operation Resource Properties
*/
- @JsonProperty(value = "properties")
private LtrBackupOperationResponseProperties innerProperties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
/**
* Creates an instance of LtrServerBackupOperationInner class.
*/
@@ -52,6 +68,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
/**
* Get the datasourceSizeInBytes property: Size of datasource in bytes.
*
@@ -266,4 +312,51 @@ public void validate() {
innerProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LtrServerBackupOperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LtrServerBackupOperationInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the LtrServerBackupOperationInner.
+ */
+ public static LtrServerBackupOperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LtrServerBackupOperationInner deserializedLtrServerBackupOperationInner
+ = new LtrServerBackupOperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedLtrServerBackupOperationInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedLtrServerBackupOperationInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedLtrServerBackupOperationInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedLtrServerBackupOperationInner.innerProperties
+ = LtrBackupOperationResponseProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedLtrServerBackupOperationInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLtrServerBackupOperationInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityResourceInner.java
index dcd43849e1d76..1831ad0bad995 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityResourceInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityResourceInner.java
@@ -6,42 +6,42 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailabilityReason;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* Represents a migration name's availability.
*/
@Fluent
-public final class MigrationNameAvailabilityResourceInner {
+public final class MigrationNameAvailabilityResourceInner
+ implements JsonSerializable {
/*
* The resource name to verify.
*/
- @JsonProperty(value = "name", required = true)
private String name;
/*
* The type of the resource.
*/
- @JsonProperty(value = "type", required = true)
private String type;
/*
* Indicates whether the resource name is available.
*/
- @JsonProperty(value = "nameAvailable", access = JsonProperty.Access.WRITE_ONLY)
private Boolean nameAvailable;
/*
* Migration name availability reason
*/
- @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY)
private MigrationNameAvailabilityReason reason;
/*
* Migration name availability message.
*/
- @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
private String message;
/**
@@ -136,4 +136,53 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(MigrationNameAvailabilityResourceInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("name", this.name);
+ jsonWriter.writeStringField("type", this.type);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MigrationNameAvailabilityResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MigrationNameAvailabilityResourceInner if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the MigrationNameAvailabilityResourceInner.
+ */
+ public static MigrationNameAvailabilityResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MigrationNameAvailabilityResourceInner deserializedMigrationNameAvailabilityResourceInner
+ = new MigrationNameAvailabilityResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedMigrationNameAvailabilityResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedMigrationNameAvailabilityResourceInner.type = reader.getString();
+ } else if ("nameAvailable".equals(fieldName)) {
+ deserializedMigrationNameAvailabilityResourceInner.nameAvailable
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("reason".equals(fieldName)) {
+ deserializedMigrationNameAvailabilityResourceInner.reason
+ = MigrationNameAvailabilityReason.fromString(reader.getString());
+ } else if ("message".equals(fieldName)) {
+ deserializedMigrationNameAvailabilityResourceInner.message = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMigrationNameAvailabilityResourceInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourceInner.java
index f67145c760397..cb2b052bd6e89 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourceInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourceInner.java
@@ -7,6 +7,9 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.CancelEnum;
import com.azure.resourcemanager.postgresqlflexibleserver.models.DbServerMetadata;
import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceDbEnum;
@@ -20,7 +23,7 @@
import com.azure.resourcemanager.postgresqlflexibleserver.models.SslMode;
import com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigrationEnum;
import com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutoverEnum;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;
@@ -33,15 +36,28 @@ public final class MigrationResourceInner extends Resource {
/*
* Migration resource properties.
*/
- @JsonProperty(value = "properties")
private MigrationResourceProperties innerProperties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
/**
* Creates an instance of MigrationResourceInner class.
*/
@@ -66,6 +82,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
/**
* {@inheritDoc}
*/
@@ -267,8 +313,8 @@ public MigrationResourceInner withSourceDbServerResourceId(String sourceDbServer
}
/**
- * Get the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * Get the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @return the sourceDbServerFullyQualifiedDomainName value.
*/
@@ -277,8 +323,8 @@ public String sourceDbServerFullyQualifiedDomainName() {
}
/**
- * Set the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * Set the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @param sourceDbServerFullyQualifiedDomainName the sourceDbServerFullyQualifiedDomainName value to set.
* @return the MigrationResourceInner object itself.
@@ -302,8 +348,8 @@ public String targetDbServerResourceId() {
}
/**
- * Get the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * Get the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @return the targetDbServerFullyQualifiedDomainName value.
*/
@@ -312,8 +358,8 @@ public String targetDbServerFullyQualifiedDomainName() {
}
/**
- * Set the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * Set the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @param targetDbServerFullyQualifiedDomainName the targetDbServerFullyQualifiedDomainName value to set.
* @return the MigrationResourceInner object itself.
@@ -626,4 +672,56 @@ public void validate() {
innerProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MigrationResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MigrationResourceInner if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the MigrationResourceInner.
+ */
+ public static MigrationResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MigrationResourceInner deserializedMigrationResourceInner = new MigrationResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedMigrationResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedMigrationResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedMigrationResourceInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedMigrationResourceInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedMigrationResourceInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedMigrationResourceInner.innerProperties = MigrationResourceProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedMigrationResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMigrationResourceInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourceProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourceProperties.java
index eaed11e2f7966..c70cd83bd17af 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourceProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourceProperties.java
@@ -5,6 +5,11 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.CancelEnum;
import com.azure.resourcemanager.postgresqlflexibleserver.models.DbServerMetadata;
import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceDbEnum;
@@ -18,163 +23,146 @@
import com.azure.resourcemanager.postgresqlflexibleserver.models.SslMode;
import com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigrationEnum;
import com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutoverEnum;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
import java.util.List;
/**
* Migration resource properties.
*/
@Fluent
-public final class MigrationResourceProperties {
+public final class MigrationResourceProperties implements JsonSerializable {
/*
* ID for migration, a GUID.
*/
- @JsonProperty(value = "migrationId", access = JsonProperty.Access.WRITE_ONLY)
private String migrationId;
/*
* Current status of migration
*/
- @JsonProperty(value = "currentStatus", access = JsonProperty.Access.WRITE_ONLY)
private MigrationStatus currentStatus;
/*
* ResourceId of the private endpoint migration instance
*/
- @JsonProperty(value = "migrationInstanceResourceId")
private String migrationInstanceResourceId;
/*
* There are two types of migration modes Online and Offline
*/
- @JsonProperty(value = "migrationMode")
private MigrationMode migrationMode;
/*
* This indicates the supported Migration option for the migration
*/
- @JsonProperty(value = "migrationOption")
private MigrationOption migrationOption;
/*
- * migration source server type : OnPremises, AWS, GCP, AzureVM, PostgreSQLSingleServer, AWS_RDS, AWS_AURORA, AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, or EDB
+ * migration source server type : OnPremises, AWS, GCP, AzureVM, PostgreSQLSingleServer, AWS_RDS, AWS_AURORA,
+ * AWS_EC2, GCP_CloudSQL, GCP_AlloyDB, GCP_Compute, or EDB
*/
- @JsonProperty(value = "sourceType")
private SourceType sourceType;
/*
- * SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and Prefer for other source types
+ * SSL modes for migration. Default SSL mode for PostgreSQLSingleServer is VerifyFull and Prefer for other source
+ * types
*/
- @JsonProperty(value = "sslMode")
private SslMode sslMode;
/*
* Metadata of the source database server
*/
- @JsonProperty(value = "sourceDbServerMetadata", access = JsonProperty.Access.WRITE_ONLY)
private DbServerMetadata sourceDbServerMetadata;
/*
* Metadata of the target database server
*/
- @JsonProperty(value = "targetDbServerMetadata", access = JsonProperty.Access.WRITE_ONLY)
private DbServerMetadata targetDbServerMetadata;
/*
- * ResourceId of the source database server in case the sourceType is PostgreSQLSingleServer. For other source types this should be ipaddress:port@username or hostname:port@username
+ * ResourceId of the source database server in case the sourceType is PostgreSQLSingleServer. For other source types
+ * this should be ipaddress:port@username or hostname:port@username
*/
- @JsonProperty(value = "sourceDbServerResourceId")
private String sourceDbServerResourceId;
/*
- * Source server fully qualified domain name or ip. It is a optional value, if customer provide it, dms will always use it for connection
+ * Source server fully qualified domain name (FQDN) or IP address. It is a optional value, if customer provide it,
+ * migration service will always use it for connection
*/
- @JsonProperty(value = "sourceDbServerFullyQualifiedDomainName")
private String sourceDbServerFullyQualifiedDomainName;
/*
* ResourceId of the source database server
*/
- @JsonProperty(value = "targetDbServerResourceId", access = JsonProperty.Access.WRITE_ONLY)
private String targetDbServerResourceId;
/*
- * Target server fully qualified domain name or ip. It is a optional value, if customer provide it, dms will always use it for connection
+ * Target server fully qualified domain name (FQDN) or IP address. It is a optional value, if customer provide it,
+ * migration service will always use it for connection
*/
- @JsonProperty(value = "targetDbServerFullyQualifiedDomainName")
private String targetDbServerFullyQualifiedDomainName;
/*
* Migration secret parameters
*/
- @JsonProperty(value = "secretParameters")
private MigrationSecretParameters secretParameters;
/*
* Number of databases to migrate
*/
- @JsonProperty(value = "dbsToMigrate")
private List dbsToMigrate;
/*
* Indicates whether to setup LogicalReplicationOnSourceDb, if needed
*/
- @JsonProperty(value = "setupLogicalReplicationOnSourceDbIfNeeded")
private LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded;
/*
- * Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the database already exists.
+ * Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the
+ * migration workflow will wait for a confirmation, if it detects that the database already exists.
*/
- @JsonProperty(value = "overwriteDbsInTarget")
private OverwriteDbsInTargetEnum overwriteDbsInTarget;
/*
* Start time in UTC for migration window
*/
- @JsonProperty(value = "migrationWindowStartTimeInUtc")
private OffsetDateTime migrationWindowStartTimeInUtc;
/*
* End time in UTC for migration window
*/
- @JsonProperty(value = "migrationWindowEndTimeInUtc")
private OffsetDateTime migrationWindowEndTimeInUtc;
/*
* To migrate roles and permissions we need to send this flag as True
*/
- @JsonProperty(value = "migrateRoles")
private MigrateRolesEnum migrateRoles;
/*
* Indicates whether the data migration should start right away
*/
- @JsonProperty(value = "startDataMigration")
private StartDataMigrationEnum startDataMigration;
/*
* To trigger cutover for entire migration we need to send this flag as True
*/
- @JsonProperty(value = "triggerCutover")
private TriggerCutoverEnum triggerCutover;
/*
- * When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in this array
+ * When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in
+ * this array
*/
- @JsonProperty(value = "dbsToTriggerCutoverOn")
private List dbsToTriggerCutoverOn;
/*
* To trigger cancel for entire migration we need to send this flag as True
*/
- @JsonProperty(value = "cancel")
private CancelEnum cancel;
/*
* When you want to trigger cancel for specific databases send cancel flag as True and database names in this array
*/
- @JsonProperty(value = "dbsToCancelMigrationOn")
private List dbsToCancelMigrationOn;
/**
@@ -348,8 +336,8 @@ public MigrationResourceProperties withSourceDbServerResourceId(String sourceDbS
}
/**
- * Get the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * Get the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @return the sourceDbServerFullyQualifiedDomainName value.
*/
@@ -358,8 +346,8 @@ public String sourceDbServerFullyQualifiedDomainName() {
}
/**
- * Set the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * Set the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @param sourceDbServerFullyQualifiedDomainName the sourceDbServerFullyQualifiedDomainName value to set.
* @return the MigrationResourceProperties object itself.
@@ -380,8 +368,8 @@ public String targetDbServerResourceId() {
}
/**
- * Get the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * Get the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @return the targetDbServerFullyQualifiedDomainName value.
*/
@@ -390,8 +378,8 @@ public String targetDbServerFullyQualifiedDomainName() {
}
/**
- * Set the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * Set the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @param targetDbServerFullyQualifiedDomainName the targetDbServerFullyQualifiedDomainName value to set.
* @return the MigrationResourceProperties object itself.
@@ -672,4 +660,137 @@ public void validate() {
secretParameters().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("migrationInstanceResourceId", this.migrationInstanceResourceId);
+ jsonWriter.writeStringField("migrationMode", this.migrationMode == null ? null : this.migrationMode.toString());
+ jsonWriter.writeStringField("migrationOption",
+ this.migrationOption == null ? null : this.migrationOption.toString());
+ jsonWriter.writeStringField("sourceType", this.sourceType == null ? null : this.sourceType.toString());
+ jsonWriter.writeStringField("sslMode", this.sslMode == null ? null : this.sslMode.toString());
+ jsonWriter.writeStringField("sourceDbServerResourceId", this.sourceDbServerResourceId);
+ jsonWriter.writeStringField("sourceDbServerFullyQualifiedDomainName",
+ this.sourceDbServerFullyQualifiedDomainName);
+ jsonWriter.writeStringField("targetDbServerFullyQualifiedDomainName",
+ this.targetDbServerFullyQualifiedDomainName);
+ jsonWriter.writeJsonField("secretParameters", this.secretParameters);
+ jsonWriter.writeArrayField("dbsToMigrate", this.dbsToMigrate, (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("setupLogicalReplicationOnSourceDbIfNeeded",
+ this.setupLogicalReplicationOnSourceDbIfNeeded == null
+ ? null
+ : this.setupLogicalReplicationOnSourceDbIfNeeded.toString());
+ jsonWriter.writeStringField("overwriteDbsInTarget",
+ this.overwriteDbsInTarget == null ? null : this.overwriteDbsInTarget.toString());
+ jsonWriter.writeStringField("migrationWindowStartTimeInUtc",
+ this.migrationWindowStartTimeInUtc == null
+ ? null
+ : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.migrationWindowStartTimeInUtc));
+ jsonWriter.writeStringField("migrationWindowEndTimeInUtc",
+ this.migrationWindowEndTimeInUtc == null
+ ? null
+ : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.migrationWindowEndTimeInUtc));
+ jsonWriter.writeStringField("migrateRoles", this.migrateRoles == null ? null : this.migrateRoles.toString());
+ jsonWriter.writeStringField("startDataMigration",
+ this.startDataMigration == null ? null : this.startDataMigration.toString());
+ jsonWriter.writeStringField("triggerCutover",
+ this.triggerCutover == null ? null : this.triggerCutover.toString());
+ jsonWriter.writeArrayField("dbsToTriggerCutoverOn", this.dbsToTriggerCutoverOn,
+ (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("cancel", this.cancel == null ? null : this.cancel.toString());
+ jsonWriter.writeArrayField("dbsToCancelMigrationOn", this.dbsToCancelMigrationOn,
+ (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MigrationResourceProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MigrationResourceProperties if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the MigrationResourceProperties.
+ */
+ public static MigrationResourceProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MigrationResourceProperties deserializedMigrationResourceProperties = new MigrationResourceProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("migrationId".equals(fieldName)) {
+ deserializedMigrationResourceProperties.migrationId = reader.getString();
+ } else if ("currentStatus".equals(fieldName)) {
+ deserializedMigrationResourceProperties.currentStatus = MigrationStatus.fromJson(reader);
+ } else if ("migrationInstanceResourceId".equals(fieldName)) {
+ deserializedMigrationResourceProperties.migrationInstanceResourceId = reader.getString();
+ } else if ("migrationMode".equals(fieldName)) {
+ deserializedMigrationResourceProperties.migrationMode
+ = MigrationMode.fromString(reader.getString());
+ } else if ("migrationOption".equals(fieldName)) {
+ deserializedMigrationResourceProperties.migrationOption
+ = MigrationOption.fromString(reader.getString());
+ } else if ("sourceType".equals(fieldName)) {
+ deserializedMigrationResourceProperties.sourceType = SourceType.fromString(reader.getString());
+ } else if ("sslMode".equals(fieldName)) {
+ deserializedMigrationResourceProperties.sslMode = SslMode.fromString(reader.getString());
+ } else if ("sourceDbServerMetadata".equals(fieldName)) {
+ deserializedMigrationResourceProperties.sourceDbServerMetadata = DbServerMetadata.fromJson(reader);
+ } else if ("targetDbServerMetadata".equals(fieldName)) {
+ deserializedMigrationResourceProperties.targetDbServerMetadata = DbServerMetadata.fromJson(reader);
+ } else if ("sourceDbServerResourceId".equals(fieldName)) {
+ deserializedMigrationResourceProperties.sourceDbServerResourceId = reader.getString();
+ } else if ("sourceDbServerFullyQualifiedDomainName".equals(fieldName)) {
+ deserializedMigrationResourceProperties.sourceDbServerFullyQualifiedDomainName = reader.getString();
+ } else if ("targetDbServerResourceId".equals(fieldName)) {
+ deserializedMigrationResourceProperties.targetDbServerResourceId = reader.getString();
+ } else if ("targetDbServerFullyQualifiedDomainName".equals(fieldName)) {
+ deserializedMigrationResourceProperties.targetDbServerFullyQualifiedDomainName = reader.getString();
+ } else if ("secretParameters".equals(fieldName)) {
+ deserializedMigrationResourceProperties.secretParameters
+ = MigrationSecretParameters.fromJson(reader);
+ } else if ("dbsToMigrate".equals(fieldName)) {
+ List dbsToMigrate = reader.readArray(reader1 -> reader1.getString());
+ deserializedMigrationResourceProperties.dbsToMigrate = dbsToMigrate;
+ } else if ("setupLogicalReplicationOnSourceDbIfNeeded".equals(fieldName)) {
+ deserializedMigrationResourceProperties.setupLogicalReplicationOnSourceDbIfNeeded
+ = LogicalReplicationOnSourceDbEnum.fromString(reader.getString());
+ } else if ("overwriteDbsInTarget".equals(fieldName)) {
+ deserializedMigrationResourceProperties.overwriteDbsInTarget
+ = OverwriteDbsInTargetEnum.fromString(reader.getString());
+ } else if ("migrationWindowStartTimeInUtc".equals(fieldName)) {
+ deserializedMigrationResourceProperties.migrationWindowStartTimeInUtc = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("migrationWindowEndTimeInUtc".equals(fieldName)) {
+ deserializedMigrationResourceProperties.migrationWindowEndTimeInUtc = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("migrateRoles".equals(fieldName)) {
+ deserializedMigrationResourceProperties.migrateRoles
+ = MigrateRolesEnum.fromString(reader.getString());
+ } else if ("startDataMigration".equals(fieldName)) {
+ deserializedMigrationResourceProperties.startDataMigration
+ = StartDataMigrationEnum.fromString(reader.getString());
+ } else if ("triggerCutover".equals(fieldName)) {
+ deserializedMigrationResourceProperties.triggerCutover
+ = TriggerCutoverEnum.fromString(reader.getString());
+ } else if ("dbsToTriggerCutoverOn".equals(fieldName)) {
+ List dbsToTriggerCutoverOn = reader.readArray(reader1 -> reader1.getString());
+ deserializedMigrationResourceProperties.dbsToTriggerCutoverOn = dbsToTriggerCutoverOn;
+ } else if ("cancel".equals(fieldName)) {
+ deserializedMigrationResourceProperties.cancel = CancelEnum.fromString(reader.getString());
+ } else if ("dbsToCancelMigrationOn".equals(fieldName)) {
+ List dbsToCancelMigrationOn = reader.readArray(reader1 -> reader1.getString());
+ deserializedMigrationResourceProperties.dbsToCancelMigrationOn = dbsToCancelMigrationOn;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMigrationResourceProperties;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourcePropertiesForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourcePropertiesForPatch.java
index d7bd92a7b6746..cc06de081e585 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourcePropertiesForPatch.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationResourcePropertiesForPatch.java
@@ -5,6 +5,11 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.CancelEnum;
import com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceDbEnum;
import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesEnum;
@@ -13,103 +18,94 @@
import com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDbsInTargetEnum;
import com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigrationEnum;
import com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutoverEnum;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
import java.util.List;
/**
* Migration resource properties for patch.
*/
@Fluent
-public final class MigrationResourcePropertiesForPatch {
+public final class MigrationResourcePropertiesForPatch
+ implements JsonSerializable {
/*
* ResourceId of the source database server
*/
- @JsonProperty(value = "sourceDbServerResourceId")
private String sourceDbServerResourceId;
/*
- * Source server fully qualified domain name or ip. It is a optional value, if customer provide it, dms will always use it for connection
+ * Source server fully qualified domain name (FQDN) or IP address. It is a optional value, if customer provide it,
+ * migration service will always use it for connection
*/
- @JsonProperty(value = "sourceDbServerFullyQualifiedDomainName")
private String sourceDbServerFullyQualifiedDomainName;
/*
- * Target server fully qualified domain name or ip. It is a optional value, if customer provide it, dms will always use it for connection
+ * Target server fully qualified domain name (FQDN) or IP address. It is a optional value, if customer provide it,
+ * migration service will always use it for connection
*/
- @JsonProperty(value = "targetDbServerFullyQualifiedDomainName")
private String targetDbServerFullyQualifiedDomainName;
/*
* Migration secret parameters
*/
- @JsonProperty(value = "secretParameters")
private MigrationSecretParameters secretParameters;
/*
* Number of databases to migrate
*/
- @JsonProperty(value = "dbsToMigrate")
private List dbsToMigrate;
/*
* Indicates whether to setup LogicalReplicationOnSourceDb, if needed
*/
- @JsonProperty(value = "setupLogicalReplicationOnSourceDbIfNeeded")
private LogicalReplicationOnSourceDbEnum setupLogicalReplicationOnSourceDbIfNeeded;
/*
- * Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the database already exists.
+ * Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the
+ * migration workflow will wait for a confirmation, if it detects that the database already exists.
*/
- @JsonProperty(value = "overwriteDbsInTarget")
private OverwriteDbsInTargetEnum overwriteDbsInTarget;
/*
* Start time in UTC for migration window
*/
- @JsonProperty(value = "migrationWindowStartTimeInUtc")
private OffsetDateTime migrationWindowStartTimeInUtc;
/*
* To migrate roles and permissions we need to send this flag as True
*/
- @JsonProperty(value = "migrateRoles")
private MigrateRolesEnum migrateRoles;
/*
* Indicates whether the data migration should start right away
*/
- @JsonProperty(value = "startDataMigration")
private StartDataMigrationEnum startDataMigration;
/*
* To trigger cutover for entire migration we need to send this flag as True
*/
- @JsonProperty(value = "triggerCutover")
private TriggerCutoverEnum triggerCutover;
/*
- * When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in this array
+ * When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in
+ * this array
*/
- @JsonProperty(value = "dbsToTriggerCutoverOn")
private List dbsToTriggerCutoverOn;
/*
* To trigger cancel for entire migration we need to send this flag as True
*/
- @JsonProperty(value = "cancel")
private CancelEnum cancel;
/*
* When you want to trigger cancel for specific databases send cancel flag as True and database names in this array
*/
- @JsonProperty(value = "dbsToCancelMigrationOn")
private List dbsToCancelMigrationOn;
/*
* There are two types of migration modes Online and Offline
*/
- @JsonProperty(value = "migrationMode")
private MigrationMode migrationMode;
/**
@@ -139,8 +135,8 @@ public MigrationResourcePropertiesForPatch withSourceDbServerResourceId(String s
}
/**
- * Get the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * Get the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @return the sourceDbServerFullyQualifiedDomainName value.
*/
@@ -149,8 +145,8 @@ public String sourceDbServerFullyQualifiedDomainName() {
}
/**
- * Set the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * Set the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @param sourceDbServerFullyQualifiedDomainName the sourceDbServerFullyQualifiedDomainName value to set.
* @return the MigrationResourcePropertiesForPatch object itself.
@@ -162,8 +158,8 @@ public String sourceDbServerFullyQualifiedDomainName() {
}
/**
- * Get the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * Get the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @return the targetDbServerFullyQualifiedDomainName value.
*/
@@ -172,8 +168,8 @@ public String targetDbServerFullyQualifiedDomainName() {
}
/**
- * Set the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * Set the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @param targetDbServerFullyQualifiedDomainName the targetDbServerFullyQualifiedDomainName value to set.
* @return the MigrationResourcePropertiesForPatch object itself.
@@ -446,4 +442,109 @@ public void validate() {
secretParameters().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("sourceDbServerResourceId", this.sourceDbServerResourceId);
+ jsonWriter.writeStringField("sourceDbServerFullyQualifiedDomainName",
+ this.sourceDbServerFullyQualifiedDomainName);
+ jsonWriter.writeStringField("targetDbServerFullyQualifiedDomainName",
+ this.targetDbServerFullyQualifiedDomainName);
+ jsonWriter.writeJsonField("secretParameters", this.secretParameters);
+ jsonWriter.writeArrayField("dbsToMigrate", this.dbsToMigrate, (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("setupLogicalReplicationOnSourceDbIfNeeded",
+ this.setupLogicalReplicationOnSourceDbIfNeeded == null
+ ? null
+ : this.setupLogicalReplicationOnSourceDbIfNeeded.toString());
+ jsonWriter.writeStringField("overwriteDbsInTarget",
+ this.overwriteDbsInTarget == null ? null : this.overwriteDbsInTarget.toString());
+ jsonWriter.writeStringField("migrationWindowStartTimeInUtc",
+ this.migrationWindowStartTimeInUtc == null
+ ? null
+ : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.migrationWindowStartTimeInUtc));
+ jsonWriter.writeStringField("migrateRoles", this.migrateRoles == null ? null : this.migrateRoles.toString());
+ jsonWriter.writeStringField("startDataMigration",
+ this.startDataMigration == null ? null : this.startDataMigration.toString());
+ jsonWriter.writeStringField("triggerCutover",
+ this.triggerCutover == null ? null : this.triggerCutover.toString());
+ jsonWriter.writeArrayField("dbsToTriggerCutoverOn", this.dbsToTriggerCutoverOn,
+ (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("cancel", this.cancel == null ? null : this.cancel.toString());
+ jsonWriter.writeArrayField("dbsToCancelMigrationOn", this.dbsToCancelMigrationOn,
+ (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("migrationMode", this.migrationMode == null ? null : this.migrationMode.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MigrationResourcePropertiesForPatch from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MigrationResourcePropertiesForPatch if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the MigrationResourcePropertiesForPatch.
+ */
+ public static MigrationResourcePropertiesForPatch fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MigrationResourcePropertiesForPatch deserializedMigrationResourcePropertiesForPatch
+ = new MigrationResourcePropertiesForPatch();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("sourceDbServerResourceId".equals(fieldName)) {
+ deserializedMigrationResourcePropertiesForPatch.sourceDbServerResourceId = reader.getString();
+ } else if ("sourceDbServerFullyQualifiedDomainName".equals(fieldName)) {
+ deserializedMigrationResourcePropertiesForPatch.sourceDbServerFullyQualifiedDomainName
+ = reader.getString();
+ } else if ("targetDbServerFullyQualifiedDomainName".equals(fieldName)) {
+ deserializedMigrationResourcePropertiesForPatch.targetDbServerFullyQualifiedDomainName
+ = reader.getString();
+ } else if ("secretParameters".equals(fieldName)) {
+ deserializedMigrationResourcePropertiesForPatch.secretParameters
+ = MigrationSecretParameters.fromJson(reader);
+ } else if ("dbsToMigrate".equals(fieldName)) {
+ List dbsToMigrate = reader.readArray(reader1 -> reader1.getString());
+ deserializedMigrationResourcePropertiesForPatch.dbsToMigrate = dbsToMigrate;
+ } else if ("setupLogicalReplicationOnSourceDbIfNeeded".equals(fieldName)) {
+ deserializedMigrationResourcePropertiesForPatch.setupLogicalReplicationOnSourceDbIfNeeded
+ = LogicalReplicationOnSourceDbEnum.fromString(reader.getString());
+ } else if ("overwriteDbsInTarget".equals(fieldName)) {
+ deserializedMigrationResourcePropertiesForPatch.overwriteDbsInTarget
+ = OverwriteDbsInTargetEnum.fromString(reader.getString());
+ } else if ("migrationWindowStartTimeInUtc".equals(fieldName)) {
+ deserializedMigrationResourcePropertiesForPatch.migrationWindowStartTimeInUtc = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("migrateRoles".equals(fieldName)) {
+ deserializedMigrationResourcePropertiesForPatch.migrateRoles
+ = MigrateRolesEnum.fromString(reader.getString());
+ } else if ("startDataMigration".equals(fieldName)) {
+ deserializedMigrationResourcePropertiesForPatch.startDataMigration
+ = StartDataMigrationEnum.fromString(reader.getString());
+ } else if ("triggerCutover".equals(fieldName)) {
+ deserializedMigrationResourcePropertiesForPatch.triggerCutover
+ = TriggerCutoverEnum.fromString(reader.getString());
+ } else if ("dbsToTriggerCutoverOn".equals(fieldName)) {
+ List dbsToTriggerCutoverOn = reader.readArray(reader1 -> reader1.getString());
+ deserializedMigrationResourcePropertiesForPatch.dbsToTriggerCutoverOn = dbsToTriggerCutoverOn;
+ } else if ("cancel".equals(fieldName)) {
+ deserializedMigrationResourcePropertiesForPatch.cancel = CancelEnum.fromString(reader.getString());
+ } else if ("dbsToCancelMigrationOn".equals(fieldName)) {
+ List dbsToCancelMigrationOn = reader.readArray(reader1 -> reader1.getString());
+ deserializedMigrationResourcePropertiesForPatch.dbsToCancelMigrationOn = dbsToCancelMigrationOn;
+ } else if ("migrationMode".equals(fieldName)) {
+ deserializedMigrationResourcePropertiesForPatch.migrationMode
+ = MigrationMode.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMigrationResourcePropertiesForPatch;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityInner.java
index e43a7e1cb9f0b..79b7c74de662b 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityInner.java
@@ -5,9 +5,12 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityReason;
import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityResponse;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* Represents a resource name availability.
@@ -17,13 +20,11 @@ public final class NameAvailabilityInner extends CheckNameAvailabilityResponse {
/*
* name of the PostgreSQL server.
*/
- @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
/*
* type of the server
*/
- @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
private String type;
/**
@@ -84,6 +85,52 @@ public NameAvailabilityInner withMessage(String message) {
*/
@Override
public void validate() {
- super.validate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("nameAvailable", nameAvailable());
+ jsonWriter.writeStringField("reason", reason() == null ? null : reason().toString());
+ jsonWriter.writeStringField("message", message());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of NameAvailabilityInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of NameAvailabilityInner if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the NameAvailabilityInner.
+ */
+ public static NameAvailabilityInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ NameAvailabilityInner deserializedNameAvailabilityInner = new NameAvailabilityInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("nameAvailable".equals(fieldName)) {
+ deserializedNameAvailabilityInner.withNameAvailable(reader.getNullable(JsonReader::getBoolean));
+ } else if ("reason".equals(fieldName)) {
+ deserializedNameAvailabilityInner
+ .withReason(CheckNameAvailabilityReason.fromString(reader.getString()));
+ } else if ("message".equals(fieldName)) {
+ deserializedNameAvailabilityInner.withMessage(reader.getString());
+ } else if ("name".equals(fieldName)) {
+ deserializedNameAvailabilityInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedNameAvailabilityInner.type = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedNameAvailabilityInner;
+ });
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationListResultInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationListResultInner.java
index 72240b7214891..3cf4df3efece3 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationListResultInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationListResultInner.java
@@ -5,26 +5,28 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Operation;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* A list of resource provider operations.
*/
@Fluent
-public final class OperationListResultInner {
+public final class OperationListResultInner implements JsonSerializable {
/*
* Collection of available operation details
*/
- @JsonProperty(value = "value")
private List value;
/*
* URL client should use to fetch the next page (per server side paging).
* It's null for now, added for future use.
*/
- @JsonProperty(value = "nextLink")
private String nextLink;
/**
@@ -85,4 +87,44 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationListResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationListResultInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationListResultInner.
+ */
+ public static OperationListResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationListResultInner deserializedOperationListResultInner = new OperationListResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> Operation.fromJson(reader1));
+ deserializedOperationListResultInner.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedOperationListResultInner.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationListResultInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionInner.java
index 8288e28a0ddaa..552be83a6fb41 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionInner.java
@@ -7,10 +7,13 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpoint;
import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionProvisioningState;
import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
@@ -21,15 +24,28 @@ public final class PrivateEndpointConnectionInner extends ProxyResource {
/*
* Resource properties.
*/
- @JsonProperty(value = "properties")
private PrivateEndpointConnectionProperties innerProperties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
/**
* Creates an instance of PrivateEndpointConnectionInner class.
*/
@@ -54,6 +70,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
/**
* Get the groupIds property: The group ids for the private endpoint resource.
*
@@ -131,4 +177,51 @@ public void validate() {
innerProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateEndpointConnectionInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateEndpointConnectionInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the PrivateEndpointConnectionInner.
+ */
+ public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner
+ = new PrivateEndpointConnectionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.innerProperties
+ = PrivateEndpointConnectionProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateEndpointConnectionInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionProperties.java
index d1295dc950384..6eec6c8820447 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionProperties.java
@@ -6,39 +6,40 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpoint;
import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionProvisioningState;
import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* Properties of the private endpoint connection.
*/
@Fluent
-public final class PrivateEndpointConnectionProperties {
+public final class PrivateEndpointConnectionProperties
+ implements JsonSerializable {
/*
* The group ids for the private endpoint resource.
*/
- @JsonProperty(value = "groupIds", access = JsonProperty.Access.WRITE_ONLY)
private List groupIds;
/*
* The private endpoint resource.
*/
- @JsonProperty(value = "privateEndpoint")
private PrivateEndpoint privateEndpoint;
/*
* A collection of information about the state of the connection between service consumer and provider.
*/
- @JsonProperty(value = "privateLinkServiceConnectionState", required = true)
private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
/*
* The provisioning state of the private endpoint connection resource.
*/
- @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private PrivateEndpointConnectionProvisioningState provisioningState;
/**
@@ -127,4 +128,52 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState);
+ jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateEndpointConnectionProperties if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the PrivateEndpointConnectionProperties.
+ */
+ public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties
+ = new PrivateEndpointConnectionProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("privateLinkServiceConnectionState".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState
+ = PrivateLinkServiceConnectionState.fromJson(reader);
+ } else if ("groupIds".equals(fieldName)) {
+ List groupIds = reader.readArray(reader1 -> reader1.getString());
+ deserializedPrivateEndpointConnectionProperties.groupIds = groupIds;
+ } else if ("privateEndpoint".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader);
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionProperties.provisioningState
+ = PrivateEndpointConnectionProvisioningState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateEndpointConnectionProperties;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateLinkResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateLinkResourceInner.java
index f23808c8ab237..6d7d16f405db7 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateLinkResourceInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateLinkResourceInner.java
@@ -7,7 +7,10 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.List;
/**
@@ -18,15 +21,28 @@ public final class PrivateLinkResourceInner extends ProxyResource {
/*
* Resource properties.
*/
- @JsonProperty(value = "properties")
private PrivateLinkResourceProperties innerProperties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
/**
* Creates an instance of PrivateLinkResourceInner class.
*/
@@ -51,6 +67,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
/**
* Get the groupId property: The private link resource group id.
*
@@ -102,4 +148,50 @@ public void validate() {
innerProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateLinkResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateLinkResourceInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the PrivateLinkResourceInner.
+ */
+ public static PrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateLinkResourceInner deserializedPrivateLinkResourceInner = new PrivateLinkResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedPrivateLinkResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedPrivateLinkResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedPrivateLinkResourceInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedPrivateLinkResourceInner.innerProperties
+ = PrivateLinkResourceProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedPrivateLinkResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateLinkResourceInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateLinkResourceProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateLinkResourceProperties.java
index 16dae8755b3b4..034019a0998d1 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateLinkResourceProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateLinkResourceProperties.java
@@ -5,30 +5,31 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.List;
/**
* Properties of a private link resource.
*/
@Fluent
-public final class PrivateLinkResourceProperties {
+public final class PrivateLinkResourceProperties implements JsonSerializable {
/*
* The private link resource group id.
*/
- @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY)
private String groupId;
/*
* The private link resource required member names.
*/
- @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY)
private List requiredMembers;
/*
* The private link resource private link DNS zone name.
*/
- @JsonProperty(value = "requiredZoneNames")
private List requiredZoneNames;
/**
@@ -82,4 +83,48 @@ public PrivateLinkResourceProperties withRequiredZoneNames(List required
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("requiredZoneNames", this.requiredZoneNames,
+ (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateLinkResourceProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateLinkResourceProperties if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the PrivateLinkResourceProperties.
+ */
+ public static PrivateLinkResourceProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateLinkResourceProperties deserializedPrivateLinkResourceProperties
+ = new PrivateLinkResourceProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("groupId".equals(fieldName)) {
+ deserializedPrivateLinkResourceProperties.groupId = reader.getString();
+ } else if ("requiredMembers".equals(fieldName)) {
+ List requiredMembers = reader.readArray(reader1 -> reader1.getString());
+ deserializedPrivateLinkResourceProperties.requiredMembers = requiredMembers;
+ } else if ("requiredZoneNames".equals(fieldName)) {
+ List requiredZoneNames = reader.readArray(reader1 -> reader1.getString());
+ deserializedPrivateLinkResourceProperties.requiredZoneNames = requiredZoneNames;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateLinkResourceProperties;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/QuotaUsageInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/QuotaUsageInner.java
deleted file mode 100644
index d54139daff781..0000000000000
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/QuotaUsageInner.java
+++ /dev/null
@@ -1,162 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.NameProperty;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Quota usage for flexible servers.
- */
-@Fluent
-public final class QuotaUsageInner {
- /*
- * Name of quota usage for flexible servers
- */
- @JsonProperty(value = "name")
- private NameProperty name;
-
- /*
- * Quota limit
- */
- @JsonProperty(value = "limit")
- private Long limit;
-
- /*
- * Quota unit
- */
- @JsonProperty(value = "unit")
- private String unit;
-
- /*
- * Current Quota usage value
- */
- @JsonProperty(value = "currentValue")
- private Long currentValue;
-
- /*
- * Fully qualified ARM resource Id
- */
- @JsonProperty(value = "id")
- private String id;
-
- /**
- * Creates an instance of QuotaUsageInner class.
- */
- public QuotaUsageInner() {
- }
-
- /**
- * Get the name property: Name of quota usage for flexible servers.
- *
- * @return the name value.
- */
- public NameProperty name() {
- return this.name;
- }
-
- /**
- * Set the name property: Name of quota usage for flexible servers.
- *
- * @param name the name value to set.
- * @return the QuotaUsageInner object itself.
- */
- public QuotaUsageInner withName(NameProperty name) {
- this.name = name;
- return this;
- }
-
- /**
- * Get the limit property: Quota limit.
- *
- * @return the limit value.
- */
- public Long limit() {
- return this.limit;
- }
-
- /**
- * Set the limit property: Quota limit.
- *
- * @param limit the limit value to set.
- * @return the QuotaUsageInner object itself.
- */
- public QuotaUsageInner withLimit(Long limit) {
- this.limit = limit;
- return this;
- }
-
- /**
- * Get the unit property: Quota unit.
- *
- * @return the unit value.
- */
- public String unit() {
- return this.unit;
- }
-
- /**
- * Set the unit property: Quota unit.
- *
- * @param unit the unit value to set.
- * @return the QuotaUsageInner object itself.
- */
- public QuotaUsageInner withUnit(String unit) {
- this.unit = unit;
- return this;
- }
-
- /**
- * Get the currentValue property: Current Quota usage value.
- *
- * @return the currentValue value.
- */
- public Long currentValue() {
- return this.currentValue;
- }
-
- /**
- * Set the currentValue property: Current Quota usage value.
- *
- * @param currentValue the currentValue value to set.
- * @return the QuotaUsageInner object itself.
- */
- public QuotaUsageInner withCurrentValue(Long currentValue) {
- this.currentValue = currentValue;
- return this;
- }
-
- /**
- * Get the id property: Fully qualified ARM resource Id.
- *
- * @return the id value.
- */
- public String id() {
- return this.id;
- }
-
- /**
- * Set the id property: Fully qualified ARM resource Id.
- *
- * @param id the id value to set.
- * @return the QuotaUsageInner object itself.
- */
- public QuotaUsageInner withId(String id) {
- this.id = id;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (name() != null) {
- name().validate();
- }
- }
-}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupInner.java
index 62123874d7800..f50e0ed884a7f 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupInner.java
@@ -7,8 +7,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Origin;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.time.OffsetDateTime;
/**
@@ -19,15 +22,28 @@ public final class ServerBackupInner extends ProxyResource {
/*
* The properties of a server backup.
*/
- @JsonProperty(value = "properties")
private ServerBackupProperties innerProperties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
/**
* Creates an instance of ServerBackupInner class.
*/
@@ -52,6 +68,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
/**
* Get the backupType property: Backup type.
*
@@ -131,4 +177,49 @@ public void validate() {
innerProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ServerBackupInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ServerBackupInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ServerBackupInner.
+ */
+ public static ServerBackupInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ServerBackupInner deserializedServerBackupInner = new ServerBackupInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedServerBackupInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedServerBackupInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedServerBackupInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedServerBackupInner.innerProperties = ServerBackupProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedServerBackupInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedServerBackupInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupProperties.java
index 1a32bef05433b..745949a9fc920 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerBackupProperties.java
@@ -5,31 +5,34 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Origin;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
/**
* The properties of a server backup.
*/
@Fluent
-public final class ServerBackupProperties {
+public final class ServerBackupProperties implements JsonSerializable {
/*
* Backup type.
*/
- @JsonProperty(value = "backupType")
private Origin backupType;
/*
* Backup completed time (ISO8601 format).
*/
- @JsonProperty(value = "completedTime")
private OffsetDateTime completedTime;
/*
* Backup source
*/
- @JsonProperty(value = "source")
private String source;
/**
@@ -105,4 +108,48 @@ public ServerBackupProperties withSource(String source) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("backupType", this.backupType == null ? null : this.backupType.toString());
+ jsonWriter.writeStringField("completedTime",
+ this.completedTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.completedTime));
+ jsonWriter.writeStringField("source", this.source);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ServerBackupProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ServerBackupProperties if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ServerBackupProperties.
+ */
+ public static ServerBackupProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ServerBackupProperties deserializedServerBackupProperties = new ServerBackupProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("backupType".equals(fieldName)) {
+ deserializedServerBackupProperties.backupType = Origin.fromString(reader.getString());
+ } else if ("completedTime".equals(fieldName)) {
+ deserializedServerBackupProperties.completedTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("source".equals(fieldName)) {
+ deserializedServerBackupProperties.source = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedServerBackupProperties;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java
index a90ff6ddc6eb3..dc708a9932a1b 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java
@@ -7,6 +7,9 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup;
import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateMode;
@@ -21,7 +24,7 @@
import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage;
import com.azure.resourcemanager.postgresqlflexibleserver.models.UserAssignedIdentity;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;
@@ -34,27 +37,38 @@ public final class ServerInner extends Resource {
/*
* The SKU (pricing tier) of the server.
*/
- @JsonProperty(value = "sku")
private Sku sku;
/*
* Describes the identity of the application.
*/
- @JsonProperty(value = "identity")
private UserAssignedIdentity identity;
/*
* Properties of the server.
*/
- @JsonProperty(value = "properties")
private ServerProperties innerProperties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
/**
* Creates an instance of ServerInner class.
*/
@@ -119,6 +133,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
/**
* {@inheritDoc}
*/
@@ -579,4 +623,62 @@ public void validate() {
innerProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("sku", this.sku);
+ jsonWriter.writeJsonField("identity", this.identity);
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ServerInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ServerInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ServerInner.
+ */
+ public static ServerInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ServerInner deserializedServerInner = new ServerInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedServerInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedServerInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedServerInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedServerInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedServerInner.withTags(tags);
+ } else if ("sku".equals(fieldName)) {
+ deserializedServerInner.sku = Sku.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedServerInner.identity = UserAssignedIdentity.fromJson(reader);
+ } else if ("properties".equals(fieldName)) {
+ deserializedServerInner.innerProperties = ServerProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedServerInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedServerInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java
index 71c4c30f16950..b1ebfc56b6879 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java
@@ -5,6 +5,11 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup;
import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateMode;
@@ -17,139 +22,124 @@
import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerState;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
import java.util.List;
/**
* The properties of a server.
*/
@Fluent
-public final class ServerProperties {
+public final class ServerProperties implements JsonSerializable {
/*
- * The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
+ * The administrator's login name of a server. Can only be specified when the server is being created (and is
+ * required for creation).
*/
- @JsonProperty(value = "administratorLogin")
private String administratorLogin;
/*
* The administrator login password (required for server creation).
*/
- @JsonProperty(value = "administratorLoginPassword")
private String administratorLoginPassword;
/*
* PostgreSQL Server version.
*/
- @JsonProperty(value = "version")
private ServerVersion version;
/*
* The minor version of the server.
*/
- @JsonProperty(value = "minorVersion", access = JsonProperty.Access.WRITE_ONLY)
private String minorVersion;
/*
* A state of a server that is visible to user.
*/
- @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
private ServerState state;
/*
* The fully qualified domain name of a server.
*/
- @JsonProperty(value = "fullyQualifiedDomainName", access = JsonProperty.Access.WRITE_ONLY)
private String fullyQualifiedDomainName;
/*
* Storage properties of a server.
*/
- @JsonProperty(value = "storage")
private Storage storage;
/*
* AuthConfig properties of a server.
*/
- @JsonProperty(value = "authConfig")
private AuthConfig authConfig;
/*
* Data encryption properties of a server.
*/
- @JsonProperty(value = "dataEncryption")
private DataEncryption dataEncryption;
/*
* Backup properties of a server.
*/
- @JsonProperty(value = "backup")
private Backup backup;
/*
- * 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.
+ * 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;
/*
* High availability properties of a server.
*/
- @JsonProperty(value = "highAvailability")
private HighAvailability highAvailability;
/*
* Maintenance window properties of a server.
*/
- @JsonProperty(value = "maintenanceWindow")
private MaintenanceWindow maintenanceWindow;
/*
- * The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is returned only for Replica server
+ * The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore' or
+ * 'GeoRestore' or 'Replica' or 'ReviveDropped'. This property is returned only for Replica server
*/
- @JsonProperty(value = "sourceServerResourceId")
private String sourceServerResourceId;
/*
- * Restore point creation time (ISO8601 format), specifying the time to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'.
+ * Restore point creation time (ISO8601 format), specifying the time to restore from. It's required when
+ * 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'ReviveDropped'.
*/
- @JsonProperty(value = "pointInTimeUTC")
private OffsetDateTime pointInTimeUtc;
/*
* availability zone information of the server.
*/
- @JsonProperty(value = "availabilityZone")
private String availabilityZone;
/*
* Replication role of the server
*/
- @JsonProperty(value = "replicationRole")
private ReplicationRole replicationRole;
/*
* Replicas allowed for a server.
*/
- @JsonProperty(value = "replicaCapacity", access = JsonProperty.Access.WRITE_ONLY)
private Integer replicaCapacity;
/*
- * Replica properties of a server. These Replica properties are required to be passed only in case you want to Promote a server.
+ * Replica properties of a server. These Replica properties are required to be passed only in case you want to
+ * Promote a server.
*/
- @JsonProperty(value = "replica")
private Replica replica;
/*
* The mode to create a new PostgreSQL server.
*/
- @JsonProperty(value = "createMode")
private CreateMode createMode;
/*
* List of private endpoint connections associated with the specified resource.
*/
- @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
private List privateEndpointConnections;
/**
@@ -570,4 +560,100 @@ public void validate() {
privateEndpointConnections().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("administratorLogin", this.administratorLogin);
+ jsonWriter.writeStringField("administratorLoginPassword", this.administratorLoginPassword);
+ jsonWriter.writeStringField("version", this.version == null ? null : this.version.toString());
+ jsonWriter.writeJsonField("storage", this.storage);
+ jsonWriter.writeJsonField("authConfig", this.authConfig);
+ jsonWriter.writeJsonField("dataEncryption", this.dataEncryption);
+ jsonWriter.writeJsonField("backup", this.backup);
+ jsonWriter.writeJsonField("network", this.network);
+ jsonWriter.writeJsonField("highAvailability", this.highAvailability);
+ jsonWriter.writeJsonField("maintenanceWindow", this.maintenanceWindow);
+ jsonWriter.writeStringField("sourceServerResourceId", this.sourceServerResourceId);
+ jsonWriter.writeStringField("pointInTimeUTC",
+ this.pointInTimeUtc == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.pointInTimeUtc));
+ jsonWriter.writeStringField("availabilityZone", this.availabilityZone);
+ jsonWriter.writeStringField("replicationRole",
+ this.replicationRole == null ? null : this.replicationRole.toString());
+ jsonWriter.writeJsonField("replica", this.replica);
+ jsonWriter.writeStringField("createMode", this.createMode == null ? null : this.createMode.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ServerProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ServerProperties if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ServerProperties.
+ */
+ public static ServerProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ServerProperties deserializedServerProperties = new ServerProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("administratorLogin".equals(fieldName)) {
+ deserializedServerProperties.administratorLogin = reader.getString();
+ } else if ("administratorLoginPassword".equals(fieldName)) {
+ deserializedServerProperties.administratorLoginPassword = reader.getString();
+ } else if ("version".equals(fieldName)) {
+ deserializedServerProperties.version = ServerVersion.fromString(reader.getString());
+ } else if ("minorVersion".equals(fieldName)) {
+ deserializedServerProperties.minorVersion = reader.getString();
+ } else if ("state".equals(fieldName)) {
+ deserializedServerProperties.state = ServerState.fromString(reader.getString());
+ } else if ("fullyQualifiedDomainName".equals(fieldName)) {
+ deserializedServerProperties.fullyQualifiedDomainName = reader.getString();
+ } else if ("storage".equals(fieldName)) {
+ deserializedServerProperties.storage = Storage.fromJson(reader);
+ } else if ("authConfig".equals(fieldName)) {
+ deserializedServerProperties.authConfig = AuthConfig.fromJson(reader);
+ } else if ("dataEncryption".equals(fieldName)) {
+ deserializedServerProperties.dataEncryption = DataEncryption.fromJson(reader);
+ } else if ("backup".equals(fieldName)) {
+ deserializedServerProperties.backup = Backup.fromJson(reader);
+ } else if ("network".equals(fieldName)) {
+ deserializedServerProperties.network = Network.fromJson(reader);
+ } else if ("highAvailability".equals(fieldName)) {
+ deserializedServerProperties.highAvailability = HighAvailability.fromJson(reader);
+ } else if ("maintenanceWindow".equals(fieldName)) {
+ deserializedServerProperties.maintenanceWindow = MaintenanceWindow.fromJson(reader);
+ } else if ("sourceServerResourceId".equals(fieldName)) {
+ deserializedServerProperties.sourceServerResourceId = reader.getString();
+ } else if ("pointInTimeUTC".equals(fieldName)) {
+ deserializedServerProperties.pointInTimeUtc = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("availabilityZone".equals(fieldName)) {
+ deserializedServerProperties.availabilityZone = reader.getString();
+ } else if ("replicationRole".equals(fieldName)) {
+ deserializedServerProperties.replicationRole = ReplicationRole.fromString(reader.getString());
+ } else if ("replicaCapacity".equals(fieldName)) {
+ deserializedServerProperties.replicaCapacity = reader.getNullable(JsonReader::getInt);
+ } else if ("replica".equals(fieldName)) {
+ deserializedServerProperties.replica = Replica.fromJson(reader);
+ } else if ("createMode".equals(fieldName)) {
+ deserializedServerProperties.createMode = CreateMode.fromString(reader.getString());
+ } else if ("privateEndpointConnections".equals(fieldName)) {
+ List privateEndpointConnections
+ = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1));
+ deserializedServerProperties.privateEndpointConnections = privateEndpointConnections;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedServerProperties;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java
index cc9452f0f02d0..fc7b07dfd9cff 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java
@@ -5,6 +5,10 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Backup;
import com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForUpdate;
@@ -16,83 +20,79 @@
import com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationRole;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersion;
import com.azure.resourcemanager.postgresqlflexibleserver.models.Storage;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* The ServerPropertiesForUpdate model.
*/
@Fluent
-public final class ServerPropertiesForUpdate {
+public final class ServerPropertiesForUpdate implements JsonSerializable {
+ /*
+ * The administrator's login name of a server. Can only be specified when the server is trying to switch to password
+ * authentication and does not have default administrator login.
+ */
+ private String administratorLogin;
+
/*
* The password of the administrator login.
*/
- @JsonProperty(value = "administratorLoginPassword")
private String administratorLoginPassword;
/*
* PostgreSQL Server version. Version 16 is currently not supported for MVU.
*/
- @JsonProperty(value = "version")
private ServerVersion version;
/*
* Storage properties of a server.
*/
- @JsonProperty(value = "storage")
private Storage storage;
/*
* Backup properties of a server.
*/
- @JsonProperty(value = "backup")
private Backup backup;
/*
* High availability properties of a server.
*/
- @JsonProperty(value = "highAvailability")
private HighAvailability highAvailability;
/*
* Maintenance window properties of a server.
*/
- @JsonProperty(value = "maintenanceWindow")
private MaintenanceWindow maintenanceWindow;
/*
* AuthConfig properties of a server.
*/
- @JsonProperty(value = "authConfig")
private AuthConfig authConfig;
/*
* Data encryption properties of a server.
*/
- @JsonProperty(value = "dataEncryption")
private DataEncryption dataEncryption;
/*
* The mode to update a new PostgreSQL server.
*/
- @JsonProperty(value = "createMode")
private CreateModeForUpdate createMode;
/*
* Replication role of the server
*/
- @JsonProperty(value = "replicationRole")
private ReplicationRole replicationRole;
/*
- * Replica properties of a server. These Replica properties are required to be passed only in case you want to Promote a server.
+ * Replica properties of a server. These Replica properties are required to be passed only in case you want to
+ * Promote a server.
*/
- @JsonProperty(value = "replica")
private Replica replica;
/*
- * Network properties of a server. These are required to be passed only in case if server is a private access server.
+ * 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;
/**
@@ -101,6 +101,28 @@ public final class ServerPropertiesForUpdate {
public ServerPropertiesForUpdate() {
}
+ /**
+ * Get the administratorLogin property: The administrator's login name of a server. Can only be specified when the
+ * server is trying to switch to password authentication and does not have default administrator login.
+ *
+ * @return the administratorLogin value.
+ */
+ public String administratorLogin() {
+ return this.administratorLogin;
+ }
+
+ /**
+ * Set the administratorLogin property: The administrator's login name of a server. Can only be specified when the
+ * server is trying to switch to password authentication and does not have default administrator login.
+ *
+ * @param administratorLogin the administratorLogin value to set.
+ * @return the ServerPropertiesForUpdate object itself.
+ */
+ public ServerPropertiesForUpdate withAdministratorLogin(String administratorLogin) {
+ this.administratorLogin = administratorLogin;
+ return this;
+ }
+
/**
* Get the administratorLoginPassword property: The password of the administrator login.
*
@@ -376,4 +398,79 @@ public void validate() {
network().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("administratorLogin", this.administratorLogin);
+ jsonWriter.writeStringField("administratorLoginPassword", this.administratorLoginPassword);
+ jsonWriter.writeStringField("version", this.version == null ? null : this.version.toString());
+ jsonWriter.writeJsonField("storage", this.storage);
+ jsonWriter.writeJsonField("backup", this.backup);
+ jsonWriter.writeJsonField("highAvailability", this.highAvailability);
+ jsonWriter.writeJsonField("maintenanceWindow", this.maintenanceWindow);
+ jsonWriter.writeJsonField("authConfig", this.authConfig);
+ jsonWriter.writeJsonField("dataEncryption", this.dataEncryption);
+ jsonWriter.writeStringField("createMode", this.createMode == null ? null : this.createMode.toString());
+ jsonWriter.writeStringField("replicationRole",
+ this.replicationRole == null ? null : this.replicationRole.toString());
+ jsonWriter.writeJsonField("replica", this.replica);
+ jsonWriter.writeJsonField("network", this.network);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ServerPropertiesForUpdate from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ServerPropertiesForUpdate if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ServerPropertiesForUpdate.
+ */
+ public static ServerPropertiesForUpdate fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ServerPropertiesForUpdate deserializedServerPropertiesForUpdate = new ServerPropertiesForUpdate();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("administratorLogin".equals(fieldName)) {
+ deserializedServerPropertiesForUpdate.administratorLogin = reader.getString();
+ } else if ("administratorLoginPassword".equals(fieldName)) {
+ deserializedServerPropertiesForUpdate.administratorLoginPassword = reader.getString();
+ } else if ("version".equals(fieldName)) {
+ deserializedServerPropertiesForUpdate.version = ServerVersion.fromString(reader.getString());
+ } else if ("storage".equals(fieldName)) {
+ deserializedServerPropertiesForUpdate.storage = Storage.fromJson(reader);
+ } else if ("backup".equals(fieldName)) {
+ deserializedServerPropertiesForUpdate.backup = Backup.fromJson(reader);
+ } else if ("highAvailability".equals(fieldName)) {
+ deserializedServerPropertiesForUpdate.highAvailability = HighAvailability.fromJson(reader);
+ } else if ("maintenanceWindow".equals(fieldName)) {
+ deserializedServerPropertiesForUpdate.maintenanceWindow = MaintenanceWindow.fromJson(reader);
+ } else if ("authConfig".equals(fieldName)) {
+ deserializedServerPropertiesForUpdate.authConfig = AuthConfig.fromJson(reader);
+ } else if ("dataEncryption".equals(fieldName)) {
+ deserializedServerPropertiesForUpdate.dataEncryption = DataEncryption.fromJson(reader);
+ } else if ("createMode".equals(fieldName)) {
+ deserializedServerPropertiesForUpdate.createMode
+ = CreateModeForUpdate.fromString(reader.getString());
+ } else if ("replicationRole".equals(fieldName)) {
+ deserializedServerPropertiesForUpdate.replicationRole
+ = ReplicationRole.fromString(reader.getString());
+ } else if ("replica".equals(fieldName)) {
+ deserializedServerPropertiesForUpdate.replica = Replica.fromJson(reader);
+ } else if ("network".equals(fieldName)) {
+ deserializedServerPropertiesForUpdate.network = Network.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedServerPropertiesForUpdate;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionProperties.java
index 1047b281ba6ff..1bb3dd4d31217 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionProperties.java
@@ -5,26 +5,30 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.time.OffsetDateTime;
/**
* Properties of server Threat Protection state.
*/
@Fluent
-public final class ServerThreatProtectionProperties {
+public final class ServerThreatProtectionProperties implements JsonSerializable {
/*
- * Specifies the state of the Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific server.
+ * Specifies the state of the Threat Protection, whether it is enabled or disabled or a state has not been applied
+ * yet on the specific server.
*/
- @JsonProperty(value = "state", required = true)
private ThreatProtectionState state;
/*
* Specifies the UTC creation time of the policy.
*/
- @JsonProperty(value = "creationTime", access = JsonProperty.Access.WRITE_ONLY)
private OffsetDateTime creationTime;
/**
@@ -78,4 +82,46 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(ServerThreatProtectionProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ServerThreatProtectionProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ServerThreatProtectionProperties if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ServerThreatProtectionProperties.
+ */
+ public static ServerThreatProtectionProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ServerThreatProtectionProperties deserializedServerThreatProtectionProperties
+ = new ServerThreatProtectionProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("state".equals(fieldName)) {
+ deserializedServerThreatProtectionProperties.state
+ = ThreatProtectionState.fromString(reader.getString());
+ } else if ("creationTime".equals(fieldName)) {
+ deserializedServerThreatProtectionProperties.creationTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedServerThreatProtectionProperties;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionSettingsModelInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionSettingsModelInner.java
index d16dcc2bc3ee8..a7682fb968875 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionSettingsModelInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerThreatProtectionSettingsModelInner.java
@@ -7,8 +7,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.time.OffsetDateTime;
/**
@@ -19,15 +22,28 @@ public final class ServerThreatProtectionSettingsModelInner extends ProxyResourc
/*
* Advanced Threat Protection properties.
*/
- @JsonProperty(value = "properties")
private ServerThreatProtectionProperties innerProperties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
/**
* Creates an instance of ServerThreatProtectionSettingsModelInner class.
*/
@@ -52,6 +68,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
/**
* Get the state property: Specifies the state of the Threat Protection, whether it is enabled or disabled or a
* state has not been applied yet on the specific server.
@@ -96,4 +142,51 @@ public void validate() {
innerProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ServerThreatProtectionSettingsModelInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ServerThreatProtectionSettingsModelInner if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ServerThreatProtectionSettingsModelInner.
+ */
+ public static ServerThreatProtectionSettingsModelInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ServerThreatProtectionSettingsModelInner deserializedServerThreatProtectionSettingsModelInner
+ = new ServerThreatProtectionSettingsModelInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedServerThreatProtectionSettingsModelInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedServerThreatProtectionSettingsModelInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedServerThreatProtectionSettingsModelInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedServerThreatProtectionSettingsModelInner.innerProperties
+ = ServerThreatProtectionProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedServerThreatProtectionSettingsModelInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedServerThreatProtectionSettingsModelInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceInner.java
index 00c775750129b..eace4556e332e 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceInner.java
@@ -6,9 +6,12 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResourceForPatch;
import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
@@ -17,29 +20,31 @@
@Fluent
public final class VirtualEndpointResourceInner extends VirtualEndpointResourceForPatch {
/*
- * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
+ * Fully qualified resource ID for the resource. E.g.
+ * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
*/
- @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
private String id;
/*
* The name of the resource
*/
- @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
/*
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*/
- @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
private String type;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * Properties of the virtual endpoint resource.
+ */
+ private VirtualEndpointResourceProperties innerProperties;
+
/**
* Creates an instance of VirtualEndpointResourceInner class.
*/
@@ -85,23 +90,69 @@ public SystemData systemData() {
}
/**
- * {@inheritDoc}
+ * Get the innerProperties property: Properties of the virtual endpoint resource.
+ *
+ * @return the innerProperties value.
+ */
+ private VirtualEndpointResourceProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the endpointType property: The endpoint type for the virtual endpoint.
+ *
+ * @return the endpointType value.
+ */
+ public VirtualEndpointType endpointType() {
+ return this.innerProperties() == null ? null : this.innerProperties().endpointType();
+ }
+
+ /**
+ * Set the endpointType property: The endpoint type for the virtual endpoint.
+ *
+ * @param endpointType the endpointType value to set.
+ * @return the VirtualEndpointResourceInner object itself.
*/
- @Override
public VirtualEndpointResourceInner withEndpointType(VirtualEndpointType endpointType) {
- super.withEndpointType(endpointType);
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualEndpointResourceProperties();
+ }
+ this.innerProperties().withEndpointType(endpointType);
return this;
}
/**
- * {@inheritDoc}
+ * Get the members property: List of members for a virtual endpoint.
+ *
+ * @return the members value.
+ */
+ public List members() {
+ return this.innerProperties() == null ? null : this.innerProperties().members();
+ }
+
+ /**
+ * Set the members property: List of members for a virtual endpoint.
+ *
+ * @param members the members value to set.
+ * @return the VirtualEndpointResourceInner object itself.
*/
- @Override
public VirtualEndpointResourceInner withMembers(List members) {
- super.withMembers(members);
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VirtualEndpointResourceProperties();
+ }
+ this.innerProperties().withMembers(members);
return this;
}
+ /**
+ * Get the virtualEndpoints property: List of virtual endpoints for a server.
+ *
+ * @return the virtualEndpoints value.
+ */
+ public List virtualEndpoints() {
+ return this.innerProperties() == null ? null : this.innerProperties().virtualEndpoints();
+ }
+
/**
* Validates the instance.
*
@@ -109,6 +160,53 @@ public VirtualEndpointResourceInner withMembers(List members) {
*/
@Override
public void validate() {
- super.validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", innerProperties());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of VirtualEndpointResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of VirtualEndpointResourceInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the VirtualEndpointResourceInner.
+ */
+ public static VirtualEndpointResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ VirtualEndpointResourceInner deserializedVirtualEndpointResourceInner = new VirtualEndpointResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("properties".equals(fieldName)) {
+ deserializedVirtualEndpointResourceInner.innerProperties
+ = VirtualEndpointResourceProperties.fromJson(reader);
+ } else if ("id".equals(fieldName)) {
+ deserializedVirtualEndpointResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedVirtualEndpointResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedVirtualEndpointResourceInner.type = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedVirtualEndpointResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedVirtualEndpointResourceInner;
+ });
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceProperties.java
index e2636d85b435c..1d2a47e228fa7 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceProperties.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceProperties.java
@@ -5,31 +5,32 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* The properties of a virtual endpoint.
*/
@Fluent
-public final class VirtualEndpointResourceProperties {
+public final class VirtualEndpointResourceProperties implements JsonSerializable {
/*
* The endpoint type for the virtual endpoint.
*/
- @JsonProperty(value = "endpointType")
private VirtualEndpointType endpointType;
/*
* List of members for a virtual endpoint
*/
- @JsonProperty(value = "members")
private List members;
/*
* List of virtual endpoints for a server
*/
- @JsonProperty(value = "virtualEndpoints", access = JsonProperty.Access.WRITE_ONLY)
private List virtualEndpoints;
/**
@@ -94,4 +95,49 @@ public List virtualEndpoints() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString());
+ jsonWriter.writeArrayField("members", this.members, (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of VirtualEndpointResourceProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of VirtualEndpointResourceProperties if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the VirtualEndpointResourceProperties.
+ */
+ public static VirtualEndpointResourceProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ VirtualEndpointResourceProperties deserializedVirtualEndpointResourceProperties
+ = new VirtualEndpointResourceProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("endpointType".equals(fieldName)) {
+ deserializedVirtualEndpointResourceProperties.endpointType
+ = VirtualEndpointType.fromString(reader.getString());
+ } else if ("members".equals(fieldName)) {
+ List members = reader.readArray(reader1 -> reader1.getString());
+ deserializedVirtualEndpointResourceProperties.members = members;
+ } else if ("virtualEndpoints".equals(fieldName)) {
+ List virtualEndpoints = reader.readArray(reader1 -> reader1.getString());
+ deserializedVirtualEndpointResourceProperties.virtualEndpoints = virtualEndpoints;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedVirtualEndpointResourceProperties;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java
index 97f24ab84646d..66e0660b04384 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java
@@ -5,31 +5,33 @@
package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models;
import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.models.DelegatedSubnetUsage;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* Virtual network subnet usage data.
*/
@Immutable
-public final class VirtualNetworkSubnetUsageResultInner {
+public final class VirtualNetworkSubnetUsageResultInner
+ implements JsonSerializable {
/*
* The delegatedSubnetsUsage property.
*/
- @JsonProperty(value = "delegatedSubnetsUsage", access = JsonProperty.Access.WRITE_ONLY)
private List delegatedSubnetsUsage;
/*
* location of the delegated subnet usage
*/
- @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY)
private String location;
/*
* subscriptionId of the delegated subnet usage
*/
- @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY)
private String subscriptionId;
/**
@@ -75,4 +77,46 @@ public void validate() {
delegatedSubnetsUsage().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of VirtualNetworkSubnetUsageResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of VirtualNetworkSubnetUsageResultInner if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the VirtualNetworkSubnetUsageResultInner.
+ */
+ public static VirtualNetworkSubnetUsageResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ VirtualNetworkSubnetUsageResultInner deserializedVirtualNetworkSubnetUsageResultInner
+ = new VirtualNetworkSubnetUsageResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("delegatedSubnetsUsage".equals(fieldName)) {
+ List delegatedSubnetsUsage
+ = reader.readArray(reader1 -> DelegatedSubnetUsage.fromJson(reader1));
+ deserializedVirtualNetworkSubnetUsageResultInner.delegatedSubnetsUsage = delegatedSubnetsUsage;
+ } else if ("location".equals(fieldName)) {
+ deserializedVirtualNetworkSubnetUsageResultInner.location = reader.getString();
+ } else if ("subscriptionId".equals(fieldName)) {
+ deserializedVirtualNetworkSubnetUsageResultInner.subscriptionId = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedVirtualNetworkSubnetUsageResultInner;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/package-info.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/package-info.java
index 0e1a8c2fca79c..b445783ac8043 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/package-info.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/package-info.java
@@ -3,7 +3,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
/**
- * Package containing the inner data models for PostgreSqlManagementClient.
+ * Package containing the inner data models for PostgreSqlServerManagementClient.
* 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.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/package-info.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/package-info.java
index f06dd5765fa30..d213c46a0f2e5 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/package-info.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/package-info.java
@@ -3,7 +3,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
/**
- * Package containing the service clients for PostgreSqlManagementClient.
+ * Package containing the service clients for PostgreSqlServerManagementClient.
* 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.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ActiveDirectoryAdministratorImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ActiveDirectoryAdministratorImpl.java
index 1c7a2d41d9471..3237571c35dae 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ActiveDirectoryAdministratorImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ActiveDirectoryAdministratorImpl.java
@@ -15,10 +15,10 @@ public final class ActiveDirectoryAdministratorImpl
implements ActiveDirectoryAdministrator, ActiveDirectoryAdministrator.Definition {
private ActiveDirectoryAdministratorInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
ActiveDirectoryAdministratorImpl(ActiveDirectoryAdministratorInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -59,7 +59,7 @@ public ActiveDirectoryAdministratorInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
@@ -92,7 +92,7 @@ public ActiveDirectoryAdministrator create(Context context) {
}
ActiveDirectoryAdministratorImpl(String name,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = new ActiveDirectoryAdministratorInner();
this.serviceManager = serviceManager;
this.objectId = name;
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsClientImpl.java
index fee0ddadcfab8..6e1e4e2ad9d1c 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsClientImpl.java
@@ -51,25 +51,25 @@ public final class AdministratorsClientImpl implements AdministratorsClient {
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of AdministratorsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- AdministratorsClientImpl(PostgreSqlManagementClientImpl client) {
+ AdministratorsClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service
= RestProxy.create(AdministratorsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientAdministrators to be used by the proxy
- * service to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientAdministrators to be used by the
+ * proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface AdministratorsService {
@Headers({ "Content-Type: application/json" })
@Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}")
@@ -868,9 +868,7 @@ public PagedIterable listByServer(String reso
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -897,9 +895,7 @@ private Mono> listByServerNextS
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsImpl.java
index 99a09fbdd089f..f0c4802eb4a58 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsImpl.java
@@ -19,10 +19,10 @@ public final class AdministratorsImpl implements Administrators {
private final AdministratorsClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public AdministratorsImpl(AdministratorsClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -151,7 +151,7 @@ private AdministratorsClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsClientImpl.java
index e52435a749b5c..bd4c5c5e2f42f 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsClientImpl.java
@@ -4,6 +4,7 @@
package com.azure.resourcemanager.postgresqlflexibleserver.implementation;
+import com.azure.core.annotation.Delete;
import com.azure.core.annotation.ExpectedResponses;
import com.azure.core.annotation.Get;
import com.azure.core.annotation.HeaderParam;
@@ -11,6 +12,7 @@
import com.azure.core.annotation.Host;
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceInterface;
@@ -23,11 +25,16 @@
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.RestProxy;
import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsClient;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerBackupListResult;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/**
@@ -42,25 +49,43 @@ public final class BackupsClientImpl implements BackupsClient {
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of BackupsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- BackupsClientImpl(PostgreSqlManagementClientImpl client) {
+ BackupsClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service = RestProxy.create(BackupsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientBackups to be used by the proxy service to
- * perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientBackups to be used by the proxy
+ * service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface BackupsService {
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}")
+ @ExpectedResponses({ 200, 201, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @PathParam("backupName") String backupName, @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}")
@ExpectedResponses({ 200 })
@@ -88,6 +113,449 @@ Mono> listByServerNext(
@HeaderParam("Accept") String accept, Context context);
}
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return server backup properties along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono>> createWithResponseAsync(String resourceGroupName, String serverName,
+ String backupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (backupName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return server backup properties along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(String resourceGroupName, String serverName,
+ String backupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (backupName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, serverName, backupName, accept, context);
+ }
+
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of server backup properties.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux, ServerBackupInner> beginCreateAsync(String resourceGroupName,
+ String serverName, String backupName) {
+ Mono>> mono = createWithResponseAsync(resourceGroupName, serverName, backupName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ ServerBackupInner.class, ServerBackupInner.class, this.client.getContext());
+ }
+
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of server backup properties.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ServerBackupInner> beginCreateAsync(String resourceGroupName,
+ String serverName, String backupName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = createWithResponseAsync(resourceGroupName, serverName, backupName, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ ServerBackupInner.class, ServerBackupInner.class, context);
+ }
+
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of server backup properties.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ServerBackupInner> beginCreate(String resourceGroupName,
+ String serverName, String backupName) {
+ return this.beginCreateAsync(resourceGroupName, serverName, backupName).getSyncPoller();
+ }
+
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of server backup properties.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ServerBackupInner> beginCreate(String resourceGroupName,
+ String serverName, String backupName, Context context) {
+ return this.beginCreateAsync(resourceGroupName, serverName, backupName, context).getSyncPoller();
+ }
+
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return server backup properties on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createAsync(String resourceGroupName, String serverName, String backupName) {
+ return beginCreateAsync(resourceGroupName, serverName, backupName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return server backup properties on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String serverName, String backupName,
+ Context context) {
+ return beginCreateAsync(resourceGroupName, serverName, backupName, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return server backup properties.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ServerBackupInner create(String resourceGroupName, String serverName, String backupName) {
+ return createAsync(resourceGroupName, serverName, backupName).block();
+ }
+
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return server backup properties.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ServerBackupInner create(String resourceGroupName, String serverName, String backupName, Context context) {
+ return createAsync(resourceGroupName, serverName, backupName, context).block();
+ }
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName,
+ String backupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (backupName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName,
+ String backupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (serverName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null."));
+ }
+ if (backupName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, serverName, backupName, accept, context);
+ }
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName,
+ String backupName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, backupName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName,
+ String backupName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = deleteWithResponseAsync(resourceGroupName, serverName, backupName, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName,
+ String backupName) {
+ return this.beginDeleteAsync(resourceGroupName, serverName, backupName).getSyncPoller();
+ }
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName,
+ String backupName, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, serverName, backupName, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteAsync(String resourceGroupName, String serverName, String backupName) {
+ return beginDeleteAsync(resourceGroupName, serverName, backupName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String serverName, String backupName, Context context) {
+ return beginDeleteAsync(resourceGroupName, serverName, backupName, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String serverName, String backupName) {
+ deleteAsync(resourceGroupName, serverName, backupName).block();
+ }
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String serverName, String backupName, Context context) {
+ deleteAsync(resourceGroupName, serverName, backupName, context).block();
+ }
+
/**
* Get specific backup for a given server.
*
@@ -360,9 +828,7 @@ public PagedIterable listByServer(String resourceGroupName, S
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -388,9 +854,7 @@ private Mono> listByServerNextSinglePageAsync(S
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsImpl.java
index 5dedfd2aa6b56..f1b6fa2450e68 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsImpl.java
@@ -19,14 +19,40 @@ public final class BackupsImpl implements Backups {
private final BackupsClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public BackupsImpl(BackupsClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
+ public ServerBackup create(String resourceGroupName, String serverName, String backupName) {
+ ServerBackupInner inner = this.serviceClient().create(resourceGroupName, serverName, backupName);
+ if (inner != null) {
+ return new ServerBackupImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public ServerBackup create(String resourceGroupName, String serverName, String backupName, Context context) {
+ ServerBackupInner inner = this.serviceClient().create(resourceGroupName, serverName, backupName, context);
+ if (inner != null) {
+ return new ServerBackupImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String serverName, String backupName) {
+ this.serviceClient().delete(resourceGroupName, serverName, backupName);
+ }
+
+ public void delete(String resourceGroupName, String serverName, String backupName, Context context) {
+ this.serviceClient().delete(resourceGroupName, serverName, backupName, context);
+ }
+
public Response getWithResponse(String resourceGroupName, String serverName, String backupName,
Context context) {
Response inner
@@ -63,7 +89,7 @@ private BackupsClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java
index 201a89fb21345..d1074d44649c6 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java
@@ -39,25 +39,25 @@ public final class CheckNameAvailabilitiesClientImpl implements CheckNameAvailab
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of CheckNameAvailabilitiesClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- CheckNameAvailabilitiesClientImpl(PostgreSqlManagementClientImpl client) {
+ CheckNameAvailabilitiesClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service = RestProxy.create(CheckNameAvailabilitiesService.class, client.getHttpPipeline(),
client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientCheckNameAvailabilities to be used by the
- * proxy service to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientCheckNameAvailabilities to be used by
+ * the proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface CheckNameAvailabilitiesService {
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability")
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java
index f2687b661f162..fced965642d10 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilitiesImpl.java
@@ -19,10 +19,10 @@ public final class CheckNameAvailabilitiesImpl implements CheckNameAvailabilitie
private final CheckNameAvailabilitiesClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public CheckNameAvailabilitiesImpl(CheckNameAvailabilitiesClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -52,7 +52,7 @@ private CheckNameAvailabilitiesClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsClientImpl.java
index a003ced3fd13f..89a1f6b789344 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsClientImpl.java
@@ -39,25 +39,25 @@ public final class CheckNameAvailabilityWithLocationsClientImpl implements Check
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of CheckNameAvailabilityWithLocationsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- CheckNameAvailabilityWithLocationsClientImpl(PostgreSqlManagementClientImpl client) {
+ CheckNameAvailabilityWithLocationsClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service = RestProxy.create(CheckNameAvailabilityWithLocationsService.class, client.getHttpPipeline(),
client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientCheckNameAvailabilityWithLocations to be
- * used by the proxy service to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientCheckNameAvailabilityWithLocations to
+ * be used by the proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface CheckNameAvailabilityWithLocationsService {
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability")
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsImpl.java
index 5ef22f95fa7ee..708cb0153bb41 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CheckNameAvailabilityWithLocationsImpl.java
@@ -19,10 +19,10 @@ public final class CheckNameAvailabilityWithLocationsImpl implements CheckNameAv
private final CheckNameAvailabilityWithLocationsClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public CheckNameAvailabilityWithLocationsImpl(CheckNameAvailabilityWithLocationsClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -52,7 +52,7 @@ private CheckNameAvailabilityWithLocationsClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java
index eff6375328f55..f2fe9831b1073 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java
@@ -14,7 +14,7 @@
public final class ConfigurationImpl implements Configuration, Configuration.Definition, Configuration.Update {
private ConfigurationInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -84,7 +84,7 @@ public ConfigurationInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
@@ -117,7 +117,7 @@ public Configuration create(Context context) {
}
ConfigurationImpl(String name,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = new ConfigurationInner();
this.serviceManager = serviceManager;
this.configurationName = name;
@@ -143,7 +143,7 @@ public Configuration apply(Context context) {
}
ConfigurationImpl(ConfigurationInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java
index 15ca05436c6cf..cd39bf5e6a18e 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java
@@ -51,25 +51,25 @@ public final class ConfigurationsClientImpl implements ConfigurationsClient {
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of ConfigurationsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- ConfigurationsClientImpl(PostgreSqlManagementClientImpl client) {
+ ConfigurationsClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service
= RestProxy.create(ConfigurationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientConfigurations to be used by the proxy
- * service to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientConfigurations to be used by the
+ * proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface ConfigurationsService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations")
@@ -902,9 +902,7 @@ public ConfigurationInner put(String resourceGroupName, String serverName, Strin
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -931,9 +929,7 @@ private Mono> listByServerNextSinglePageAsync(
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsImpl.java
index 3b4799cbdd76b..fcda9885b5fac 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsImpl.java
@@ -19,10 +19,10 @@ public final class ConfigurationsImpl implements Configurations {
private final ConfigurationsClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public ConfigurationsImpl(ConfigurationsClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -101,7 +101,7 @@ private ConfigurationsClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabaseImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabaseImpl.java
index a4dd44e2f7a45..fd5893e461497 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabaseImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabaseImpl.java
@@ -12,10 +12,10 @@
public final class DatabaseImpl implements Database, Database.Definition {
private DatabaseInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
DatabaseImpl(DatabaseInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -48,7 +48,7 @@ public DatabaseInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
@@ -78,7 +78,8 @@ public Database create(Context context) {
return this;
}
- DatabaseImpl(String name, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ DatabaseImpl(String name,
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = new DatabaseInner();
this.serviceManager = serviceManager;
this.databaseName = name;
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java
index c65243406b8b7..5fd97db51d6d5 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java
@@ -50,25 +50,25 @@ public final class DatabasesClientImpl implements DatabasesClient {
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of DatabasesClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- DatabasesClientImpl(PostgreSqlManagementClientImpl client) {
+ DatabasesClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service
= RestProxy.create(DatabasesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientDatabases to be used by the proxy service
- * to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientDatabases to be used by the proxy
+ * service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface DatabasesService {
@Headers({ "Content-Type: application/json" })
@Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}")
@@ -853,9 +853,7 @@ public PagedIterable listByServer(String resourceGroupName, Strin
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -881,9 +879,7 @@ private Mono> listByServerNextSinglePageAsync(Strin
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesImpl.java
index e8f622f1b408e..eed8ba23c93ba 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesImpl.java
@@ -19,10 +19,10 @@ public final class DatabasesImpl implements Databases {
private final DatabasesClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public DatabasesImpl(DatabasesClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -146,7 +146,7 @@ private DatabasesClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRuleImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRuleImpl.java
index 79631545bd344..7d603b48228be 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRuleImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRuleImpl.java
@@ -12,7 +12,7 @@
public final class FirewallRuleImpl implements FirewallRule, FirewallRule.Definition, FirewallRule.Update {
private FirewallRuleInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -46,7 +46,7 @@ public FirewallRuleInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
@@ -76,7 +76,8 @@ public FirewallRule create(Context context) {
return this;
}
- FirewallRuleImpl(String name, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ FirewallRuleImpl(String name,
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = new FirewallRuleInner();
this.serviceManager = serviceManager;
this.firewallRuleName = name;
@@ -101,7 +102,7 @@ public FirewallRule apply(Context context) {
}
FirewallRuleImpl(FirewallRuleInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesClientImpl.java
index 91356280e91d7..87f5e1e2d9f31 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesClientImpl.java
@@ -50,25 +50,25 @@ public final class FirewallRulesClientImpl implements FirewallRulesClient {
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of FirewallRulesClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- FirewallRulesClientImpl(PostgreSqlManagementClientImpl client) {
+ FirewallRulesClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service
= RestProxy.create(FirewallRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientFirewallRules to be used by the proxy
+ * The interface defining all the services for PostgreSqlServerManagementClientFirewallRules to be used by the proxy
* service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface FirewallRulesService {
@Headers({ "Content-Type: application/json" })
@Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}")
@@ -871,9 +871,7 @@ public PagedIterable listByServer(String resourceGroupName, S
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -899,9 +897,7 @@ private Mono> listByServerNextSinglePageAsync(S
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesImpl.java
index ef96a6108bfa4..11f7c2f6ed80f 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesImpl.java
@@ -19,10 +19,10 @@ public final class FirewallRulesImpl implements FirewallRules {
private final FirewallRulesClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public FirewallRulesImpl(FirewallRulesClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -147,7 +147,7 @@ private FirewallRulesClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServerCapabilityImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServerCapabilityImpl.java
index ae6f7cefa57b1..1688e123786f3 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServerCapabilityImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServerCapabilityImpl.java
@@ -23,10 +23,10 @@
public final class FlexibleServerCapabilityImpl implements FlexibleServerCapability {
private FlexibleServerCapabilityInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
FlexibleServerCapabilityImpl(FlexibleServerCapabilityInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -102,7 +102,7 @@ public FlexibleServerCapabilityInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersClientImpl.java
index 646ae7b3c6b6b..531084f185f69 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersClientImpl.java
@@ -47,25 +47,25 @@ public final class FlexibleServersClientImpl implements FlexibleServersClient {
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of FlexibleServersClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- FlexibleServersClientImpl(PostgreSqlManagementClientImpl client) {
+ FlexibleServersClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service
= RestProxy.create(FlexibleServersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientFlexibleServers to be used by the proxy
- * service to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientFlexibleServers to be used by the
+ * proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface FlexibleServersService {
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrPreBackup")
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersImpl.java
index d5f1f6d4fbd6d..f0edfbe316aa4 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FlexibleServersImpl.java
@@ -23,10 +23,10 @@ public final class FlexibleServersImpl implements FlexibleServers {
private final FlexibleServersClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public FlexibleServersImpl(FlexibleServersClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -78,7 +78,7 @@ private FlexibleServersClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java
index d26733f7bca5b..1144ea3f6392e 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java
@@ -35,25 +35,25 @@ public final class GetPrivateDnsZoneSuffixesClientImpl implements GetPrivateDnsZ
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of GetPrivateDnsZoneSuffixesClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- GetPrivateDnsZoneSuffixesClientImpl(PostgreSqlManagementClientImpl client) {
+ GetPrivateDnsZoneSuffixesClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service = RestProxy.create(GetPrivateDnsZoneSuffixesService.class, client.getHttpPipeline(),
client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientGetPrivateDnsZoneSuffixes to be used by the
- * proxy service to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientGetPrivateDnsZoneSuffixes to be used
+ * by the proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface GetPrivateDnsZoneSuffixesService {
@Headers({ "Content-Type: application/json" })
@Post("/providers/Microsoft.DBforPostgreSQL/getPrivateDnsZoneSuffix")
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesImpl.java
index 3f7112b8a7067..1d6ae8cdac22e 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesImpl.java
@@ -15,10 +15,10 @@ public final class GetPrivateDnsZoneSuffixesImpl implements GetPrivateDnsZoneSuf
private final GetPrivateDnsZoneSuffixesClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public GetPrivateDnsZoneSuffixesImpl(GetPrivateDnsZoneSuffixesClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -35,7 +35,7 @@ private GetPrivateDnsZoneSuffixesClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java
index 929ab987066b4..bff6e28337b1b 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java
@@ -42,25 +42,25 @@ public final class LocationBasedCapabilitiesClientImpl implements LocationBasedC
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of LocationBasedCapabilitiesClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- LocationBasedCapabilitiesClientImpl(PostgreSqlManagementClientImpl client) {
+ LocationBasedCapabilitiesClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service = RestProxy.create(LocationBasedCapabilitiesService.class, client.getHttpPipeline(),
client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientLocationBasedCapabilities to be used by the
- * proxy service to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientLocationBasedCapabilities to be used
+ * by the proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface LocationBasedCapabilitiesService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/capabilities")
@@ -210,9 +210,7 @@ public PagedIterable execute(String locationName,
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -239,9 +237,7 @@ private Mono> executeNextSinglePage
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesImpl.java
index 84cbacf72601e..182446a492ecc 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LocationBasedCapabilitiesImpl.java
@@ -17,10 +17,10 @@ public final class LocationBasedCapabilitiesImpl implements LocationBasedCapabil
private final LocationBasedCapabilitiesClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public LocationBasedCapabilitiesImpl(LocationBasedCapabilitiesClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -39,7 +39,7 @@ private LocationBasedCapabilitiesClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFileImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFileImpl.java
index 2d19fdc0fa478..b4ae2480f26e1 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFileImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFileImpl.java
@@ -12,10 +12,10 @@
public final class LogFileImpl implements LogFile {
private LogFileInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
LogFileImpl(LogFileInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -60,7 +60,7 @@ public LogFileInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesClientImpl.java
index 948e4fffc4ba0..af5e3965d5b3f 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesClientImpl.java
@@ -42,24 +42,24 @@ public final class LogFilesClientImpl implements LogFilesClient {
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of LogFilesClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- LogFilesClientImpl(PostgreSqlManagementClientImpl client) {
+ LogFilesClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service = RestProxy.create(LogFilesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientLogFiles to be used by the proxy service to
- * perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientLogFiles to be used by the proxy
+ * service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface LogFilesService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/logFiles")
@@ -220,9 +220,7 @@ public PagedIterable listByServer(String resourceGroupName, String
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -248,9 +246,7 @@ private Mono> listByServerNextSinglePageAsync(String
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesImpl.java
index 9112ad94efdbd..c9f00b79c6184 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LogFilesImpl.java
@@ -17,10 +17,10 @@ public final class LogFilesImpl implements LogFiles {
private final LogFilesClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public LogFilesImpl(LogFilesClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -39,7 +39,7 @@ private LogFilesClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsClientImpl.java
index 9d49c86533787..f4be35ca6eb4b 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsClientImpl.java
@@ -42,25 +42,25 @@ public final class LtrBackupOperationsClientImpl implements LtrBackupOperationsC
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of LtrBackupOperationsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- LtrBackupOperationsClientImpl(PostgreSqlManagementClientImpl client) {
+ LtrBackupOperationsClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service = RestProxy.create(LtrBackupOperationsService.class, client.getHttpPipeline(),
client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientLtrBackupOperations to be used by the proxy
- * service to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientLtrBackupOperations to be used by the
+ * proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface LtrBackupOperationsService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations/{backupName}")
@@ -373,9 +373,7 @@ public PagedIterable listByServer(String resource
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -402,9 +400,7 @@ private Mono> listByServerNextSingl
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsImpl.java
index 4e1f59c589011..c1962970bd1f9 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupOperationsImpl.java
@@ -19,10 +19,10 @@ public final class LtrBackupOperationsImpl implements LtrBackupOperations {
private final LtrBackupOperationsClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public LtrBackupOperationsImpl(LtrBackupOperationsClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -65,7 +65,7 @@ private LtrBackupOperationsClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupResponseImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupResponseImpl.java
index 41eb434947e86..a4c62958c759a 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupResponseImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrBackupResponseImpl.java
@@ -12,10 +12,10 @@
public final class LtrBackupResponseImpl implements LtrBackupResponse {
private LtrBackupResponseInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
LtrBackupResponseImpl(LtrBackupResponseInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -64,7 +64,7 @@ public LtrBackupResponseInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrPreBackupResponseImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrPreBackupResponseImpl.java
index d879eded772c1..444d2a8b804d1 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrPreBackupResponseImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrPreBackupResponseImpl.java
@@ -10,10 +10,10 @@
public final class LtrPreBackupResponseImpl implements LtrPreBackupResponse {
private LtrPreBackupResponseInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
LtrPreBackupResponseImpl(LtrPreBackupResponseInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -26,7 +26,7 @@ public LtrPreBackupResponseInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrServerBackupOperationImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrServerBackupOperationImpl.java
index 98fc756d0f7a9..376ceba3bb9b8 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrServerBackupOperationImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrServerBackupOperationImpl.java
@@ -13,10 +13,10 @@
public final class LtrServerBackupOperationImpl implements LtrServerBackupOperation {
private LtrServerBackupOperationInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
LtrServerBackupOperationImpl(LtrServerBackupOperationInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -81,7 +81,7 @@ public LtrServerBackupOperationInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityResourceImpl.java
index 55e995c46e738..94288fa261f62 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityResourceImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityResourceImpl.java
@@ -11,10 +11,10 @@
public final class MigrationNameAvailabilityResourceImpl implements MigrationNameAvailabilityResource {
private MigrationNameAvailabilityResourceInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
MigrationNameAvailabilityResourceImpl(MigrationNameAvailabilityResourceInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -43,7 +43,7 @@ public MigrationNameAvailabilityResourceInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationResourceImpl.java
index fd46bca857a32..5b4d9bf06e037 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationResourceImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationResourceImpl.java
@@ -32,7 +32,7 @@ public final class MigrationResourceImpl
implements MigrationResource, MigrationResource.Definition, MigrationResource.Update {
private MigrationResourceInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -194,7 +194,7 @@ public MigrationResourceInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
@@ -235,7 +235,7 @@ public MigrationResource create(Context context) {
}
MigrationResourceImpl(String name,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = new MigrationResourceInner();
this.serviceManager = serviceManager;
this.migrationName = name;
@@ -265,7 +265,7 @@ public MigrationResource apply(Context context) {
}
MigrationResourceImpl(MigrationResourceInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.subscriptionId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "subscriptions");
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsClientImpl.java
index 56cd4c422e689..1c899c9719444 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsClientImpl.java
@@ -48,25 +48,25 @@ public final class MigrationsClientImpl implements MigrationsClient {
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of MigrationsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- MigrationsClientImpl(PostgreSqlManagementClientImpl client) {
+ MigrationsClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service
= RestProxy.create(MigrationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientMigrations to be used by the proxy service
- * to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientMigrations to be used by the proxy
+ * service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface MigrationsService {
@Headers({ "Content-Type: application/json" })
@Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/migrations/{migrationName}")
@@ -900,9 +900,7 @@ public PagedIterable listByTargetServer(String subscript
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -929,9 +927,7 @@ private Mono> listByTargetServerNextSingle
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsImpl.java
index f5f7fee79ce37..38480cdb48858 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsImpl.java
@@ -20,10 +20,10 @@ public final class MigrationsImpl implements Migrations {
private final MigrationsClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public MigrationsImpl(MigrationsClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -177,7 +177,7 @@ private MigrationsClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityImpl.java
index a6c3cc180e8a8..46f035c63db0f 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityImpl.java
@@ -11,10 +11,10 @@
public final class NameAvailabilityImpl implements NameAvailability {
private NameAvailabilityInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
NameAvailabilityImpl(NameAvailabilityInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -43,7 +43,7 @@ public NameAvailabilityInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationListResultImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationListResultImpl.java
index 72b44ea76a168..313c91037d71b 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationListResultImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationListResultImpl.java
@@ -13,10 +13,10 @@
public final class OperationListResultImpl implements OperationListResult {
private OperationListResultInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
OperationListResultImpl(OperationListResultInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -38,7 +38,7 @@ public OperationListResultInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsClientImpl.java
index d0dc22382967c..d4040e5ed2ea9 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsClientImpl.java
@@ -36,25 +36,25 @@ public final class OperationsClientImpl implements OperationsClient {
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of OperationsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- OperationsClientImpl(PostgreSqlManagementClientImpl client) {
+ OperationsClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service
= RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientOperations to be used by the proxy service
- * to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientOperations to be used by the proxy
+ * service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface OperationsService {
@Headers({ "Content-Type: application/json" })
@Get("/providers/Microsoft.DBforPostgreSQL/operations")
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsImpl.java
index 31c5934e5b806..28b0a9348ca23 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsImpl.java
@@ -18,10 +18,10 @@ public final class OperationsImpl implements Operations {
private final OperationsClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public OperationsImpl(OperationsClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -49,7 +49,7 @@ private OperationsClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlManagementClientBuilder.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlServerManagementClientBuilder.java
similarity index 69%
rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlManagementClientBuilder.java
rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlServerManagementClientBuilder.java
index 64d250e2957bb..850cff789f0c3 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlManagementClientBuilder.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlServerManagementClientBuilder.java
@@ -15,10 +15,10 @@
import java.time.Duration;
/**
- * A builder for creating a new instance of the PostgreSqlManagementClientImpl type.
+ * A builder for creating a new instance of the PostgreSqlServerManagementClientImpl type.
*/
-@ServiceClientBuilder(serviceClients = { PostgreSqlManagementClientImpl.class })
-public final class PostgreSqlManagementClientBuilder {
+@ServiceClientBuilder(serviceClients = { PostgreSqlServerManagementClientImpl.class })
+public final class PostgreSqlServerManagementClientBuilder {
/*
* The ID of the target subscription. The value must be an UUID.
*/
@@ -28,9 +28,9 @@ public final class PostgreSqlManagementClientBuilder {
* Sets The ID of the target subscription. The value must be an UUID.
*
* @param subscriptionId the subscriptionId value.
- * @return the PostgreSqlManagementClientBuilder.
+ * @return the PostgreSqlServerManagementClientBuilder.
*/
- public PostgreSqlManagementClientBuilder subscriptionId(String subscriptionId) {
+ public PostgreSqlServerManagementClientBuilder subscriptionId(String subscriptionId) {
this.subscriptionId = subscriptionId;
return this;
}
@@ -44,9 +44,9 @@ public PostgreSqlManagementClientBuilder subscriptionId(String subscriptionId) {
* Sets server parameter.
*
* @param endpoint the endpoint value.
- * @return the PostgreSqlManagementClientBuilder.
+ * @return the PostgreSqlServerManagementClientBuilder.
*/
- public PostgreSqlManagementClientBuilder endpoint(String endpoint) {
+ public PostgreSqlServerManagementClientBuilder endpoint(String endpoint) {
this.endpoint = endpoint;
return this;
}
@@ -60,9 +60,9 @@ public PostgreSqlManagementClientBuilder endpoint(String endpoint) {
* Sets The environment to connect to.
*
* @param environment the environment value.
- * @return the PostgreSqlManagementClientBuilder.
+ * @return the PostgreSqlServerManagementClientBuilder.
*/
- public PostgreSqlManagementClientBuilder environment(AzureEnvironment environment) {
+ public PostgreSqlServerManagementClientBuilder environment(AzureEnvironment environment) {
this.environment = environment;
return this;
}
@@ -76,9 +76,9 @@ public PostgreSqlManagementClientBuilder environment(AzureEnvironment environmen
* Sets The HTTP pipeline to send requests through.
*
* @param pipeline the pipeline value.
- * @return the PostgreSqlManagementClientBuilder.
+ * @return the PostgreSqlServerManagementClientBuilder.
*/
- public PostgreSqlManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ public PostgreSqlServerManagementClientBuilder pipeline(HttpPipeline pipeline) {
this.pipeline = pipeline;
return this;
}
@@ -92,9 +92,9 @@ public PostgreSqlManagementClientBuilder pipeline(HttpPipeline pipeline) {
* Sets The default poll interval for long-running operation.
*
* @param defaultPollInterval the defaultPollInterval value.
- * @return the PostgreSqlManagementClientBuilder.
+ * @return the PostgreSqlServerManagementClientBuilder.
*/
- public PostgreSqlManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ public PostgreSqlServerManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -108,19 +108,19 @@ public PostgreSqlManagementClientBuilder defaultPollInterval(Duration defaultPol
* Sets The serializer to serialize an object into a string.
*
* @param serializerAdapter the serializerAdapter value.
- * @return the PostgreSqlManagementClientBuilder.
+ * @return the PostgreSqlServerManagementClientBuilder.
*/
- public PostgreSqlManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ public PostgreSqlServerManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
this.serializerAdapter = serializerAdapter;
return this;
}
/**
- * Builds an instance of PostgreSqlManagementClientImpl with the provided parameters.
+ * Builds an instance of PostgreSqlServerManagementClientImpl with the provided parameters.
*
- * @return an instance of PostgreSqlManagementClientImpl.
+ * @return an instance of PostgreSqlServerManagementClientImpl.
*/
- public PostgreSqlManagementClientImpl buildClient() {
+ public PostgreSqlServerManagementClientImpl buildClient() {
String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
HttpPipeline localPipeline = (pipeline != null)
@@ -131,7 +131,7 @@ public PostgreSqlManagementClientImpl buildClient() {
SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
? serializerAdapter
: SerializerFactory.createDefaultManagementSerializerAdapter();
- PostgreSqlManagementClientImpl client = new PostgreSqlManagementClientImpl(localPipeline,
+ PostgreSqlServerManagementClientImpl client = new PostgreSqlServerManagementClientImpl(localPipeline,
localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
return client;
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlManagementClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlServerManagementClientImpl.java
similarity index 95%
rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlManagementClientImpl.java
rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlServerManagementClientImpl.java
index 0eedf5cbe5cf4..c1eeb44a64d6e 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlManagementClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlServerManagementClientImpl.java
@@ -37,11 +37,10 @@
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.LtrBackupOperationsClient;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.OperationsClient;
-import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PostgreSqlManagementClient;
+import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PostgreSqlServerManagementClient;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionOperationsClient;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient;
-import com.azure.resourcemanager.postgresqlflexibleserver.fluent.QuotaUsagesClient;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ReplicasClient;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ResourceProvidersClient;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerCapabilitiesClient;
@@ -59,10 +58,10 @@
import reactor.core.publisher.Mono;
/**
- * Initializes a new instance of the PostgreSqlManagementClientImpl type.
+ * Initializes a new instance of the PostgreSqlServerManagementClientImpl type.
*/
-@ServiceClient(builder = PostgreSqlManagementClientBuilder.class)
-public final class PostgreSqlManagementClientImpl implements PostgreSqlManagementClient {
+@ServiceClient(builder = PostgreSqlServerManagementClientBuilder.class)
+public final class PostgreSqlServerManagementClientImpl implements PostgreSqlServerManagementClient {
/**
* The ID of the target subscription. The value must be an UUID.
*/
@@ -413,20 +412,6 @@ public PrivateLinkResourcesClient getPrivateLinkResources() {
return this.privateLinkResources;
}
- /**
- * The QuotaUsagesClient object to access its operations.
- */
- private final QuotaUsagesClient quotaUsages;
-
- /**
- * Gets the QuotaUsagesClient object to access its operations.
- *
- * @return the QuotaUsagesClient object.
- */
- public QuotaUsagesClient getQuotaUsages() {
- return this.quotaUsages;
- }
-
/**
* The ReplicasClient object to access its operations.
*/
@@ -498,7 +483,7 @@ public VirtualNetworkSubnetUsagesClient getVirtualNetworkSubnetUsages() {
}
/**
- * Initializes an instance of PostgreSqlManagementClient client.
+ * Initializes an instance of PostgreSqlServerManagementClient client.
*
* @param httpPipeline The HTTP pipeline to send requests through.
* @param serializerAdapter The serializer to serialize an object into a string.
@@ -507,14 +492,14 @@ public VirtualNetworkSubnetUsagesClient getVirtualNetworkSubnetUsages() {
* @param subscriptionId The ID of the target subscription. The value must be an UUID.
* @param endpoint server parameter.
*/
- PostgreSqlManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ PostgreSqlServerManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) {
this.httpPipeline = httpPipeline;
this.serializerAdapter = serializerAdapter;
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2023-12-01-preview";
+ this.apiVersion = "2024-08-01";
this.administrators = new AdministratorsClientImpl(this);
this.backups = new BackupsClientImpl(this);
this.locationBasedCapabilities = new LocationBasedCapabilitiesClientImpl(this);
@@ -534,7 +519,6 @@ public VirtualNetworkSubnetUsagesClient getVirtualNetworkSubnetUsages() {
this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this);
this.privateEndpointConnectionOperations = new PrivateEndpointConnectionOperationsClientImpl(this);
this.privateLinkResources = new PrivateLinkResourcesClientImpl(this);
- this.quotaUsages = new QuotaUsagesClientImpl(this);
this.replicas = new ReplicasClientImpl(this);
this.logFiles = new LogFilesClientImpl(this);
this.serverThreatProtectionSettings = new ServerThreatProtectionSettingsClientImpl(this);
@@ -668,5 +652,5 @@ public Mono getBodyAsString(Charset charset) {
}
}
- private static final ClientLogger LOGGER = new ClientLogger(PostgreSqlManagementClientImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(PostgreSqlServerManagementClientImpl.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionImpl.java
index 1c017e7a0a489..5d3dfd851588a 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionImpl.java
@@ -16,10 +16,10 @@
public final class PrivateEndpointConnectionImpl implements PrivateEndpointConnection {
private PrivateEndpointConnectionInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -65,7 +65,7 @@ public PrivateEndpointConnectionInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsClientImpl.java
index d7fa81e0b316e..37e23e0b5406e 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsClientImpl.java
@@ -44,25 +44,25 @@ public final class PrivateEndpointConnectionOperationsClientImpl implements Priv
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of PrivateEndpointConnectionOperationsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- PrivateEndpointConnectionOperationsClientImpl(PostgreSqlManagementClientImpl client) {
+ PrivateEndpointConnectionOperationsClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service = RestProxy.create(PrivateEndpointConnectionOperationsService.class, client.getHttpPipeline(),
client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientPrivateEndpointConnectionOperations to be
- * used by the proxy service to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientPrivateEndpointConnectionOperations
+ * to be used by the proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface PrivateEndpointConnectionOperationsService {
@Headers({ "Content-Type: application/json" })
@Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}")
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsImpl.java
index 9ab8e1072a5c3..53cd83a20caad 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionOperationsImpl.java
@@ -16,10 +16,10 @@ public final class PrivateEndpointConnectionOperationsImpl implements PrivateEnd
private final PrivateEndpointConnectionOperationsClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public PrivateEndpointConnectionOperationsImpl(PrivateEndpointConnectionOperationsClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -59,7 +59,7 @@ private PrivateEndpointConnectionOperationsClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsClientImpl.java
index 6d48e99cf4b25..5b20a880af2fa 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsClientImpl.java
@@ -42,25 +42,25 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of PrivateEndpointConnectionsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- PrivateEndpointConnectionsClientImpl(PostgreSqlManagementClientImpl client) {
+ PrivateEndpointConnectionsClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(),
client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientPrivateEndpointConnections to be used by
- * the proxy service to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientPrivateEndpointConnections to be used
+ * by the proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface PrivateEndpointConnectionsService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}")
@@ -370,9 +370,7 @@ public PagedIterable listByServer(String resourc
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -399,9 +397,7 @@ private Mono> listByServerNextSing
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsImpl.java
index c5d58ff63e8ad..96e2c921a230d 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsImpl.java
@@ -19,10 +19,10 @@ public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConn
private final PrivateEndpointConnectionsClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -67,7 +67,7 @@ private PrivateEndpointConnectionsClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourceImpl.java
index 23d02b05fac8f..e6cc430b2fd42 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourceImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourceImpl.java
@@ -13,10 +13,10 @@
public final class PrivateLinkResourceImpl implements PrivateLinkResource {
private PrivateLinkResourceInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
PrivateLinkResourceImpl(PrivateLinkResourceInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -63,7 +63,7 @@ public PrivateLinkResourceInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesClientImpl.java
index 69f91fb500f49..251d077d6172a 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesClientImpl.java
@@ -42,25 +42,25 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of PrivateLinkResourcesClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- PrivateLinkResourcesClientImpl(PostgreSqlManagementClientImpl client) {
+ PrivateLinkResourcesClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service = RestProxy.create(PrivateLinkResourcesService.class, client.getHttpPipeline(),
client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientPrivateLinkResources to be used by the
- * proxy service to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientPrivateLinkResources to be used by
+ * the proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface PrivateLinkResourcesService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources")
@@ -366,9 +366,7 @@ public PrivateLinkResourceInner get(String resourceGroupName, String serverName,
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -395,9 +393,7 @@ private Mono> listByServerNextSinglePage
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesImpl.java
index 5732b22ec1d56..fbb23e9cbd4f2 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesImpl.java
@@ -19,10 +19,10 @@ public final class PrivateLinkResourcesImpl implements PrivateLinkResources {
private final PrivateLinkResourcesClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -65,7 +65,7 @@ private PrivateLinkResourcesClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsageImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsageImpl.java
deleted file mode 100644
index 7e4b096d65810..0000000000000
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsageImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.postgresqlflexibleserver.implementation;
-
-import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.QuotaUsageInner;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.NameProperty;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.QuotaUsage;
-
-public final class QuotaUsageImpl implements QuotaUsage {
- private QuotaUsageInner innerObject;
-
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
-
- QuotaUsageImpl(QuotaUsageInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- }
-
- public NameProperty name() {
- return this.innerModel().name();
- }
-
- public Long limit() {
- return this.innerModel().limit();
- }
-
- public String unit() {
- return this.innerModel().unit();
- }
-
- public Long currentValue() {
- return this.innerModel().currentValue();
- }
-
- public String id() {
- return this.innerModel().id();
- }
-
- public QuotaUsageInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsagesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsagesClientImpl.java
deleted file mode 100644
index 7372bbad2ba7a..0000000000000
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsagesClientImpl.java
+++ /dev/null
@@ -1,263 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.postgresqlflexibleserver.implementation;
-
-import com.azure.core.annotation.ExpectedResponses;
-import com.azure.core.annotation.Get;
-import com.azure.core.annotation.HeaderParam;
-import com.azure.core.annotation.Headers;
-import com.azure.core.annotation.Host;
-import com.azure.core.annotation.HostParam;
-import com.azure.core.annotation.PathParam;
-import com.azure.core.annotation.QueryParam;
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceInterface;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.annotation.UnexpectedResponseExceptionType;
-import com.azure.core.http.rest.PagedFlux;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.http.rest.PagedResponse;
-import com.azure.core.http.rest.PagedResponseBase;
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.RestProxy;
-import com.azure.core.management.exception.ManagementException;
-import com.azure.core.util.Context;
-import com.azure.core.util.FluxUtil;
-import com.azure.resourcemanager.postgresqlflexibleserver.fluent.QuotaUsagesClient;
-import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.QuotaUsageInner;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.QuotaUsagesListResult;
-import reactor.core.publisher.Mono;
-
-/**
- * An instance of this class provides access to all the operations defined in QuotaUsagesClient.
- */
-public final class QuotaUsagesClientImpl implements QuotaUsagesClient {
- /**
- * The proxy service used to perform REST calls.
- */
- private final QuotaUsagesService service;
-
- /**
- * The service client containing this operation class.
- */
- private final PostgreSqlManagementClientImpl client;
-
- /**
- * Initializes an instance of QuotaUsagesClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- QuotaUsagesClientImpl(PostgreSqlManagementClientImpl client) {
- this.service
- = RestProxy.create(QuotaUsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for PostgreSqlManagementClientQuotaUsages to be used by the proxy service
- * to perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
- public interface QuotaUsagesService {
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/resourceType/flexibleServers/usages")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
- @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
- }
-
- /**
- * Get quota usages at specified location in a given subscription.
- *
- * @param locationName The name of the location.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return quota usages at specified location in a given subscription along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String locationName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (locationName == null) {
- return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), locationName, accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
- res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Get quota usages at specified location in a given subscription.
- *
- * @param locationName The name of the location.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return quota usages at specified location in a given subscription along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String locationName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (locationName == null) {
- return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), locationName,
- accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * Get quota usages at specified location in a given subscription.
- *
- * @param locationName The name of the location.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return quota usages at specified location in a given subscription as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedFlux listAsync(String locationName) {
- return new PagedFlux<>(() -> listSinglePageAsync(locationName), nextLink -> listNextSinglePageAsync(nextLink));
- }
-
- /**
- * Get quota usages at specified location in a given subscription.
- *
- * @param locationName The name of the location.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return quota usages at specified location in a given subscription as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String locationName, Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(locationName, context),
- nextLink -> listNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Get quota usages at specified location in a given subscription.
- *
- * @param locationName The name of the location.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return quota usages at specified location in a given subscription as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String locationName) {
- return new PagedIterable<>(listAsync(locationName));
- }
-
- /**
- * Get quota usages at specified location in a given subscription.
- *
- * @param locationName The name of the location.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return quota usages at specified location in a given subscription as paginated response with
- * {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String locationName, Context context) {
- return new PagedIterable<>(listAsync(locationName, context));
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return capability for the PostgreSQL server along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listNextSinglePageAsync(String nextLink) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
- res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return capability for the PostgreSQL server along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listNextSinglePageAsync(String nextLink, Context context) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsagesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsagesImpl.java
deleted file mode 100644
index 47d5bef6e5f69..0000000000000
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsagesImpl.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.postgresqlflexibleserver.implementation;
-
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.util.Context;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.postgresqlflexibleserver.fluent.QuotaUsagesClient;
-import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.QuotaUsageInner;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.QuotaUsage;
-import com.azure.resourcemanager.postgresqlflexibleserver.models.QuotaUsages;
-
-public final class QuotaUsagesImpl implements QuotaUsages {
- private static final ClientLogger LOGGER = new ClientLogger(QuotaUsagesImpl.class);
-
- private final QuotaUsagesClient innerClient;
-
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
-
- public QuotaUsagesImpl(QuotaUsagesClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
- this.innerClient = innerClient;
- this.serviceManager = serviceManager;
- }
-
- public PagedIterable list(String locationName) {
- PagedIterable inner = this.serviceClient().list(locationName);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new QuotaUsageImpl(inner1, this.manager()));
- }
-
- public PagedIterable list(String locationName, Context context) {
- PagedIterable inner = this.serviceClient().list(locationName, context);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new QuotaUsageImpl(inner1, this.manager()));
- }
-
- private QuotaUsagesClient serviceClient() {
- return this.innerClient;
- }
-
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasClientImpl.java
index adee427a5123c..3d4fb1c9c4069 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasClientImpl.java
@@ -42,24 +42,24 @@ public final class ReplicasClientImpl implements ReplicasClient {
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of ReplicasClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- ReplicasClientImpl(PostgreSqlManagementClientImpl client) {
+ ReplicasClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service = RestProxy.create(ReplicasService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientReplicas to be used by the proxy service to
- * perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientReplicas to be used by the proxy
+ * service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface ReplicasService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/replicas")
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasImpl.java
index 2c4ebe0a0346b..26e891b49508f 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasImpl.java
@@ -17,10 +17,10 @@ public final class ReplicasImpl implements Replicas {
private final ReplicasClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public ReplicasImpl(ReplicasClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -39,7 +39,7 @@ private ReplicasClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersClientImpl.java
index 9ab4fe634faf0..1587169cb515d 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersClientImpl.java
@@ -38,25 +38,25 @@ public final class ResourceProvidersClientImpl implements ResourceProvidersClien
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of ResourceProvidersClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- ResourceProvidersClientImpl(PostgreSqlManagementClientImpl client) {
+ ResourceProvidersClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service
= RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientResourceProviders to be used by the proxy
- * service to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientResourceProviders to be used by the
+ * proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface ResourceProvidersService {
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{targetDbServerName}/checkMigrationNameAvailability")
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersImpl.java
index 391186cd010ac..577164b71f0cc 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceProvidersImpl.java
@@ -18,10 +18,10 @@ public final class ResourceProvidersImpl implements ResourceProviders {
private final ResourceProvidersClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public ResourceProvidersImpl(ResourceProvidersClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -55,7 +55,7 @@ private ResourceProvidersClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerBackupImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerBackupImpl.java
index 9390f52c7a325..83a669b1d6673 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerBackupImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerBackupImpl.java
@@ -13,10 +13,10 @@
public final class ServerBackupImpl implements ServerBackup {
private ServerBackupInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
ServerBackupImpl(ServerBackupInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -53,7 +53,7 @@ public ServerBackupInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesClientImpl.java
index 381dfe464f779..1ff1e1d3061ff 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesClientImpl.java
@@ -42,25 +42,25 @@ public final class ServerCapabilitiesClientImpl implements ServerCapabilitiesCli
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of ServerCapabilitiesClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- ServerCapabilitiesClientImpl(PostgreSqlManagementClientImpl client) {
+ ServerCapabilitiesClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service = RestProxy.create(ServerCapabilitiesService.class, client.getHttpPipeline(),
client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientServerCapabilities to be used by the proxy
- * service to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientServerCapabilities to be used by the
+ * proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface ServerCapabilitiesService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/capabilities")
@@ -225,9 +225,7 @@ public PagedIterable list(String resourceGroupNam
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -253,9 +251,7 @@ private Mono> listNextSinglePageAsy
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesImpl.java
index 5695d86fc4583..2d43b1b5d2a12 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerCapabilitiesImpl.java
@@ -17,10 +17,10 @@ public final class ServerCapabilitiesImpl implements ServerCapabilities {
private final ServerCapabilitiesClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public ServerCapabilitiesImpl(ServerCapabilitiesClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -40,7 +40,7 @@ private ServerCapabilitiesClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerImpl.java
index 75f61a38a4627..fd36b48f52691 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerImpl.java
@@ -37,7 +37,7 @@
public final class ServerImpl implements Server, Server.Definition, Server.Update {
private ServerInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -183,7 +183,7 @@ public ServerInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
@@ -212,7 +212,7 @@ public Server create(Context context) {
return this;
}
- ServerImpl(String name, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ ServerImpl(String name, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = new ServerInner();
this.serviceManager = serviceManager;
this.serverName = name;
@@ -238,7 +238,7 @@ public Server apply(Context context) {
}
ServerImpl(ServerInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
@@ -326,8 +326,13 @@ public ServerImpl withIdentity(UserAssignedIdentity identity) {
}
public ServerImpl withAdministratorLogin(String administratorLogin) {
- this.innerModel().withAdministratorLogin(administratorLogin);
- return this;
+ if (isInCreateMode()) {
+ this.innerModel().withAdministratorLogin(administratorLogin);
+ return this;
+ } else {
+ this.updateParameters.withAdministratorLogin(administratorLogin);
+ return this;
+ }
}
public ServerImpl withAdministratorLoginPassword(String administratorLoginPassword) {
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsClientImpl.java
index f2c0cc5e9aef1..4757e0e5642ff 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsClientImpl.java
@@ -50,25 +50,25 @@ public final class ServerThreatProtectionSettingsClientImpl implements ServerThr
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of ServerThreatProtectionSettingsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- ServerThreatProtectionSettingsClientImpl(PostgreSqlManagementClientImpl client) {
+ ServerThreatProtectionSettingsClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service = RestProxy.create(ServerThreatProtectionSettingsService.class, client.getHttpPipeline(),
client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientServerThreatProtectionSettings to be used
- * by the proxy service to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientServerThreatProtectionSettings to be
+ * used by the proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface ServerThreatProtectionSettingsService {
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings")
@@ -660,9 +660,7 @@ public ServerThreatProtectionSettingsModelInner createOrUpdate(String resourceGr
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -691,9 +689,7 @@ public ServerThreatProtectionSettingsModelInner createOrUpdate(String resourceGr
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsImpl.java
index 169ad54fde8f5..c6c585f678b10 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsImpl.java
@@ -20,10 +20,10 @@ public final class ServerThreatProtectionSettingsImpl implements ServerThreatPro
private final ServerThreatProtectionSettingsClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public ServerThreatProtectionSettingsImpl(ServerThreatProtectionSettingsClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -113,7 +113,7 @@ private ServerThreatProtectionSettingsClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsModelImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsModelImpl.java
index 19b713529fa16..de807abec7b7d 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsModelImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsModelImpl.java
@@ -16,7 +16,7 @@ public final class ServerThreatProtectionSettingsModelImpl implements ServerThre
ServerThreatProtectionSettingsModel.Definition, ServerThreatProtectionSettingsModel.Update {
private ServerThreatProtectionSettingsModelInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -50,7 +50,7 @@ public ServerThreatProtectionSettingsModelInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
@@ -82,7 +82,7 @@ public ServerThreatProtectionSettingsModel create(Context context) {
}
ServerThreatProtectionSettingsModelImpl(ThreatProtectionName name,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = new ServerThreatProtectionSettingsModelInner();
this.serviceManager = serviceManager;
this.threatProtectionName = name;
@@ -107,7 +107,7 @@ public ServerThreatProtectionSettingsModel apply(Context context) {
}
ServerThreatProtectionSettingsModelImpl(ServerThreatProtectionSettingsModelInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersClientImpl.java
index 42d443a1be3ba..2d984a2153044 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersClientImpl.java
@@ -54,24 +54,24 @@ public final class ServersClientImpl implements ServersClient {
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of ServersClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- ServersClientImpl(PostgreSqlManagementClientImpl client) {
+ ServersClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service = RestProxy.create(ServersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientServers to be used by the proxy service to
- * perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientServers to be used by the proxy
+ * service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface ServersService {
@Headers({ "Content-Type: application/json" })
@Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}")
@@ -1841,9 +1841,7 @@ public void stop(String resourceGroupName, String serverName, Context context) {
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1870,9 +1868,7 @@ private Mono> listByResourceGroupNextSinglePageAsync(
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -1898,9 +1894,7 @@ private Mono> listByResourceGroupNextSinglePageAsync(
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1925,9 +1919,7 @@ private Mono> listNextSinglePageAsync(String nextLink
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersImpl.java
index baee87c114dce..5ba86056c0f01 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersImpl.java
@@ -20,10 +20,10 @@ public final class ServersImpl implements Servers {
private final ServersClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public ServersImpl(ServersClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -161,7 +161,7 @@ private ServersClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointResourceImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointResourceImpl.java
index a65e150af19de..f130019970844 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointResourceImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointResourceImpl.java
@@ -17,7 +17,7 @@ public final class VirtualEndpointResourceImpl
implements VirtualEndpointResource, VirtualEndpointResource.Definition, VirtualEndpointResource.Update {
private VirtualEndpointResourceInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public VirtualEndpointType endpointType() {
return this.innerModel().endpointType();
@@ -65,7 +65,7 @@ public VirtualEndpointResourceInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
@@ -98,7 +98,7 @@ public VirtualEndpointResource create(Context context) {
}
VirtualEndpointResourceImpl(String name,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = new VirtualEndpointResourceInner();
this.serviceManager = serviceManager;
this.virtualEndpointName = name;
@@ -124,7 +124,7 @@ public VirtualEndpointResource apply(Context context) {
}
VirtualEndpointResourceImpl(VirtualEndpointResourceInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsClientImpl.java
index ae05ca6affbac..1f2780fbc39d5 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsClientImpl.java
@@ -52,25 +52,25 @@ public final class VirtualEndpointsClientImpl implements VirtualEndpointsClient
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of VirtualEndpointsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- VirtualEndpointsClientImpl(PostgreSqlManagementClientImpl client) {
+ VirtualEndpointsClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service
= RestProxy.create(VirtualEndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientVirtualEndpoints to be used by the proxy
- * service to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientVirtualEndpoints to be used by the
+ * proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface VirtualEndpointsService {
@Headers({ "Content-Type: application/json" })
@Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}")
@@ -1162,9 +1162,7 @@ public PagedIterable listByServer(String resourceG
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1190,9 +1188,7 @@ private Mono> listByServerNextSingle
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsImpl.java
index d42cf9fb48dd7..e1994a0e4085f 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsImpl.java
@@ -19,10 +19,10 @@ public final class VirtualEndpointsImpl implements VirtualEndpoints {
private final VirtualEndpointsClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public VirtualEndpointsImpl(VirtualEndpointsClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -150,7 +150,7 @@ private VirtualEndpointsClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageResultImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageResultImpl.java
index 583664b0a0f26..1f1fe084cd4a1 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageResultImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageResultImpl.java
@@ -13,10 +13,10 @@
public final class VirtualNetworkSubnetUsageResultImpl implements VirtualNetworkSubnetUsageResult {
private VirtualNetworkSubnetUsageResultInner innerObject;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
VirtualNetworkSubnetUsageResultImpl(VirtualNetworkSubnetUsageResultInner innerObject,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -42,7 +42,7 @@ public VirtualNetworkSubnetUsageResultInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesClientImpl.java
index 4d3cfb41db7ae..816d150930c94 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesClientImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesClientImpl.java
@@ -39,25 +39,25 @@ public final class VirtualNetworkSubnetUsagesClientImpl implements VirtualNetwor
/**
* The service client containing this operation class.
*/
- private final PostgreSqlManagementClientImpl client;
+ private final PostgreSqlServerManagementClientImpl client;
/**
* Initializes an instance of VirtualNetworkSubnetUsagesClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- VirtualNetworkSubnetUsagesClientImpl(PostgreSqlManagementClientImpl client) {
+ VirtualNetworkSubnetUsagesClientImpl(PostgreSqlServerManagementClientImpl client) {
this.service = RestProxy.create(VirtualNetworkSubnetUsagesService.class, client.getHttpPipeline(),
client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for PostgreSqlManagementClientVirtualNetworkSubnetUsages to be used by
- * the proxy service to perform REST calls.
+ * The interface defining all the services for PostgreSqlServerManagementClientVirtualNetworkSubnetUsages to be used
+ * by the proxy service to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "PostgreSqlManagement")
+ @ServiceInterface(name = "PostgreSqlServerMana")
public interface VirtualNetworkSubnetUsagesService {
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkVirtualNetworkSubnetUsage")
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesImpl.java
index ec63d80568716..2c75a662f4e52 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesImpl.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesImpl.java
@@ -19,10 +19,10 @@ public final class VirtualNetworkSubnetUsagesImpl implements VirtualNetworkSubne
private final VirtualNetworkSubnetUsagesClient innerClient;
- private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;
+ private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager;
public VirtualNetworkSubnetUsagesImpl(VirtualNetworkSubnetUsagesClient innerClient,
- com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
+ com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -52,7 +52,7 @@ private VirtualNetworkSubnetUsagesClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
+ private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlServerManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/package-info.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/package-info.java
index e0753268fc2d4..b756f3cf8efb2 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/package-info.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/package-info.java
@@ -3,7 +3,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
/**
- * Package containing the implementations for PostgreSqlManagementClient.
+ * Package containing the implementations for PostgreSqlServerManagementClient.
* 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.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministratorAdd.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministratorAdd.java
index 94ecc16653554..c101a4fbf7f62 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministratorAdd.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAdministratorAdd.java
@@ -5,18 +5,21 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorPropertiesForAdd;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* Represents an Active Directory administrator.
*/
@Fluent
-public final class ActiveDirectoryAdministratorAdd {
+public final class ActiveDirectoryAdministratorAdd implements JsonSerializable {
/*
* Properties of the active directory administrator.
*/
- @JsonProperty(value = "properties")
private AdministratorPropertiesForAdd innerProperties;
/**
@@ -113,4 +116,42 @@ public void validate() {
innerProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ActiveDirectoryAdministratorAdd from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ActiveDirectoryAdministratorAdd if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ActiveDirectoryAdministratorAdd.
+ */
+ public static ActiveDirectoryAdministratorAdd fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ActiveDirectoryAdministratorAdd deserializedActiveDirectoryAdministratorAdd
+ = new ActiveDirectoryAdministratorAdd();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("properties".equals(fieldName)) {
+ deserializedActiveDirectoryAdministratorAdd.innerProperties
+ = AdministratorPropertiesForAdd.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedActiveDirectoryAdministratorAdd;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAuthEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAuthEnum.java
index 403480c3b388d..0773e47827ad7 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAuthEnum.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ActiveDirectoryAuthEnum.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public ActiveDirectoryAuthEnum() {
* @param name a name to look for.
* @return the corresponding ActiveDirectoryAuthEnum.
*/
- @JsonCreator
public static ActiveDirectoryAuthEnum fromString(String name) {
return fromString(name, ActiveDirectoryAuthEnum.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentials.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentials.java
index 19717de9d8906..910670d2d3f88 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentials.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentials.java
@@ -6,23 +6,25 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Server admin credentials.
*/
@Fluent
-public final class AdminCredentials {
+public final class AdminCredentials implements JsonSerializable {
/*
* Password for source server.
*/
- @JsonProperty(value = "sourceServerPassword")
private String sourceServerPassword;
/*
* Password for target server.
*/
- @JsonProperty(value = "targetServerPassword")
private String targetServerPassword;
/**
@@ -90,4 +92,44 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(AdminCredentials.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("sourceServerPassword", this.sourceServerPassword);
+ jsonWriter.writeStringField("targetServerPassword", this.targetServerPassword);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AdminCredentials from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AdminCredentials if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the AdminCredentials.
+ */
+ public static AdminCredentials fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AdminCredentials deserializedAdminCredentials = new AdminCredentials();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("sourceServerPassword".equals(fieldName)) {
+ deserializedAdminCredentials.sourceServerPassword = reader.getString();
+ } else if ("targetServerPassword".equals(fieldName)) {
+ deserializedAdminCredentials.targetServerPassword = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAdminCredentials;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorListResult.java
index f496ec6efe060..1fdc68ca96fd2 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorListResult.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorListResult.java
@@ -5,25 +5,27 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ActiveDirectoryAdministratorInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* A list of active directory administrators.
*/
@Fluent
-public final class AdministratorListResult {
+public final class AdministratorListResult implements JsonSerializable {
/*
* The list of active directory administrators
*/
- @JsonProperty(value = "value")
private List value;
/*
* The link used to get the next page of active directory.
*/
- @JsonProperty(value = "nextLink")
private String nextLink;
/**
@@ -82,4 +84,45 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AdministratorListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AdministratorListResult if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the AdministratorListResult.
+ */
+ public static AdministratorListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AdministratorListResult deserializedAdministratorListResult = new AdministratorListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> ActiveDirectoryAdministratorInner.fromJson(reader1));
+ deserializedAdministratorListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedAdministratorListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAdministratorListResult;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ArmServerKeyType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ArmServerKeyType.java
index 679b1e59ccc23..f1dc83e3bdd62 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ArmServerKeyType.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ArmServerKeyType.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public ArmServerKeyType() {
* @param name a name to look for.
* @return the corresponding ArmServerKeyType.
*/
- @JsonCreator
public static ArmServerKeyType fromString(String name) {
return fromString(name, ArmServerKeyType.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfig.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfig.java
index 4ad0c184e249c..7d2113b95b06c 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfig.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfig.java
@@ -5,29 +5,30 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Authentication configuration properties of a server.
*/
@Fluent
-public final class AuthConfig {
+public final class AuthConfig implements JsonSerializable {
/*
* If Enabled, Azure Active Directory authentication is enabled.
*/
- @JsonProperty(value = "activeDirectoryAuth")
private ActiveDirectoryAuthEnum activeDirectoryAuth;
/*
* If Enabled, Password authentication is enabled.
*/
- @JsonProperty(value = "passwordAuth")
private PasswordAuthEnum passwordAuth;
/*
* Tenant id of the server.
*/
- @JsonProperty(value = "tenantId")
private String tenantId;
/**
@@ -103,4 +104,47 @@ public AuthConfig withTenantId(String tenantId) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("activeDirectoryAuth",
+ this.activeDirectoryAuth == null ? null : this.activeDirectoryAuth.toString());
+ jsonWriter.writeStringField("passwordAuth", this.passwordAuth == null ? null : this.passwordAuth.toString());
+ jsonWriter.writeStringField("tenantId", this.tenantId);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AuthConfig from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AuthConfig if the JsonReader was pointing to an instance of it, or null if it was pointing
+ * to JSON null.
+ * @throws IOException If an error occurs while reading the AuthConfig.
+ */
+ public static AuthConfig fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AuthConfig deserializedAuthConfig = new AuthConfig();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("activeDirectoryAuth".equals(fieldName)) {
+ deserializedAuthConfig.activeDirectoryAuth = ActiveDirectoryAuthEnum.fromString(reader.getString());
+ } else if ("passwordAuth".equals(fieldName)) {
+ deserializedAuthConfig.passwordAuth = PasswordAuthEnum.fromString(reader.getString());
+ } else if ("tenantId".equals(fieldName)) {
+ deserializedAuthConfig.tenantId = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAuthConfig;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTiers.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTiers.java
index 45bd49062fe97..bfe642c35cf59 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTiers.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTiers.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -97,7 +96,6 @@ public AzureManagedDiskPerformanceTiers() {
* @param name a name to look for.
* @return the corresponding AzureManagedDiskPerformanceTiers.
*/
- @JsonCreator
public static AzureManagedDiskPerformanceTiers fromString(String name) {
return fromString(name, AzureManagedDiskPerformanceTiers.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backup.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backup.java
index 3fd6904bc77c7..fff21b2a63eda 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backup.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backup.java
@@ -5,30 +5,32 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.time.OffsetDateTime;
/**
* Backup properties of a server.
*/
@Fluent
-public final class Backup {
+public final class Backup implements JsonSerializable {
/*
* Backup retention days for the server.
*/
- @JsonProperty(value = "backupRetentionDays")
private Integer backupRetentionDays;
/*
* A value indicating whether Geo-Redundant backup is enabled on the server.
*/
- @JsonProperty(value = "geoRedundantBackup")
private GeoRedundantBackupEnum geoRedundantBackup;
/*
* The earliest restore point time (ISO8601 format) for server.
*/
- @JsonProperty(value = "earliestRestoreDate", access = JsonProperty.Access.WRITE_ONLY)
private OffsetDateTime earliestRestoreDate;
/**
@@ -93,4 +95,47 @@ public OffsetDateTime earliestRestoreDate() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeNumberField("backupRetentionDays", this.backupRetentionDays);
+ jsonWriter.writeStringField("geoRedundantBackup",
+ this.geoRedundantBackup == null ? null : this.geoRedundantBackup.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of Backup from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of Backup if the JsonReader was pointing to an instance of it, or null if it was pointing to
+ * JSON null.
+ * @throws IOException If an error occurs while reading the Backup.
+ */
+ public static Backup fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ Backup deserializedBackup = new Backup();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("backupRetentionDays".equals(fieldName)) {
+ deserializedBackup.backupRetentionDays = reader.getNullable(JsonReader::getInt);
+ } else if ("geoRedundantBackup".equals(fieldName)) {
+ deserializedBackup.geoRedundantBackup = GeoRedundantBackupEnum.fromString(reader.getString());
+ } else if ("earliestRestoreDate".equals(fieldName)) {
+ deserializedBackup.earliestRestoreDate = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedBackup;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupRequestBase.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupRequestBase.java
index a3630ae83c09d..c7d7791a6ffa6 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupRequestBase.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupRequestBase.java
@@ -6,17 +6,20 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* BackupRequestBase is the base for all backup request.
*/
@Fluent
-public class BackupRequestBase {
+public class BackupRequestBase implements JsonSerializable {
/*
* Backup Settings
*/
- @JsonProperty(value = "backupSettings", required = true)
private BackupSettings backupSettings;
/**
@@ -61,4 +64,41 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(BackupRequestBase.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("backupSettings", this.backupSettings);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of BackupRequestBase from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of BackupRequestBase if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the BackupRequestBase.
+ */
+ public static BackupRequestBase fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ BackupRequestBase deserializedBackupRequestBase = new BackupRequestBase();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("backupSettings".equals(fieldName)) {
+ deserializedBackupRequestBase.backupSettings = BackupSettings.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedBackupRequestBase;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupSettings.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupSettings.java
index ef9bed7357c4f..6a505fb194665 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupSettings.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupSettings.java
@@ -6,17 +6,20 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* The settings for the long term backup.
*/
@Fluent
-public final class BackupSettings {
+public final class BackupSettings implements JsonSerializable {
/*
* Backup Name for the current backup
*/
- @JsonProperty(value = "backupName", required = true)
private String backupName;
/**
@@ -58,4 +61,41 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(BackupSettings.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("backupName", this.backupName);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of BackupSettings from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of BackupSettings if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the BackupSettings.
+ */
+ public static BackupSettings fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ BackupSettings deserializedBackupSettings = new BackupSettings();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("backupName".equals(fieldName)) {
+ deserializedBackupSettings.backupName = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedBackupSettings;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupStoreDetails.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupStoreDetails.java
index 88eb7f0dad745..5536be8e80fba 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupStoreDetails.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupStoreDetails.java
@@ -6,18 +6,21 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.List;
/**
* Details about the target where the backup content will be stored.
*/
@Fluent
-public final class BackupStoreDetails {
+public final class BackupStoreDetails implements JsonSerializable {
/*
* List of SAS uri of storage containers where backup data is to be streamed/copied.
*/
- @JsonProperty(value = "sasUriList", required = true)
private List sasUriList;
/**
@@ -59,4 +62,42 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(BackupStoreDetails.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("sasUriList", this.sasUriList, (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of BackupStoreDetails from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of BackupStoreDetails if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the BackupStoreDetails.
+ */
+ public static BackupStoreDetails fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ BackupStoreDetails deserializedBackupStoreDetails = new BackupStoreDetails();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("sasUriList".equals(fieldName)) {
+ List sasUriList = reader.readArray(reader1 -> reader1.getString());
+ deserializedBackupStoreDetails.sasUriList = sasUriList;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedBackupStoreDetails;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backups.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backups.java
index 4637cf515479b..e390b3f7cbcfa 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backups.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backups.java
@@ -12,6 +12,58 @@
* Resource collection API of Backups.
*/
public interface Backups {
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return server backup properties.
+ */
+ ServerBackup create(String resourceGroupName, String serverName, String backupName);
+
+ /**
+ * Create a specific backup for PostgreSQL flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return server backup properties.
+ */
+ ServerBackup create(String resourceGroupName, String serverName, String backupName, Context context);
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ void delete(String resourceGroupName, String serverName, String backupName);
+
+ /**
+ * Deletes a specific backup.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ void delete(String resourceGroupName, String serverName, String backupName, Context context);
+
/**
* Get specific backup for a given server.
*
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CancelEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CancelEnum.java
index 672905b4d7f16..c1b2def216244 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CancelEnum.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CancelEnum.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public CancelEnum() {
* @param name a name to look for.
* @return the corresponding CancelEnum.
*/
- @JsonCreator
public static CancelEnum fromString(String name) {
return fromString(name, CancelEnum.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesListResult.java
index 7bc618502280f..8f86d5a9706e7 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesListResult.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesListResult.java
@@ -5,25 +5,27 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FlexibleServerCapabilityInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* Capability for the PostgreSQL server.
*/
@Immutable
-public final class CapabilitiesListResult {
+public final class CapabilitiesListResult implements JsonSerializable {
/*
* A list of supported capabilities.
*/
- @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
private List value;
/*
* Link to retrieve next page of results.
*/
- @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
private String nextLink;
/**
@@ -60,4 +62,43 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CapabilitiesListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CapabilitiesListResult if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CapabilitiesListResult.
+ */
+ public static CapabilitiesListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CapabilitiesListResult deserializedCapabilitiesListResult = new CapabilitiesListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> FlexibleServerCapabilityInner.fromJson(reader1));
+ deserializedCapabilitiesListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedCapabilitiesListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCapabilitiesListResult;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityBase.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityBase.java
index 986c3d83e84d6..61f09fc113a55 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityBase.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityBase.java
@@ -5,23 +5,25 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Base object for representing capability.
*/
@Immutable
-public class CapabilityBase {
+public class CapabilityBase implements JsonSerializable {
/*
* The status of the capability.
*/
- @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
private CapabilityStatus status;
/*
* The reason for the capability not being available.
*/
- @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY)
private String reason;
/**
@@ -39,6 +41,17 @@ public CapabilityStatus status() {
return this.status;
}
+ /**
+ * Set the status property: The status of the capability.
+ *
+ * @param status the status value to set.
+ * @return the CapabilityBase object itself.
+ */
+ CapabilityBase withStatus(CapabilityStatus status) {
+ this.status = status;
+ return this;
+ }
+
/**
* Get the reason property: The reason for the capability not being available.
*
@@ -48,6 +61,17 @@ public String reason() {
return this.reason;
}
+ /**
+ * Set the reason property: The reason for the capability not being available.
+ *
+ * @param reason the reason value to set.
+ * @return the CapabilityBase object itself.
+ */
+ CapabilityBase withReason(String reason) {
+ this.reason = reason;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -55,4 +79,41 @@ public String reason() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CapabilityBase from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CapabilityBase if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CapabilityBase.
+ */
+ public static CapabilityBase fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CapabilityBase deserializedCapabilityBase = new CapabilityBase();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("status".equals(fieldName)) {
+ deserializedCapabilityBase.status = CapabilityStatus.fromString(reader.getString());
+ } else if ("reason".equals(fieldName)) {
+ deserializedCapabilityBase.reason = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCapabilityBase;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityStatus.java
index 4bf94f2cb52c3..0d721b02130d5 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityStatus.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityStatus.java
@@ -4,9 +4,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-
/**
* The status of the capability.
*/
@@ -46,7 +43,6 @@ public enum CapabilityStatus {
* @param value the serialized value to parse.
* @return the parsed CapabilityStatus object, or null if unable to parse.
*/
- @JsonCreator
public static CapabilityStatus fromString(String value) {
if (value == null) {
return null;
@@ -63,7 +59,6 @@ public static CapabilityStatus fromString(String value) {
/**
* {@inheritDoc}
*/
- @JsonValue
@Override
public String toString() {
return this.value;
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityReason.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityReason.java
index 5f4e7479786d7..aa9c4a3781c78 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityReason.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityReason.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public CheckNameAvailabilityReason() {
* @param name a name to look for.
* @return the corresponding CheckNameAvailabilityReason.
*/
- @JsonCreator
public static CheckNameAvailabilityReason fromString(String name) {
return fromString(name, CheckNameAvailabilityReason.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityRequest.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityRequest.java
index 698f493efa80d..24dbb5867c23b 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityRequest.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityRequest.java
@@ -5,23 +5,25 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* The check availability request body.
*/
@Fluent
-public final class CheckNameAvailabilityRequest {
+public final class CheckNameAvailabilityRequest implements JsonSerializable {
/*
* The name of the resource for which availability needs to be checked.
*/
- @JsonProperty(value = "name")
private String name;
/*
* The resource type.
*/
- @JsonProperty(value = "type")
private String type;
/**
@@ -77,4 +79,43 @@ public CheckNameAvailabilityRequest withType(String type) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("name", this.name);
+ jsonWriter.writeStringField("type", this.type);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CheckNameAvailabilityRequest from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CheckNameAvailabilityRequest if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CheckNameAvailabilityRequest.
+ */
+ public static CheckNameAvailabilityRequest fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CheckNameAvailabilityRequest deserializedCheckNameAvailabilityRequest = new CheckNameAvailabilityRequest();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedCheckNameAvailabilityRequest.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedCheckNameAvailabilityRequest.type = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCheckNameAvailabilityRequest;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityResponse.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityResponse.java
index ff59c8d36acd8..bf855751423e3 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityResponse.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityResponse.java
@@ -5,29 +5,30 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* The check availability result.
*/
@Fluent
-public class CheckNameAvailabilityResponse {
+public class CheckNameAvailabilityResponse implements JsonSerializable {
/*
* Indicates if the resource name is available.
*/
- @JsonProperty(value = "nameAvailable")
private Boolean nameAvailable;
/*
* The reason why the given name is not available.
*/
- @JsonProperty(value = "reason")
private CheckNameAvailabilityReason reason;
/*
* Detailed reason why the given name is available.
*/
- @JsonProperty(value = "message")
private String message;
/**
@@ -103,4 +104,49 @@ public CheckNameAvailabilityResponse withMessage(String message) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("nameAvailable", this.nameAvailable);
+ jsonWriter.writeStringField("reason", this.reason == null ? null : this.reason.toString());
+ jsonWriter.writeStringField("message", this.message);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CheckNameAvailabilityResponse from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CheckNameAvailabilityResponse if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CheckNameAvailabilityResponse.
+ */
+ public static CheckNameAvailabilityResponse fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CheckNameAvailabilityResponse deserializedCheckNameAvailabilityResponse
+ = new CheckNameAvailabilityResponse();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("nameAvailable".equals(fieldName)) {
+ deserializedCheckNameAvailabilityResponse.nameAvailable
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("reason".equals(fieldName)) {
+ deserializedCheckNameAvailabilityResponse.reason
+ = CheckNameAvailabilityReason.fromString(reader.getString());
+ } else if ("message".equals(fieldName)) {
+ deserializedCheckNameAvailabilityResponse.message = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCheckNameAvailabilityResponse;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configuration.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configuration.java
index aa6d239286dc2..e42999bd7e06b 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configuration.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configuration.java
@@ -41,7 +41,7 @@ public interface Configuration {
SystemData systemData();
/**
- * Gets the value property: Value of the configuration.
+ * Gets the value property: Value of the configuration. Required to update the configuration.
*
* @return the value value.
*/
@@ -76,7 +76,7 @@ public interface Configuration {
String allowedValues();
/**
- * Gets the source property: Source of the configuration.
+ * Gets the source property: Source of the configuration. Required to update the configuration.
*
* @return the source value.
*/
@@ -188,9 +188,9 @@ interface WithCreate extends DefinitionStages.WithValue, DefinitionStages.WithSo
*/
interface WithValue {
/**
- * Specifies the value property: Value of the configuration..
+ * Specifies the value property: Value of the configuration. Required to update the configuration..
*
- * @param value Value of the configuration.
+ * @param value Value of the configuration. Required to update the configuration.
* @return the next definition stage.
*/
WithCreate withValue(String value);
@@ -201,9 +201,9 @@ interface WithValue {
*/
interface WithSource {
/**
- * Specifies the source property: Source of the configuration..
+ * Specifies the source property: Source of the configuration. Required to update the configuration..
*
- * @param source Source of the configuration.
+ * @param source Source of the configuration. Required to update the configuration.
* @return the next definition stage.
*/
WithCreate withSource(String source);
@@ -246,9 +246,9 @@ interface UpdateStages {
*/
interface WithValue {
/**
- * Specifies the value property: Value of the configuration..
+ * Specifies the value property: Value of the configuration. Required to update the configuration..
*
- * @param value Value of the configuration.
+ * @param value Value of the configuration. Required to update the configuration.
* @return the next definition stage.
*/
Update withValue(String value);
@@ -259,9 +259,9 @@ interface WithValue {
*/
interface WithSource {
/**
- * Specifies the source property: Source of the configuration..
+ * Specifies the source property: Source of the configuration. Required to update the configuration..
*
- * @param source Source of the configuration.
+ * @param source Source of the configuration. Required to update the configuration.
* @return the next definition stage.
*/
Update withSource(String source);
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationDataType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationDataType.java
index 02f927abe4f93..c087e8eaaf1bb 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationDataType.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationDataType.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -47,7 +46,6 @@ public ConfigurationDataType() {
* @param name a name to look for.
* @return the corresponding ConfigurationDataType.
*/
- @JsonCreator
public static ConfigurationDataType fromString(String name) {
return fromString(name, ConfigurationDataType.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationForUpdate.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationForUpdate.java
index 99d0fed217561..897a06da6a89e 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationForUpdate.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationForUpdate.java
@@ -5,18 +5,21 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* Represents a Configuration.
*/
@Fluent
-public final class ConfigurationForUpdate {
+public final class ConfigurationForUpdate implements JsonSerializable {
/*
* The properties of a configuration.
*/
- @JsonProperty(value = "properties")
private ConfigurationProperties innerProperties;
/**
@@ -35,7 +38,7 @@ private ConfigurationProperties innerProperties() {
}
/**
- * Get the value property: Value of the configuration.
+ * Get the value property: Value of the configuration. Required to update the configuration.
*
* @return the value value.
*/
@@ -44,7 +47,7 @@ public String value() {
}
/**
- * Set the value property: Value of the configuration.
+ * Set the value property: Value of the configuration. Required to update the configuration.
*
* @param value the value value to set.
* @return the ConfigurationForUpdate object itself.
@@ -94,7 +97,7 @@ public String allowedValues() {
}
/**
- * Get the source property: Source of the configuration.
+ * Get the source property: Source of the configuration. Required to update the configuration.
*
* @return the source value.
*/
@@ -103,7 +106,7 @@ public String source() {
}
/**
- * Set the source property: Source of the configuration.
+ * Set the source property: Source of the configuration. Required to update the configuration.
*
* @param source the source value to set.
* @return the ConfigurationForUpdate object itself.
@@ -171,4 +174,40 @@ public void validate() {
innerProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ConfigurationForUpdate from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ConfigurationForUpdate if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ConfigurationForUpdate.
+ */
+ public static ConfigurationForUpdate fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ConfigurationForUpdate deserializedConfigurationForUpdate = new ConfigurationForUpdate();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("properties".equals(fieldName)) {
+ deserializedConfigurationForUpdate.innerProperties = ConfigurationProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedConfigurationForUpdate;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationListResult.java
index 4a1a8e69916e9..9061d91ff5f6e 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationListResult.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationListResult.java
@@ -5,25 +5,27 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* A list of server configurations.
*/
@Fluent
-public final class ConfigurationListResult {
+public final class ConfigurationListResult implements JsonSerializable {
/*
* The list of server configurations.
*/
- @JsonProperty(value = "value")
private List value;
/*
* The link used to get the next page of operations.
*/
- @JsonProperty(value = "nextLink")
private String nextLink;
/**
@@ -82,4 +84,44 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ConfigurationListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ConfigurationListResult if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ConfigurationListResult.
+ */
+ public static ConfigurationListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ConfigurationListResult deserializedConfigurationListResult = new ConfigurationListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> ConfigurationInner.fromJson(reader1));
+ deserializedConfigurationListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedConfigurationListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedConfigurationListResult;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateMode.java
index b1fe264f3da05..770389ec932d7 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateMode.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateMode.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -62,7 +61,6 @@ public CreateMode() {
* @param name a name to look for.
* @return the corresponding CreateMode.
*/
- @JsonCreator
public static CreateMode fromString(String name) {
return fromString(name, CreateMode.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForUpdate.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForUpdate.java
index 75971a4505829..10f4cee8d765c 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForUpdate.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForUpdate.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public CreateModeForUpdate() {
* @param name a name to look for.
* @return the corresponding CreateModeForUpdate.
*/
- @JsonCreator
public static CreateModeForUpdate fromString(String name) {
return fromString(name, CreateModeForUpdate.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryption.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryption.java
index da4aca6fd6e4c..5d5a95ba3a025 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryption.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryption.java
@@ -5,53 +5,50 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Data encryption properties of a server.
*/
@Fluent
-public final class DataEncryption {
+public final class DataEncryption implements JsonSerializable {
/*
* URI for the key in keyvault for data encryption of the primary server.
*/
- @JsonProperty(value = "primaryKeyURI")
private String primaryKeyUri;
/*
* Resource Id for the User assigned identity to be used for data encryption of the primary server.
*/
- @JsonProperty(value = "primaryUserAssignedIdentityId")
private String primaryUserAssignedIdentityId;
/*
* URI for the key in keyvault for data encryption for geo-backup of server.
*/
- @JsonProperty(value = "geoBackupKeyURI")
private String geoBackupKeyUri;
/*
* Resource Id for the User assigned identity to be used for data encryption for geo-backup of server.
*/
- @JsonProperty(value = "geoBackupUserAssignedIdentityId")
private String geoBackupUserAssignedIdentityId;
/*
* Data encryption type to depict if it is System Managed vs Azure Key vault.
*/
- @JsonProperty(value = "type")
private ArmServerKeyType type;
/*
* Primary encryption key status for Data encryption enabled server.
*/
- @JsonProperty(value = "primaryEncryptionKeyStatus")
private KeyStatusEnum primaryEncryptionKeyStatus;
/*
* Geo-backup encryption key status for Data encryption enabled server.
*/
- @JsonProperty(value = "geoBackupEncryptionKeyStatus")
private KeyStatusEnum geoBackupEncryptionKeyStatus;
/**
@@ -213,4 +210,62 @@ public DataEncryption withGeoBackupEncryptionKeyStatus(KeyStatusEnum geoBackupEn
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("primaryKeyURI", this.primaryKeyUri);
+ jsonWriter.writeStringField("primaryUserAssignedIdentityId", this.primaryUserAssignedIdentityId);
+ jsonWriter.writeStringField("geoBackupKeyURI", this.geoBackupKeyUri);
+ jsonWriter.writeStringField("geoBackupUserAssignedIdentityId", this.geoBackupUserAssignedIdentityId);
+ jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString());
+ jsonWriter.writeStringField("primaryEncryptionKeyStatus",
+ this.primaryEncryptionKeyStatus == null ? null : this.primaryEncryptionKeyStatus.toString());
+ jsonWriter.writeStringField("geoBackupEncryptionKeyStatus",
+ this.geoBackupEncryptionKeyStatus == null ? null : this.geoBackupEncryptionKeyStatus.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DataEncryption from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DataEncryption if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the DataEncryption.
+ */
+ public static DataEncryption fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DataEncryption deserializedDataEncryption = new DataEncryption();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("primaryKeyURI".equals(fieldName)) {
+ deserializedDataEncryption.primaryKeyUri = reader.getString();
+ } else if ("primaryUserAssignedIdentityId".equals(fieldName)) {
+ deserializedDataEncryption.primaryUserAssignedIdentityId = reader.getString();
+ } else if ("geoBackupKeyURI".equals(fieldName)) {
+ deserializedDataEncryption.geoBackupKeyUri = reader.getString();
+ } else if ("geoBackupUserAssignedIdentityId".equals(fieldName)) {
+ deserializedDataEncryption.geoBackupUserAssignedIdentityId = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedDataEncryption.type = ArmServerKeyType.fromString(reader.getString());
+ } else if ("primaryEncryptionKeyStatus".equals(fieldName)) {
+ deserializedDataEncryption.primaryEncryptionKeyStatus
+ = KeyStatusEnum.fromString(reader.getString());
+ } else if ("geoBackupEncryptionKeyStatus".equals(fieldName)) {
+ deserializedDataEncryption.geoBackupEncryptionKeyStatus
+ = KeyStatusEnum.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDataEncryption;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseListResult.java
index 0a9407fae1543..75079602812bd 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseListResult.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseListResult.java
@@ -5,25 +5,27 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.DatabaseInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* A List of databases.
*/
@Fluent
-public final class DatabaseListResult {
+public final class DatabaseListResult implements JsonSerializable {
/*
* The list of databases housed in a server
*/
- @JsonProperty(value = "value")
private List value;
/*
* The link used to get the next page of databases.
*/
- @JsonProperty(value = "nextLink")
private String nextLink;
/**
@@ -82,4 +84,44 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DatabaseListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DatabaseListResult if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the DatabaseListResult.
+ */
+ public static DatabaseListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DatabaseListResult deserializedDatabaseListResult = new DatabaseListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> DatabaseInner.fromJson(reader1));
+ deserializedDatabaseListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedDatabaseListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDatabaseListResult;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbLevelValidationStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbLevelValidationStatus.java
index bcd858b8a8708..44d26054c90f0 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbLevelValidationStatus.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbLevelValidationStatus.java
@@ -5,37 +5,39 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
import java.util.List;
/**
* Validation status summary for an individual database.
*/
@Fluent
-public final class DbLevelValidationStatus {
+public final class DbLevelValidationStatus implements JsonSerializable {
/*
* Name of the database
*/
- @JsonProperty(value = "databaseName")
private String databaseName;
/*
* Start date-time of a database level validation
*/
- @JsonProperty(value = "startedOn")
private OffsetDateTime startedOn;
/*
* End date-time of a database level validation
*/
- @JsonProperty(value = "endedOn")
private OffsetDateTime endedOn;
/*
* Summary of database level validations
*/
- @JsonProperty(value = "summary")
private List summary;
/**
@@ -134,4 +136,55 @@ public void validate() {
summary().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("databaseName", this.databaseName);
+ jsonWriter.writeStringField("startedOn",
+ this.startedOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startedOn));
+ jsonWriter.writeStringField("endedOn",
+ this.endedOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endedOn));
+ jsonWriter.writeArrayField("summary", this.summary, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DbLevelValidationStatus from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DbLevelValidationStatus if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the DbLevelValidationStatus.
+ */
+ public static DbLevelValidationStatus fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DbLevelValidationStatus deserializedDbLevelValidationStatus = new DbLevelValidationStatus();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("databaseName".equals(fieldName)) {
+ deserializedDbLevelValidationStatus.databaseName = reader.getString();
+ } else if ("startedOn".equals(fieldName)) {
+ deserializedDbLevelValidationStatus.startedOn = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("endedOn".equals(fieldName)) {
+ deserializedDbLevelValidationStatus.endedOn = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("summary".equals(fieldName)) {
+ List summary
+ = reader.readArray(reader1 -> ValidationSummaryItem.fromJson(reader1));
+ deserializedDbLevelValidationStatus.summary = summary;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDbLevelValidationStatus;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbMigrationStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbMigrationStatus.java
index 3d7af14ec80c3..f12d8f8a8cf76 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbMigrationStatus.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbMigrationStatus.java
@@ -5,108 +5,98 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
/**
* Migration status of an individual database.
*/
@Fluent
-public final class DbMigrationStatus {
+public final class DbMigrationStatus implements JsonSerializable {
/*
* Name of the database
*/
- @JsonProperty(value = "databaseName")
private String databaseName;
/*
* Migration db state of an individual database
*/
- @JsonProperty(value = "migrationState")
private MigrationDbState migrationState;
/*
* Migration operation of an individual database
*/
- @JsonProperty(value = "migrationOperation")
private String migrationOperation;
/*
* Start date-time of a migration state
*/
- @JsonProperty(value = "startedOn")
private OffsetDateTime startedOn;
/*
* End date-time of a migration state
*/
- @JsonProperty(value = "endedOn")
private OffsetDateTime endedOn;
/*
* Number of tables queued for the migration of a DB
*/
- @JsonProperty(value = "fullLoadQueuedTables")
private Integer fullLoadQueuedTables;
/*
* Number of tables errored out during the migration of a DB
*/
- @JsonProperty(value = "fullLoadErroredTables")
private Integer fullLoadErroredTables;
/*
* Number of tables loading during the migration of a DB
*/
- @JsonProperty(value = "fullLoadLoadingTables")
private Integer fullLoadLoadingTables;
/*
* Number of tables loaded during the migration of a DB
*/
- @JsonProperty(value = "fullLoadCompletedTables")
private Integer fullLoadCompletedTables;
/*
* CDC update counter
*/
- @JsonProperty(value = "cdcUpdateCounter")
private Integer cdcUpdateCounter;
/*
* CDC delete counter
*/
- @JsonProperty(value = "cdcDeleteCounter")
private Integer cdcDeleteCounter;
/*
* CDC insert counter
*/
- @JsonProperty(value = "cdcInsertCounter")
private Integer cdcInsertCounter;
/*
* CDC applied changes counter
*/
- @JsonProperty(value = "appliedChanges")
private Integer appliedChanges;
/*
* CDC incoming changes counter
*/
- @JsonProperty(value = "incomingChanges")
private Integer incomingChanges;
/*
* Lag in seconds between source and target during online phase
*/
- @JsonProperty(value = "latency")
private Integer latency;
/*
* Error message, if any, for the migration state
*/
- @JsonProperty(value = "message")
private String message;
/**
@@ -442,4 +432,90 @@ public DbMigrationStatus withMessage(String message) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("databaseName", this.databaseName);
+ jsonWriter.writeStringField("migrationState",
+ this.migrationState == null ? null : this.migrationState.toString());
+ jsonWriter.writeStringField("migrationOperation", this.migrationOperation);
+ jsonWriter.writeStringField("startedOn",
+ this.startedOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startedOn));
+ jsonWriter.writeStringField("endedOn",
+ this.endedOn == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endedOn));
+ jsonWriter.writeNumberField("fullLoadQueuedTables", this.fullLoadQueuedTables);
+ jsonWriter.writeNumberField("fullLoadErroredTables", this.fullLoadErroredTables);
+ jsonWriter.writeNumberField("fullLoadLoadingTables", this.fullLoadLoadingTables);
+ jsonWriter.writeNumberField("fullLoadCompletedTables", this.fullLoadCompletedTables);
+ jsonWriter.writeNumberField("cdcUpdateCounter", this.cdcUpdateCounter);
+ jsonWriter.writeNumberField("cdcDeleteCounter", this.cdcDeleteCounter);
+ jsonWriter.writeNumberField("cdcInsertCounter", this.cdcInsertCounter);
+ jsonWriter.writeNumberField("appliedChanges", this.appliedChanges);
+ jsonWriter.writeNumberField("incomingChanges", this.incomingChanges);
+ jsonWriter.writeNumberField("latency", this.latency);
+ jsonWriter.writeStringField("message", this.message);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DbMigrationStatus from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DbMigrationStatus if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the DbMigrationStatus.
+ */
+ public static DbMigrationStatus fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DbMigrationStatus deserializedDbMigrationStatus = new DbMigrationStatus();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("databaseName".equals(fieldName)) {
+ deserializedDbMigrationStatus.databaseName = reader.getString();
+ } else if ("migrationState".equals(fieldName)) {
+ deserializedDbMigrationStatus.migrationState = MigrationDbState.fromString(reader.getString());
+ } else if ("migrationOperation".equals(fieldName)) {
+ deserializedDbMigrationStatus.migrationOperation = reader.getString();
+ } else if ("startedOn".equals(fieldName)) {
+ deserializedDbMigrationStatus.startedOn = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("endedOn".equals(fieldName)) {
+ deserializedDbMigrationStatus.endedOn = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("fullLoadQueuedTables".equals(fieldName)) {
+ deserializedDbMigrationStatus.fullLoadQueuedTables = reader.getNullable(JsonReader::getInt);
+ } else if ("fullLoadErroredTables".equals(fieldName)) {
+ deserializedDbMigrationStatus.fullLoadErroredTables = reader.getNullable(JsonReader::getInt);
+ } else if ("fullLoadLoadingTables".equals(fieldName)) {
+ deserializedDbMigrationStatus.fullLoadLoadingTables = reader.getNullable(JsonReader::getInt);
+ } else if ("fullLoadCompletedTables".equals(fieldName)) {
+ deserializedDbMigrationStatus.fullLoadCompletedTables = reader.getNullable(JsonReader::getInt);
+ } else if ("cdcUpdateCounter".equals(fieldName)) {
+ deserializedDbMigrationStatus.cdcUpdateCounter = reader.getNullable(JsonReader::getInt);
+ } else if ("cdcDeleteCounter".equals(fieldName)) {
+ deserializedDbMigrationStatus.cdcDeleteCounter = reader.getNullable(JsonReader::getInt);
+ } else if ("cdcInsertCounter".equals(fieldName)) {
+ deserializedDbMigrationStatus.cdcInsertCounter = reader.getNullable(JsonReader::getInt);
+ } else if ("appliedChanges".equals(fieldName)) {
+ deserializedDbMigrationStatus.appliedChanges = reader.getNullable(JsonReader::getInt);
+ } else if ("incomingChanges".equals(fieldName)) {
+ deserializedDbMigrationStatus.incomingChanges = reader.getNullable(JsonReader::getInt);
+ } else if ("latency".equals(fieldName)) {
+ deserializedDbMigrationStatus.latency = reader.getNullable(JsonReader::getInt);
+ } else if ("message".equals(fieldName)) {
+ deserializedDbMigrationStatus.message = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDbMigrationStatus;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbServerMetadata.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbServerMetadata.java
index 24955f0e6ef23..da6bdf736ef31 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbServerMetadata.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbServerMetadata.java
@@ -5,35 +5,35 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Database server metadata.
*/
@Fluent
-public final class DbServerMetadata {
+public final class DbServerMetadata implements JsonSerializable {
/*
* Location of database server
*/
- @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY)
private String location;
/*
* Version for database engine
*/
- @JsonProperty(value = "version")
private String version;
/*
* Storage size in MB for database server
*/
- @JsonProperty(value = "storageMb")
private Integer storageMb;
/*
* SKU for the database server. This object is empty for PG single server
*/
- @JsonProperty(value = "sku")
private ServerSku sku;
/**
@@ -121,4 +121,48 @@ public void validate() {
sku().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("version", this.version);
+ jsonWriter.writeNumberField("storageMb", this.storageMb);
+ jsonWriter.writeJsonField("sku", this.sku);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DbServerMetadata from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DbServerMetadata if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the DbServerMetadata.
+ */
+ public static DbServerMetadata fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DbServerMetadata deserializedDbServerMetadata = new DbServerMetadata();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("location".equals(fieldName)) {
+ deserializedDbServerMetadata.location = reader.getString();
+ } else if ("version".equals(fieldName)) {
+ deserializedDbServerMetadata.version = reader.getString();
+ } else if ("storageMb".equals(fieldName)) {
+ deserializedDbServerMetadata.storageMb = reader.getNullable(JsonReader::getInt);
+ } else if ("sku".equals(fieldName)) {
+ deserializedDbServerMetadata.sku = ServerSku.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDbServerMetadata;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DelegatedSubnetUsage.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DelegatedSubnetUsage.java
index acf16ee4b34cc..3b5db7b5ef9af 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DelegatedSubnetUsage.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DelegatedSubnetUsage.java
@@ -5,23 +5,25 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Delegated subnet usage data.
*/
@Immutable
-public final class DelegatedSubnetUsage {
+public final class DelegatedSubnetUsage implements JsonSerializable {
/*
* Name of the delegated subnet for which IP addresses are in use
*/
- @JsonProperty(value = "subnetName", access = JsonProperty.Access.WRITE_ONLY)
private String subnetName;
/*
* Number of IP addresses used by the delegated subnet
*/
- @JsonProperty(value = "usage", access = JsonProperty.Access.WRITE_ONLY)
private Long usage;
/**
@@ -55,4 +57,41 @@ public Long usage() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DelegatedSubnetUsage from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DelegatedSubnetUsage if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the DelegatedSubnetUsage.
+ */
+ public static DelegatedSubnetUsage fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DelegatedSubnetUsage deserializedDelegatedSubnetUsage = new DelegatedSubnetUsage();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("subnetName".equals(fieldName)) {
+ deserializedDelegatedSubnetUsage.subnetName = reader.getString();
+ } else if ("usage".equals(fieldName)) {
+ deserializedDelegatedSubnetUsage.usage = reader.getNullable(JsonReader::getLong);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDelegatedSubnetUsage;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ExecutionStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ExecutionStatus.java
index 731185d438eaf..b575046a06d15 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ExecutionStatus.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ExecutionStatus.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -47,7 +46,6 @@ public ExecutionStatus() {
* @param name a name to look for.
* @return the corresponding ExecutionStatus.
*/
- @JsonCreator
public static ExecutionStatus fromString(String name) {
return fromString(name, ExecutionStatus.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FailoverMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FailoverMode.java
index f77dca3ac3a88..1317f54b100fd 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FailoverMode.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FailoverMode.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -47,7 +46,6 @@ public FailoverMode() {
* @param name a name to look for.
* @return the corresponding FailoverMode.
*/
- @JsonCreator
public static FailoverMode fromString(String name) {
return fromString(name, FailoverMode.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningEditionCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningEditionCapability.java
index 6e26a5d14c304..b1027ce6b918f 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningEditionCapability.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningEditionCapability.java
@@ -5,7 +5,10 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Represents capability of a fast provisioning edition.
@@ -15,33 +18,38 @@ public final class FastProvisioningEditionCapability extends CapabilityBase {
/*
* Fast provisioning supported tier name
*/
- @JsonProperty(value = "supportedTier", access = JsonProperty.Access.WRITE_ONLY)
private String supportedTier;
/*
* Fast provisioning supported sku name
*/
- @JsonProperty(value = "supportedSku", access = JsonProperty.Access.WRITE_ONLY)
private String supportedSku;
/*
* Fast provisioning supported storage in Gb
*/
- @JsonProperty(value = "supportedStorageGb", access = JsonProperty.Access.WRITE_ONLY)
private Integer supportedStorageGb;
/*
* Fast provisioning supported version
*/
- @JsonProperty(value = "supportedServerVersions", access = JsonProperty.Access.WRITE_ONLY)
private String supportedServerVersions;
/*
* Count of servers in cache matching the spec
*/
- @JsonProperty(value = "serverCount", access = JsonProperty.Access.WRITE_ONLY)
private Integer serverCount;
+ /*
+ * The reason for the capability not being available.
+ */
+ private String reason;
+
+ /*
+ * The status of the capability.
+ */
+ private CapabilityStatus status;
+
/**
* Creates an instance of FastProvisioningEditionCapability class.
*/
@@ -93,6 +101,26 @@ public Integer serverCount() {
return this.serverCount;
}
+ /**
+ * Get the reason property: The reason for the capability not being available.
+ *
+ * @return the reason value.
+ */
+ @Override
+ public String reason() {
+ return this.reason;
+ }
+
+ /**
+ * Get the status property: The status of the capability.
+ *
+ * @return the status value.
+ */
+ @Override
+ public CapabilityStatus status() {
+ return this.status;
+ }
+
/**
* Validates the instance.
*
@@ -100,6 +128,55 @@ public Integer serverCount() {
*/
@Override
public void validate() {
- super.validate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FastProvisioningEditionCapability from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FastProvisioningEditionCapability if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the FastProvisioningEditionCapability.
+ */
+ public static FastProvisioningEditionCapability fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FastProvisioningEditionCapability deserializedFastProvisioningEditionCapability
+ = new FastProvisioningEditionCapability();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("status".equals(fieldName)) {
+ deserializedFastProvisioningEditionCapability.status
+ = CapabilityStatus.fromString(reader.getString());
+ } else if ("reason".equals(fieldName)) {
+ deserializedFastProvisioningEditionCapability.reason = reader.getString();
+ } else if ("supportedTier".equals(fieldName)) {
+ deserializedFastProvisioningEditionCapability.supportedTier = reader.getString();
+ } else if ("supportedSku".equals(fieldName)) {
+ deserializedFastProvisioningEditionCapability.supportedSku = reader.getString();
+ } else if ("supportedStorageGb".equals(fieldName)) {
+ deserializedFastProvisioningEditionCapability.supportedStorageGb
+ = reader.getNullable(JsonReader::getInt);
+ } else if ("supportedServerVersions".equals(fieldName)) {
+ deserializedFastProvisioningEditionCapability.supportedServerVersions = reader.getString();
+ } else if ("serverCount".equals(fieldName)) {
+ deserializedFastProvisioningEditionCapability.serverCount = reader.getNullable(JsonReader::getInt);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFastProvisioningEditionCapability;
+ });
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupportedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupportedEnum.java
index 9259060abbe37..616b5ac852685 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupportedEnum.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupportedEnum.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -38,7 +37,6 @@ public FastProvisioningSupportedEnum() {
* @param name a name to look for.
* @return the corresponding FastProvisioningSupportedEnum.
*/
- @JsonCreator
public static FastProvisioningSupportedEnum fromString(String name) {
return fromString(name, FastProvisioningSupportedEnum.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleListResult.java
index 8d432f6d97513..ccc8da72840bb 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleListResult.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleListResult.java
@@ -5,25 +5,27 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* A list of firewall rules.
*/
@Fluent
-public final class FirewallRuleListResult {
+public final class FirewallRuleListResult implements JsonSerializable {
/*
* The list of firewall rules in a server.
*/
- @JsonProperty(value = "value")
private List value;
/*
* The link used to get the next page of operations.
*/
- @JsonProperty(value = "nextLink")
private String nextLink;
/**
@@ -82,4 +84,44 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FirewallRuleListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FirewallRuleListResult if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the FirewallRuleListResult.
+ */
+ public static FirewallRuleListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FirewallRuleListResult deserializedFirewallRuleListResult = new FirewallRuleListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> FirewallRuleInner.fromJson(reader1));
+ deserializedFirewallRuleListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedFirewallRuleListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFirewallRuleListResult;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerEditionCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerEditionCapability.java
index 112608e11a9a1..d2c5843c34b8c 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerEditionCapability.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServerEditionCapability.java
@@ -5,7 +5,10 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.List;
/**
@@ -16,27 +19,33 @@ public final class FlexibleServerEditionCapability extends CapabilityBase {
/*
* Server edition name
*/
- @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
/*
* Default sku name for the server edition
*/
- @JsonProperty(value = "defaultSkuName", access = JsonProperty.Access.WRITE_ONLY)
private String defaultSkuName;
/*
* The list of editions supported by this server edition.
*/
- @JsonProperty(value = "supportedStorageEditions", access = JsonProperty.Access.WRITE_ONLY)
private List supportedStorageEditions;
/*
* List of supported server SKUs.
*/
- @JsonProperty(value = "supportedServerSkus", access = JsonProperty.Access.WRITE_ONLY)
private List supportedServerSkus;
+ /*
+ * The reason for the capability not being available.
+ */
+ private String reason;
+
+ /*
+ * The status of the capability.
+ */
+ private CapabilityStatus status;
+
/**
* Creates an instance of FlexibleServerEditionCapability class.
*/
@@ -79,6 +88,26 @@ public List supportedServerSkus() {
return this.supportedServerSkus;
}
+ /**
+ * Get the reason property: The reason for the capability not being available.
+ *
+ * @return the reason value.
+ */
+ @Override
+ public String reason() {
+ return this.reason;
+ }
+
+ /**
+ * Get the status property: The status of the capability.
+ *
+ * @return the status value.
+ */
+ @Override
+ public CapabilityStatus status() {
+ return this.status;
+ }
+
/**
* Validates the instance.
*
@@ -86,7 +115,6 @@ public List supportedServerSkus() {
*/
@Override
public void validate() {
- super.validate();
if (supportedStorageEditions() != null) {
supportedStorageEditions().forEach(e -> e.validate());
}
@@ -94,4 +122,55 @@ public void validate() {
supportedServerSkus().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FlexibleServerEditionCapability from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FlexibleServerEditionCapability if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the FlexibleServerEditionCapability.
+ */
+ public static FlexibleServerEditionCapability fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FlexibleServerEditionCapability deserializedFlexibleServerEditionCapability
+ = new FlexibleServerEditionCapability();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("status".equals(fieldName)) {
+ deserializedFlexibleServerEditionCapability.status
+ = CapabilityStatus.fromString(reader.getString());
+ } else if ("reason".equals(fieldName)) {
+ deserializedFlexibleServerEditionCapability.reason = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedFlexibleServerEditionCapability.name = reader.getString();
+ } else if ("defaultSkuName".equals(fieldName)) {
+ deserializedFlexibleServerEditionCapability.defaultSkuName = reader.getString();
+ } else if ("supportedStorageEditions".equals(fieldName)) {
+ List supportedStorageEditions
+ = reader.readArray(reader1 -> StorageEditionCapability.fromJson(reader1));
+ deserializedFlexibleServerEditionCapability.supportedStorageEditions = supportedStorageEditions;
+ } else if ("supportedServerSkus".equals(fieldName)) {
+ List supportedServerSkus
+ = reader.readArray(reader1 -> ServerSkuCapability.fromJson(reader1));
+ deserializedFlexibleServerEditionCapability.supportedServerSkus = supportedServerSkus;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFlexibleServerEditionCapability;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServersTriggerLtrPreBackupHeaders.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServersTriggerLtrPreBackupHeaders.java
index ebfba0da65ed6..4779a9e1e3596 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServersTriggerLtrPreBackupHeaders.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FlexibleServersTriggerLtrPreBackupHeaders.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.http.HttpHeaderName;
import com.azure.core.http.HttpHeaders;
-import com.fasterxml.jackson.annotation.JsonProperty;
/**
* The FlexibleServersTriggerLtrPreBackupHeaders model.
@@ -17,7 +16,6 @@ public final class FlexibleServersTriggerLtrPreBackupHeaders {
/*
* The x-ms-request-id property.
*/
- @JsonProperty(value = "x-ms-request-id")
private String xMsRequestId;
// HttpHeaders containing the raw property values.
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoBackupSupportedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoBackupSupportedEnum.java
index a814e59382997..90eb394f96a12 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoBackupSupportedEnum.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoBackupSupportedEnum.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -38,7 +37,6 @@ public GeoBackupSupportedEnum() {
* @param name a name to look for.
* @return the corresponding GeoBackupSupportedEnum.
*/
- @JsonCreator
public static GeoBackupSupportedEnum fromString(String name) {
return fromString(name, GeoBackupSupportedEnum.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoRedundantBackupEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoRedundantBackupEnum.java
index 4d5e666ccd8c8..d6a4d2d77497a 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoRedundantBackupEnum.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeoRedundantBackupEnum.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public GeoRedundantBackupEnum() {
* @param name a name to look for.
* @return the corresponding GeoRedundantBackupEnum.
*/
- @JsonCreator
public static GeoRedundantBackupEnum fromString(String name) {
return fromString(name, GeoRedundantBackupEnum.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HaMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HaMode.java
index 4fb359d7c85e9..bef85a725c036 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HaMode.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HaMode.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public HaMode() {
* @param name a name to look for.
* @return the corresponding HaMode.
*/
- @JsonCreator
public static HaMode fromString(String name) {
return fromString(name, HaMode.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailability.java
index da17334173f7c..0319da6d63a5f 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailability.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailability.java
@@ -5,29 +5,30 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* High availability properties of a server.
*/
@Fluent
-public final class HighAvailability {
+public final class HighAvailability implements JsonSerializable {
/*
* The HA mode for the server.
*/
- @JsonProperty(value = "mode")
private HighAvailabilityMode mode;
/*
* A state of a HA server that is visible to user.
*/
- @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
private ServerHAState state;
/*
* availability zone information of the standby.
*/
- @JsonProperty(value = "standbyAvailabilityZone")
private String standbyAvailabilityZone;
/**
@@ -92,4 +93,45 @@ public HighAvailability withStandbyAvailabilityZone(String standbyAvailabilityZo
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString());
+ jsonWriter.writeStringField("standbyAvailabilityZone", this.standbyAvailabilityZone);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of HighAvailability from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of HighAvailability if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the HighAvailability.
+ */
+ public static HighAvailability fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ HighAvailability deserializedHighAvailability = new HighAvailability();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("mode".equals(fieldName)) {
+ deserializedHighAvailability.mode = HighAvailabilityMode.fromString(reader.getString());
+ } else if ("state".equals(fieldName)) {
+ deserializedHighAvailability.state = ServerHAState.fromString(reader.getString());
+ } else if ("standbyAvailabilityZone".equals(fieldName)) {
+ deserializedHighAvailability.standbyAvailabilityZone = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedHighAvailability;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityMode.java
index 430dac145ff7c..6158bbda22016 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityMode.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityMode.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -42,7 +41,6 @@ public HighAvailabilityMode() {
* @param name a name to look for.
* @return the corresponding HighAvailabilityMode.
*/
- @JsonCreator
public static HighAvailabilityMode fromString(String name) {
return fromString(name, HighAvailabilityMode.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IdentityType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IdentityType.java
index 7c3314c7b988d..e552e69843fe2 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IdentityType.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IdentityType.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public IdentityType() {
* @param name a name to look for.
* @return the corresponding IdentityType.
*/
- @JsonCreator
public static IdentityType fromString(String name) {
return fromString(name, IdentityType.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/KeyStatusEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/KeyStatusEnum.java
index cf2f652ff4d0a..d985ad1ea7387 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/KeyStatusEnum.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/KeyStatusEnum.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public KeyStatusEnum() {
* @param name a name to look for.
* @return the corresponding KeyStatusEnum.
*/
- @JsonCreator
public static KeyStatusEnum fromString(String name) {
return fromString(name, KeyStatusEnum.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFileListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFileListResult.java
index 05ec090bf0430..83517b041fb42 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFileListResult.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogFileListResult.java
@@ -5,25 +5,27 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LogFileInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* A List of logFiles.
*/
@Fluent
-public final class LogFileListResult {
+public final class LogFileListResult implements JsonSerializable {
/*
* The list of logFiles in a server
*/
- @JsonProperty(value = "value")
private List value;
/*
* The link used to get the next page of operations.
*/
- @JsonProperty(value = "nextLink")
private String nextLink;
/**
@@ -82,4 +84,44 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LogFileListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LogFileListResult if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the LogFileListResult.
+ */
+ public static LogFileListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LogFileListResult deserializedLogFileListResult = new LogFileListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> LogFileInner.fromJson(reader1));
+ deserializedLogFileListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedLogFileListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLogFileListResult;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceDbEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceDbEnum.java
index 40b72fb2bc98a..20a461a8ba726 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceDbEnum.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceDbEnum.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public LogicalReplicationOnSourceDbEnum() {
* @param name a name to look for.
* @return the corresponding LogicalReplicationOnSourceDbEnum.
*/
- @JsonCreator
public static LogicalReplicationOnSourceDbEnum fromString(String name) {
return fromString(name, LogicalReplicationOnSourceDbEnum.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupRequest.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupRequest.java
index c18c23df7a0d1..628431d1e55e8 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupRequest.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrBackupRequest.java
@@ -6,7 +6,10 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* The request that is made for a long term retention backup.
@@ -16,7 +19,6 @@ public final class LtrBackupRequest extends BackupRequestBase {
/*
* Backup store detail for target server
*/
- @JsonProperty(value = "targetDetails", required = true)
private BackupStoreDetails targetDetails;
/**
@@ -61,14 +63,60 @@ public LtrBackupRequest withBackupSettings(BackupSettings backupSettings) {
*/
@Override
public void validate() {
- super.validate();
if (targetDetails() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException("Missing required property targetDetails in model LtrBackupRequest"));
} else {
targetDetails().validate();
}
+ if (backupSettings() == null) {
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Missing required property backupSettings in model LtrBackupRequest"));
+ } else {
+ backupSettings().validate();
+ }
}
private static final ClientLogger LOGGER = new ClientLogger(LtrBackupRequest.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("backupSettings", backupSettings());
+ jsonWriter.writeJsonField("targetDetails", this.targetDetails);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LtrBackupRequest from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LtrBackupRequest if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the LtrBackupRequest.
+ */
+ public static LtrBackupRequest fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LtrBackupRequest deserializedLtrBackupRequest = new LtrBackupRequest();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("backupSettings".equals(fieldName)) {
+ deserializedLtrBackupRequest.withBackupSettings(BackupSettings.fromJson(reader));
+ } else if ("targetDetails".equals(fieldName)) {
+ deserializedLtrBackupRequest.targetDetails = BackupStoreDetails.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLtrBackupRequest;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrPreBackupRequest.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrPreBackupRequest.java
index ca532f0b6bb7b..df8c8c4e8aeb0 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrPreBackupRequest.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrPreBackupRequest.java
@@ -5,6 +5,11 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* A request that is made for pre-backup.
@@ -33,6 +38,51 @@ public LtrPreBackupRequest withBackupSettings(BackupSettings backupSettings) {
*/
@Override
public void validate() {
- super.validate();
+ if (backupSettings() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property backupSettings in model LtrPreBackupRequest"));
+ } else {
+ backupSettings().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(LtrPreBackupRequest.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("backupSettings", backupSettings());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LtrPreBackupRequest from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LtrPreBackupRequest if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the LtrPreBackupRequest.
+ */
+ public static LtrPreBackupRequest fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LtrPreBackupRequest deserializedLtrPreBackupRequest = new LtrPreBackupRequest();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("backupSettings".equals(fieldName)) {
+ deserializedLtrPreBackupRequest.withBackupSettings(BackupSettings.fromJson(reader));
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLtrPreBackupRequest;
+ });
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperationList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperationList.java
index cb3f2be1cba27..f4976b432b295 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperationList.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperationList.java
@@ -5,25 +5,27 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrServerBackupOperationInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* A list of long term retention backup operations for server.
*/
@Fluent
-public final class LtrServerBackupOperationList {
+public final class LtrServerBackupOperationList implements JsonSerializable {
/*
* The list of long term retention server backup operations
*/
- @JsonProperty(value = "value")
private List value;
/*
* The link used to get the next page of operations.
*/
- @JsonProperty(value = "nextLink")
private String nextLink;
/**
@@ -82,4 +84,45 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LtrServerBackupOperationList from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LtrServerBackupOperationList if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the LtrServerBackupOperationList.
+ */
+ public static LtrServerBackupOperationList fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LtrServerBackupOperationList deserializedLtrServerBackupOperationList = new LtrServerBackupOperationList();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> LtrServerBackupOperationInner.fromJson(reader1));
+ deserializedLtrServerBackupOperationList.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedLtrServerBackupOperationList.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLtrServerBackupOperationList;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindow.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindow.java
index 2a2dce7321022..7e6bc5c89cf50 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindow.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindow.java
@@ -5,35 +5,35 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Maintenance window properties of a server.
*/
@Fluent
-public final class MaintenanceWindow {
+public final class MaintenanceWindow implements JsonSerializable {
/*
* indicates whether custom window is enabled or disabled
*/
- @JsonProperty(value = "customWindow")
private String customWindow;
/*
* start hour for maintenance window
*/
- @JsonProperty(value = "startHour")
private Integer startHour;
/*
* start minute for maintenance window
*/
- @JsonProperty(value = "startMinute")
private Integer startMinute;
/*
* day of week for maintenance window
*/
- @JsonProperty(value = "dayOfWeek")
private Integer dayOfWeek;
/**
@@ -129,4 +129,49 @@ public MaintenanceWindow withDayOfWeek(Integer dayOfWeek) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("customWindow", this.customWindow);
+ jsonWriter.writeNumberField("startHour", this.startHour);
+ jsonWriter.writeNumberField("startMinute", this.startMinute);
+ jsonWriter.writeNumberField("dayOfWeek", this.dayOfWeek);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MaintenanceWindow from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MaintenanceWindow if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the MaintenanceWindow.
+ */
+ public static MaintenanceWindow fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MaintenanceWindow deserializedMaintenanceWindow = new MaintenanceWindow();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("customWindow".equals(fieldName)) {
+ deserializedMaintenanceWindow.customWindow = reader.getString();
+ } else if ("startHour".equals(fieldName)) {
+ deserializedMaintenanceWindow.startHour = reader.getNullable(JsonReader::getInt);
+ } else if ("startMinute".equals(fieldName)) {
+ deserializedMaintenanceWindow.startMinute = reader.getNullable(JsonReader::getInt);
+ } else if ("dayOfWeek".equals(fieldName)) {
+ deserializedMaintenanceWindow.dayOfWeek = reader.getNullable(JsonReader::getInt);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMaintenanceWindow;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesEnum.java
index 36dc17a233579..ae42c71581ec5 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesEnum.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesEnum.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public MigrateRolesEnum() {
* @param name a name to look for.
* @return the corresponding MigrateRolesEnum.
*/
- @JsonCreator
public static MigrateRolesEnum fromString(String name) {
return fromString(name, MigrateRolesEnum.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDbState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDbState.java
index 9ab36a1d69776..ed842cf5d76a0 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDbState.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDbState.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -57,7 +56,6 @@ public MigrationDbState() {
* @param name a name to look for.
* @return the corresponding MigrationDbState.
*/
- @JsonCreator
public static MigrationDbState fromString(String name) {
return fromString(name, MigrationDbState.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationListFilter.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationListFilter.java
index ca4944867f08a..df3ec90e51a89 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationListFilter.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationListFilter.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public MigrationListFilter() {
* @param name a name to look for.
* @return the corresponding MigrationListFilter.
*/
- @JsonCreator
public static MigrationListFilter fromString(String name) {
return fromString(name, MigrationListFilter.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationMode.java
index cc6d064b63b0a..36d1106492065 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationMode.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationMode.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public MigrationMode() {
* @param name a name to look for.
* @return the corresponding MigrationMode.
*/
- @JsonCreator
public static MigrationMode fromString(String name) {
return fromString(name, MigrationMode.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailabilityReason.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailabilityReason.java
index 2bffde89fc096..ba4a94d3a6c9d 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailabilityReason.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailabilityReason.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public MigrationNameAvailabilityReason() {
* @param name a name to look for.
* @return the corresponding MigrationNameAvailabilityReason.
*/
- @JsonCreator
public static MigrationNameAvailabilityReason fromString(String name) {
return fromString(name, MigrationNameAvailabilityReason.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationOption.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationOption.java
index cc39880e38df4..38200446927cb 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationOption.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationOption.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -42,7 +41,6 @@ public MigrationOption() {
* @param name a name to look for.
* @return the corresponding MigrationOption.
*/
- @JsonCreator
public static MigrationOption fromString(String name) {
return fromString(name, MigrationOption.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResource.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResource.java
index 5171314f3dd44..3f6c745d66748 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResource.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResource.java
@@ -133,8 +133,8 @@ public interface MigrationResource {
String sourceDbServerResourceId();
/**
- * Gets the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name or ip. It is
- * a optional value, if customer provide it, dms will always use it for connection.
+ * Gets the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @return the sourceDbServerFullyQualifiedDomainName value.
*/
@@ -148,8 +148,8 @@ public interface MigrationResource {
String targetDbServerResourceId();
/**
- * Gets the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name or ip. It is
- * a optional value, if customer provide it, dms will always use it for connection.
+ * Gets the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @return the targetDbServerFullyQualifiedDomainName value.
*/
@@ -463,10 +463,12 @@ interface WithSourceDbServerResourceId {
interface WithSourceDbServerFullyQualifiedDomainName {
/**
* Specifies the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name
- * or ip. It is a optional value, if customer provide it, dms will always use it for connection.
+ * (FQDN) or IP address. It is a optional value, if customer provide it, migration service will always use
+ * it for connection.
*
- * @param sourceDbServerFullyQualifiedDomainName Source server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * @param sourceDbServerFullyQualifiedDomainName Source server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for
+ * connection.
* @return the next definition stage.
*/
WithCreate withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName);
@@ -478,10 +480,12 @@ interface WithSourceDbServerFullyQualifiedDomainName {
interface WithTargetDbServerFullyQualifiedDomainName {
/**
* Specifies the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name
- * or ip. It is a optional value, if customer provide it, dms will always use it for connection.
+ * (FQDN) or IP address. It is a optional value, if customer provide it, migration service will always use
+ * it for connection.
*
- * @param targetDbServerFullyQualifiedDomainName Target server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * @param targetDbServerFullyQualifiedDomainName Target server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for
+ * connection.
* @return the next definition stage.
*/
WithCreate withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName);
@@ -726,10 +730,12 @@ interface WithSourceDbServerResourceId {
interface WithSourceDbServerFullyQualifiedDomainName {
/**
* Specifies the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name
- * or ip. It is a optional value, if customer provide it, dms will always use it for connection.
+ * (FQDN) or IP address. It is a optional value, if customer provide it, migration service will always use
+ * it for connection.
*
- * @param sourceDbServerFullyQualifiedDomainName Source server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * @param sourceDbServerFullyQualifiedDomainName Source server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for
+ * connection.
* @return the next definition stage.
*/
Update withSourceDbServerFullyQualifiedDomainName(String sourceDbServerFullyQualifiedDomainName);
@@ -741,10 +747,12 @@ interface WithSourceDbServerFullyQualifiedDomainName {
interface WithTargetDbServerFullyQualifiedDomainName {
/**
* Specifies the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name
- * or ip. It is a optional value, if customer provide it, dms will always use it for connection.
+ * (FQDN) or IP address. It is a optional value, if customer provide it, migration service will always use
+ * it for connection.
*
- * @param targetDbServerFullyQualifiedDomainName Target server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * @param targetDbServerFullyQualifiedDomainName Target server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for
+ * connection.
* @return the next definition stage.
*/
Update withTargetDbServerFullyQualifiedDomainName(String targetDbServerFullyQualifiedDomainName);
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceForPatch.java
index 1aa8f61c1a5ed..b8b0e86a95a7d 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceForPatch.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceForPatch.java
@@ -5,9 +5,12 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourcePropertiesForPatch;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;
@@ -16,18 +19,15 @@
* Represents a migration resource for patch.
*/
@Fluent
-public final class MigrationResourceForPatch {
+public final class MigrationResourceForPatch implements JsonSerializable {
/*
* Migration resource properties.
*/
- @JsonProperty(value = "properties")
private MigrationResourcePropertiesForPatch innerProperties;
/*
* Application-specific metadata in the form of key-value pairs.
*/
- @JsonProperty(value = "tags")
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
/**
@@ -89,8 +89,8 @@ public MigrationResourceForPatch withSourceDbServerResourceId(String sourceDbSer
}
/**
- * Get the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * Get the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @return the sourceDbServerFullyQualifiedDomainName value.
*/
@@ -99,8 +99,8 @@ public String sourceDbServerFullyQualifiedDomainName() {
}
/**
- * Set the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * Set the sourceDbServerFullyQualifiedDomainName property: Source server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @param sourceDbServerFullyQualifiedDomainName the sourceDbServerFullyQualifiedDomainName value to set.
* @return the MigrationResourceForPatch object itself.
@@ -115,8 +115,8 @@ public String sourceDbServerFullyQualifiedDomainName() {
}
/**
- * Get the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * Get the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @return the targetDbServerFullyQualifiedDomainName value.
*/
@@ -125,8 +125,8 @@ public String targetDbServerFullyQualifiedDomainName() {
}
/**
- * Set the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name or ip. It is a
- * optional value, if customer provide it, dms will always use it for connection.
+ * Set the targetDbServerFullyQualifiedDomainName property: Target server fully qualified domain name (FQDN) or IP
+ * address. It is a optional value, if customer provide it, migration service will always use it for connection.
*
* @param targetDbServerFullyQualifiedDomainName the targetDbServerFullyQualifiedDomainName value to set.
* @return the MigrationResourceForPatch object itself.
@@ -439,4 +439,45 @@ public void validate() {
innerProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MigrationResourceForPatch from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MigrationResourceForPatch if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the MigrationResourceForPatch.
+ */
+ public static MigrationResourceForPatch fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MigrationResourceForPatch deserializedMigrationResourceForPatch = new MigrationResourceForPatch();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("properties".equals(fieldName)) {
+ deserializedMigrationResourceForPatch.innerProperties
+ = MigrationResourcePropertiesForPatch.fromJson(reader);
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedMigrationResourceForPatch.tags = tags;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMigrationResourceForPatch;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceListResult.java
index 00b91107eba83..bc9e2a934a56e 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceListResult.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceListResult.java
@@ -5,25 +5,27 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationResourceInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* A list of migration resources.
*/
@Immutable
-public final class MigrationResourceListResult {
+public final class MigrationResourceListResult implements JsonSerializable {
/*
* A list of migration resources.
*/
- @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
private List value;
/*
* The link used to get the next page of migrations.
*/
- @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
private String nextLink;
/**
@@ -60,4 +62,43 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MigrationResourceListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MigrationResourceListResult if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the MigrationResourceListResult.
+ */
+ public static MigrationResourceListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MigrationResourceListResult deserializedMigrationResourceListResult = new MigrationResourceListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> MigrationResourceInner.fromJson(reader1));
+ deserializedMigrationResourceListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedMigrationResourceListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMigrationResourceListResult;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParameters.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParameters.java
index 5ec643ed2abf0..853d1b6d87a4d 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParameters.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParameters.java
@@ -6,29 +6,30 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Migration secret parameters.
*/
@Fluent
-public final class MigrationSecretParameters {
+public final class MigrationSecretParameters implements JsonSerializable {
/*
* Admin credentials for source and target servers
*/
- @JsonProperty(value = "adminCredentials")
private AdminCredentials adminCredentials;
/*
* Gets or sets the username for the source server. This user need not be an admin.
*/
- @JsonProperty(value = "sourceServerUsername")
private String sourceServerUsername;
/*
* Gets or sets the username for the target server. This user need not be an admin.
*/
- @JsonProperty(value = "targetServerUsername")
private String targetServerUsername;
/**
@@ -117,4 +118,47 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(MigrationSecretParameters.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("adminCredentials", this.adminCredentials);
+ jsonWriter.writeStringField("sourceServerUsername", this.sourceServerUsername);
+ jsonWriter.writeStringField("targetServerUsername", this.targetServerUsername);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MigrationSecretParameters from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MigrationSecretParameters if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the MigrationSecretParameters.
+ */
+ public static MigrationSecretParameters fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MigrationSecretParameters deserializedMigrationSecretParameters = new MigrationSecretParameters();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("adminCredentials".equals(fieldName)) {
+ deserializedMigrationSecretParameters.adminCredentials = AdminCredentials.fromJson(reader);
+ } else if ("sourceServerUsername".equals(fieldName)) {
+ deserializedMigrationSecretParameters.sourceServerUsername = reader.getString();
+ } else if ("targetServerUsername".equals(fieldName)) {
+ deserializedMigrationSecretParameters.targetServerUsername = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMigrationSecretParameters;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationState.java
index eb2aa610dc02c..096b4722de9ac 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationState.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationState.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -62,7 +61,6 @@ public MigrationState() {
* @param name a name to look for.
* @return the corresponding MigrationState.
*/
- @JsonCreator
public static MigrationState fromString(String name) {
return fromString(name, MigrationState.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationStatus.java
index 09912e72477a0..8843c803a219a 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationStatus.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationStatus.java
@@ -5,29 +5,30 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Migration status.
*/
@Immutable
-public final class MigrationStatus {
+public final class MigrationStatus implements JsonSerializable {
/*
* State of migration
*/
- @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
private MigrationState state;
/*
* Error message, if any, for the migration state
*/
- @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY)
private String error;
/*
* Current Migration sub state details.
*/
- @JsonProperty(value = "currentSubStateDetails", access = JsonProperty.Access.WRITE_ONLY)
private MigrationSubStateDetails currentSubStateDetails;
/**
@@ -73,4 +74,43 @@ public void validate() {
currentSubStateDetails().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MigrationStatus from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MigrationStatus if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the MigrationStatus.
+ */
+ public static MigrationStatus fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MigrationStatus deserializedMigrationStatus = new MigrationStatus();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("state".equals(fieldName)) {
+ deserializedMigrationStatus.state = MigrationState.fromString(reader.getString());
+ } else if ("error".equals(fieldName)) {
+ deserializedMigrationStatus.error = reader.getString();
+ } else if ("currentSubStateDetails".equals(fieldName)) {
+ deserializedMigrationStatus.currentSubStateDetails = MigrationSubStateDetails.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMigrationStatus;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubState.java
index c7144b52af36d..71838f0431b8a 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubState.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubState.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -93,7 +92,6 @@ public MigrationSubState() {
* @param name a name to look for.
* @return the corresponding MigrationSubState.
*/
- @JsonCreator
public static MigrationSubState fromString(String name) {
return fromString(name, MigrationSubState.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubStateDetails.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubStateDetails.java
index a4322dc8c7606..2fcb3f0d63f46 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubStateDetails.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubStateDetails.java
@@ -5,32 +5,31 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.Map;
/**
* Migration sub state details.
*/
@Fluent
-public final class MigrationSubStateDetails {
+public final class MigrationSubStateDetails implements JsonSerializable {
/*
* Migration sub state.
*/
- @JsonProperty(value = "currentSubState", access = JsonProperty.Access.WRITE_ONLY)
private MigrationSubState currentSubState;
/*
* Dictionary of
*/
- @JsonProperty(value = "dbDetails")
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map dbDetails;
/*
* Details for the validation for migration
*/
- @JsonProperty(value = "validationDetails")
private ValidationDetails validationDetails;
/**
@@ -105,4 +104,48 @@ public void validate() {
validationDetails().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeMapField("dbDetails", this.dbDetails, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeJsonField("validationDetails", this.validationDetails);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MigrationSubStateDetails from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MigrationSubStateDetails if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the MigrationSubStateDetails.
+ */
+ public static MigrationSubStateDetails fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MigrationSubStateDetails deserializedMigrationSubStateDetails = new MigrationSubStateDetails();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("currentSubState".equals(fieldName)) {
+ deserializedMigrationSubStateDetails.currentSubState
+ = MigrationSubState.fromString(reader.getString());
+ } else if ("dbDetails".equals(fieldName)) {
+ Map dbDetails
+ = reader.readMap(reader1 -> DbMigrationStatus.fromJson(reader1));
+ deserializedMigrationSubStateDetails.dbDetails = dbDetails;
+ } else if ("validationDetails".equals(fieldName)) {
+ deserializedMigrationSubStateDetails.validationDetails = ValidationDetails.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMigrationSubStateDetails;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameProperty.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameProperty.java
deleted file mode 100644
index b712e3554f446..0000000000000
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameProperty.java
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.postgresqlflexibleserver.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Name property for quota usage.
- */
-@Fluent
-public final class NameProperty {
- /*
- * Name value
- */
- @JsonProperty(value = "value")
- private String value;
-
- /*
- * Localized name
- */
- @JsonProperty(value = "localizedValue")
- private String localizedValue;
-
- /**
- * Creates an instance of NameProperty class.
- */
- public NameProperty() {
- }
-
- /**
- * Get the value property: Name value.
- *
- * @return the value value.
- */
- public String value() {
- return this.value;
- }
-
- /**
- * Set the value property: Name value.
- *
- * @param value the value value to set.
- * @return the NameProperty object itself.
- */
- public NameProperty withValue(String value) {
- this.value = value;
- return this;
- }
-
- /**
- * Get the localizedValue property: Localized name.
- *
- * @return the localizedValue value.
- */
- public String localizedValue() {
- return this.localizedValue;
- }
-
- /**
- * Set the localizedValue property: Localized name.
- *
- * @param localizedValue the localizedValue value to set.
- * @return the NameProperty object itself.
- */
- public NameProperty withLocalizedValue(String localizedValue) {
- this.localizedValue = localizedValue;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Network.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Network.java
index a54927349dec0..cc9b4a861b563 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Network.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Network.java
@@ -5,29 +5,34 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Network properties of a server.
*/
@Fluent
-public final class Network {
+public final class Network implements JsonSerializable {
/*
* public network access is enabled or not
*/
- @JsonProperty(value = "publicNetworkAccess")
private ServerPublicNetworkAccessState publicNetworkAccess;
/*
- * 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.
+ * 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. 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.
+ * 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;
/**
@@ -111,4 +116,48 @@ public Network withPrivateDnsZoneArmResourceId(String privateDnsZoneArmResourceI
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("publicNetworkAccess",
+ this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString());
+ jsonWriter.writeStringField("delegatedSubnetResourceId", this.delegatedSubnetResourceId);
+ jsonWriter.writeStringField("privateDnsZoneArmResourceId", this.privateDnsZoneArmResourceId);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of Network from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of Network if the JsonReader was pointing to an instance of it, or null if it was pointing to
+ * JSON null.
+ * @throws IOException If an error occurs while reading the Network.
+ */
+ public static Network fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ Network deserializedNetwork = new Network();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("publicNetworkAccess".equals(fieldName)) {
+ deserializedNetwork.publicNetworkAccess
+ = ServerPublicNetworkAccessState.fromString(reader.getString());
+ } else if ("delegatedSubnetResourceId".equals(fieldName)) {
+ deserializedNetwork.delegatedSubnetResourceId = reader.getString();
+ } else if ("privateDnsZoneArmResourceId".equals(fieldName)) {
+ deserializedNetwork.privateDnsZoneArmResourceId = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedNetwork;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineResizeSupportedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineResizeSupportedEnum.java
index 10a8d9ca5f99e..2a754a896d969 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineResizeSupportedEnum.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineResizeSupportedEnum.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -38,7 +37,6 @@ public OnlineResizeSupportedEnum() {
* @param name a name to look for.
* @return the corresponding OnlineResizeSupportedEnum.
*/
- @JsonCreator
public static OnlineResizeSupportedEnum fromString(String name) {
return fromString(name, OnlineResizeSupportedEnum.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operation.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operation.java
index a68e8feb54222..bc78e30472af8 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operation.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operation.java
@@ -5,44 +5,41 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.Map;
/**
* REST API operation definition.
*/
@Fluent
-public final class Operation {
+public final class Operation implements JsonSerializable {
/*
* The name of the operation being performed on this particular object.
*/
- @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
/*
* The localized display information for this particular operation or action.
*/
- @JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY)
private OperationDisplay display;
/*
* Indicates whether the operation is a data action
*/
- @JsonProperty(value = "isDataAction")
private Boolean isDataAction;
/*
* The intended executor of the operation.
*/
- @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
private OperationOrigin origin;
/*
* Additional descriptions for the operation.
*/
- @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map properties;
/**
@@ -117,4 +114,49 @@ public void validate() {
display().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("isDataAction", this.isDataAction);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of Operation from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of Operation if the JsonReader was pointing to an instance of it, or null if it was pointing
+ * to JSON null.
+ * @throws IOException If an error occurs while reading the Operation.
+ */
+ public static Operation fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ Operation deserializedOperation = new Operation();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedOperation.name = reader.getString();
+ } else if ("display".equals(fieldName)) {
+ deserializedOperation.display = OperationDisplay.fromJson(reader);
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperation.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperation.origin = OperationOrigin.fromString(reader.getString());
+ } else if ("properties".equals(fieldName)) {
+ Map properties = reader.readMap(reader1 -> reader1.readUntyped());
+ deserializedOperation.properties = properties;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperation;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationDisplay.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationDisplay.java
index cd19e31ac31a1..5b22250f12e8a 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationDisplay.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationDisplay.java
@@ -5,35 +5,35 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Display metadata associated with the operation.
*/
@Immutable
-public final class OperationDisplay {
+public final class OperationDisplay implements JsonSerializable {
/*
* Operation resource provider name.
*/
- @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY)
private String provider;
/*
* Resource on which the operation is performed.
*/
- @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY)
private String resource;
/*
* Localized friendly name for the operation.
*/
- @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY)
private String operation;
/*
* Operation description.
*/
- @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
private String description;
/**
@@ -85,4 +85,45 @@ public String description() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationDisplay from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationDisplay.
+ */
+ public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationDisplay deserializedOperationDisplay = new OperationDisplay();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("provider".equals(fieldName)) {
+ deserializedOperationDisplay.provider = reader.getString();
+ } else if ("resource".equals(fieldName)) {
+ deserializedOperationDisplay.resource = reader.getString();
+ } else if ("operation".equals(fieldName)) {
+ deserializedOperationDisplay.operation = reader.getString();
+ } else if ("description".equals(fieldName)) {
+ deserializedOperationDisplay.description = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationDisplay;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationOrigin.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationOrigin.java
index 8e943016cb268..3b04d1469f676 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationOrigin.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationOrigin.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -42,7 +41,6 @@ public OperationOrigin() {
* @param name a name to look for.
* @return the corresponding OperationOrigin.
*/
- @JsonCreator
public static OperationOrigin fromString(String name) {
return fromString(name, OperationOrigin.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Origin.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Origin.java
index 9be88659f90de..e7d922b5db807 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Origin.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Origin.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -17,6 +16,11 @@ public final class Origin extends ExpandableStringEnum {
*/
public static final Origin FULL = fromString("Full");
+ /**
+ * Static value Customer On-Demand for Origin.
+ */
+ public static final Origin CUSTOMER_ON_DEMAND = fromString("Customer On-Demand");
+
/**
* Creates a new instance of Origin value.
*
@@ -32,7 +36,6 @@ public Origin() {
* @param name a name to look for.
* @return the corresponding Origin.
*/
- @JsonCreator
public static Origin fromString(String name) {
return fromString(name, Origin.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDbsInTargetEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDbsInTargetEnum.java
index 59336eebbe55d..98675472ec450 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDbsInTargetEnum.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDbsInTargetEnum.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -38,7 +37,6 @@ public OverwriteDbsInTargetEnum() {
* @param name a name to look for.
* @return the corresponding OverwriteDbsInTargetEnum.
*/
- @JsonCreator
public static OverwriteDbsInTargetEnum fromString(String name) {
return fromString(name, OverwriteDbsInTargetEnum.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordAuthEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordAuthEnum.java
index c1af34cb25642..51301b7a1c717 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordAuthEnum.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordAuthEnum.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public PasswordAuthEnum() {
* @param name a name to look for.
* @return the corresponding PasswordAuthEnum.
*/
- @JsonCreator
public static PasswordAuthEnum fromString(String name) {
return fromString(name, PasswordAuthEnum.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrincipalType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrincipalType.java
index 7cc55e501a1c9..3303e6a29c14f 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrincipalType.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrincipalType.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -47,7 +46,6 @@ public PrincipalType() {
* @param name a name to look for.
* @return the corresponding PrincipalType.
*/
- @JsonCreator
public static PrincipalType fromString(String name) {
return fromString(name, PrincipalType.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpoint.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpoint.java
index 886e4583b8f31..b9e02f2cb6123 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpoint.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpoint.java
@@ -5,17 +5,20 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* The private endpoint resource.
*/
@Immutable
-public final class PrivateEndpoint {
+public final class PrivateEndpoint implements JsonSerializable {
/*
* The ARM identifier for private endpoint.
*/
- @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
private String id;
/**
@@ -40,4 +43,39 @@ public String id() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateEndpoint from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateEndpoint if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the PrivateEndpoint.
+ */
+ public static PrivateEndpoint fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateEndpoint deserializedPrivateEndpoint = new PrivateEndpoint();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedPrivateEndpoint.id = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateEndpoint;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionListResult.java
index a2cc96cafd387..14523227de143 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionListResult.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionListResult.java
@@ -5,25 +5,28 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* A list of private endpoint connections.
*/
@Immutable
-public final class PrivateEndpointConnectionListResult {
+public final class PrivateEndpointConnectionListResult
+ implements JsonSerializable {
/*
* Array of results.
*/
- @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
private List value;
/*
* The URL to get the next set of results.
*/
- @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
private String nextLink;
/**
@@ -60,4 +63,44 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateEndpointConnectionListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateEndpointConnectionListResult if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the PrivateEndpointConnectionListResult.
+ */
+ public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateEndpointConnectionListResult deserializedPrivateEndpointConnectionListResult
+ = new PrivateEndpointConnectionListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1));
+ deserializedPrivateEndpointConnectionListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateEndpointConnectionListResult;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionProvisioningState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionProvisioningState.java
index 63881479d3fe7..104ef98f5347b 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionProvisioningState.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionProvisioningState.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -48,7 +47,6 @@ public PrivateEndpointConnectionProvisioningState() {
* @param name a name to look for.
* @return the corresponding PrivateEndpointConnectionProvisioningState.
*/
- @JsonCreator
public static PrivateEndpointConnectionProvisioningState fromString(String name) {
return fromString(name, PrivateEndpointConnectionProvisioningState.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointServiceConnectionStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointServiceConnectionStatus.java
index d99d72f3ce41e..19f7edb576b0c 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointServiceConnectionStatus.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointServiceConnectionStatus.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -43,7 +42,6 @@ public PrivateEndpointServiceConnectionStatus() {
* @param name a name to look for.
* @return the corresponding PrivateEndpointServiceConnectionStatus.
*/
- @JsonCreator
public static PrivateEndpointServiceConnectionStatus fromString(String name) {
return fromString(name, PrivateEndpointServiceConnectionStatus.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceListResult.java
index f1e2a4ce3ff3f..5dc1a8b2446f4 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceListResult.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceListResult.java
@@ -5,25 +5,27 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateLinkResourceInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* A list of private link resources.
*/
@Immutable
-public final class PrivateLinkResourceListResult {
+public final class PrivateLinkResourceListResult implements JsonSerializable {
/*
* Array of results.
*/
- @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
private List value;
/*
* Link to retrieve next page of results.
*/
- @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
private String nextLink;
/**
@@ -60,4 +62,44 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateLinkResourceListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateLinkResourceListResult if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the PrivateLinkResourceListResult.
+ */
+ public static PrivateLinkResourceListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateLinkResourceListResult deserializedPrivateLinkResourceListResult
+ = new PrivateLinkResourceListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> PrivateLinkResourceInner.fromJson(reader1));
+ deserializedPrivateLinkResourceListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedPrivateLinkResourceListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateLinkResourceListResult;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkServiceConnectionState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkServiceConnectionState.java
index a93cb64b35441..63efa0ff6394b 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkServiceConnectionState.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkServiceConnectionState.java
@@ -5,29 +5,30 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* A collection of information about the state of the connection between service consumer and provider.
*/
@Fluent
-public final class PrivateLinkServiceConnectionState {
+public final class PrivateLinkServiceConnectionState implements JsonSerializable {
/*
* Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
*/
- @JsonProperty(value = "status")
private PrivateEndpointServiceConnectionStatus status;
/*
* The reason for approval/rejection of the connection.
*/
- @JsonProperty(value = "description")
private String description;
/*
* A message indicating if changes on the service provider require any updates on the consumer.
*/
- @JsonProperty(value = "actionsRequired")
private String actionsRequired;
/**
@@ -107,4 +108,48 @@ public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequi
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString());
+ jsonWriter.writeStringField("description", this.description);
+ jsonWriter.writeStringField("actionsRequired", this.actionsRequired);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateLinkServiceConnectionState from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateLinkServiceConnectionState if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the PrivateLinkServiceConnectionState.
+ */
+ public static PrivateLinkServiceConnectionState fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateLinkServiceConnectionState deserializedPrivateLinkServiceConnectionState
+ = new PrivateLinkServiceConnectionState();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("status".equals(fieldName)) {
+ deserializedPrivateLinkServiceConnectionState.status
+ = PrivateEndpointServiceConnectionStatus.fromString(reader.getString());
+ } else if ("description".equals(fieldName)) {
+ deserializedPrivateLinkServiceConnectionState.description = reader.getString();
+ } else if ("actionsRequired".equals(fieldName)) {
+ deserializedPrivateLinkServiceConnectionState.actionsRequired = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateLinkServiceConnectionState;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsage.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsage.java
deleted file mode 100644
index 42fc8e3aba599..0000000000000
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsage.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.postgresqlflexibleserver.models;
-
-import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.QuotaUsageInner;
-
-/**
- * An immutable client-side representation of QuotaUsage.
- */
-public interface QuotaUsage {
- /**
- * Gets the name property: Name of quota usage for flexible servers.
- *
- * @return the name value.
- */
- NameProperty name();
-
- /**
- * Gets the limit property: Quota limit.
- *
- * @return the limit value.
- */
- Long limit();
-
- /**
- * Gets the unit property: Quota unit.
- *
- * @return the unit value.
- */
- String unit();
-
- /**
- * Gets the currentValue property: Current Quota usage value.
- *
- * @return the currentValue value.
- */
- Long currentValue();
-
- /**
- * Gets the id property: Fully qualified ARM resource Id.
- *
- * @return the id value.
- */
- String id();
-
- /**
- * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.QuotaUsageInner object.
- *
- * @return the inner object.
- */
- QuotaUsageInner innerModel();
-}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsages.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsages.java
deleted file mode 100644
index b2243c0d47237..0000000000000
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsages.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.postgresqlflexibleserver.models;
-
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.util.Context;
-
-/**
- * Resource collection API of QuotaUsages.
- */
-public interface QuotaUsages {
- /**
- * Get quota usages at specified location in a given subscription.
- *
- * @param locationName The name of the location.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return quota usages at specified location in a given subscription as paginated response with
- * {@link PagedIterable}.
- */
- PagedIterable list(String locationName);
-
- /**
- * Get quota usages at specified location in a given subscription.
- *
- * @param locationName The name of the location.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return quota usages at specified location in a given subscription as paginated response with
- * {@link PagedIterable}.
- */
- PagedIterable list(String locationName, Context context);
-}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsagesListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsagesListResult.java
deleted file mode 100644
index fab5f9ca714b0..0000000000000
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsagesListResult.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.postgresqlflexibleserver.models;
-
-import com.azure.core.annotation.Immutable;
-import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.QuotaUsageInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/**
- * Capability for the PostgreSQL server.
- */
-@Immutable
-public final class QuotaUsagesListResult {
- /*
- * A list of quota usages.
- */
- @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
- private List value;
-
- /*
- * Link to retrieve next page of results.
- */
- @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
- private String nextLink;
-
- /**
- * Creates an instance of QuotaUsagesListResult class.
- */
- public QuotaUsagesListResult() {
- }
-
- /**
- * Get the value property: A list of quota usages.
- *
- * @return the value value.
- */
- public List value() {
- return this.value;
- }
-
- /**
- * Get the nextLink property: Link to retrieve next page of results.
- *
- * @return the nextLink value.
- */
- public String nextLink() {
- return this.nextLink;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (value() != null) {
- value().forEach(e -> e.validate());
- }
- }
-}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteMode.java
index ebbbd6a7298b7..dab7f7eff01b8 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteMode.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteMode.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public ReadReplicaPromoteMode() {
* @param name a name to look for.
* @return the corresponding ReadReplicaPromoteMode.
*/
- @JsonCreator
public static ReadReplicaPromoteMode fromString(String name) {
return fromString(name, ReadReplicaPromoteMode.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replica.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replica.java
index fc90ec3d46b5b..d0805d9180c53 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replica.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replica.java
@@ -5,41 +5,41 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Replica properties of a server.
*/
@Fluent
-public final class Replica {
+public final class Replica implements JsonSerializable {
/*
* Used to indicate role of the server in replication set.
*/
- @JsonProperty(value = "role")
private ReplicationRole role;
/*
* Replicas allowed for a server.
*/
- @JsonProperty(value = "capacity", access = JsonProperty.Access.WRITE_ONLY)
private Integer capacity;
/*
- * Gets the replication state of a replica server. This property is returned only for replicas api call. Supported values are Active, Catchup, Provisioning, Updating, Broken, Reconfiguring
+ * Gets the replication state of a replica server. This property is returned only for replicas api call. Supported
+ * values are Active, Catchup, Provisioning, Updating, Broken, Reconfiguring
*/
- @JsonProperty(value = "replicationState", access = JsonProperty.Access.WRITE_ONLY)
private ReplicationState replicationState;
/*
* Sets the promote mode for a replica server. This is a write only property.
*/
- @JsonProperty(value = "promoteMode")
private ReadReplicaPromoteMode promoteMode;
/*
* Sets the promote options for a replica server. This is a write only property.
*/
- @JsonProperty(value = "promoteOption")
private ReplicationPromoteOption promoteOption;
/**
@@ -134,4 +134,50 @@ public Replica withPromoteOption(ReplicationPromoteOption promoteOption) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("role", this.role == null ? null : this.role.toString());
+ jsonWriter.writeStringField("promoteMode", this.promoteMode == null ? null : this.promoteMode.toString());
+ jsonWriter.writeStringField("promoteOption", this.promoteOption == null ? null : this.promoteOption.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of Replica from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of Replica if the JsonReader was pointing to an instance of it, or null if it was pointing to
+ * JSON null.
+ * @throws IOException If an error occurs while reading the Replica.
+ */
+ public static Replica fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ Replica deserializedReplica = new Replica();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("role".equals(fieldName)) {
+ deserializedReplica.role = ReplicationRole.fromString(reader.getString());
+ } else if ("capacity".equals(fieldName)) {
+ deserializedReplica.capacity = reader.getNullable(JsonReader::getInt);
+ } else if ("replicationState".equals(fieldName)) {
+ deserializedReplica.replicationState = ReplicationState.fromString(reader.getString());
+ } else if ("promoteMode".equals(fieldName)) {
+ deserializedReplica.promoteMode = ReadReplicaPromoteMode.fromString(reader.getString());
+ } else if ("promoteOption".equals(fieldName)) {
+ deserializedReplica.promoteOption = ReplicationPromoteOption.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedReplica;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationPromoteOption.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationPromoteOption.java
index 0b2463d7a0f39..a8937dbd5ed93 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationPromoteOption.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationPromoteOption.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public ReplicationPromoteOption() {
* @param name a name to look for.
* @return the corresponding ReplicationPromoteOption.
*/
- @JsonCreator
public static ReplicationPromoteOption fromString(String name) {
return fromString(name, ReplicationPromoteOption.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationRole.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationRole.java
index 5a2c6f6c3e102..ae7f74ce47178 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationRole.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationRole.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -47,7 +46,6 @@ public ReplicationRole() {
* @param name a name to look for.
* @return the corresponding ReplicationRole.
*/
- @JsonCreator
public static ReplicationRole fromString(String name) {
return fromString(name, ReplicationRole.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationState.java
index f142df0481d35..1b71b1d08b40e 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationState.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationState.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -58,7 +57,6 @@ public ReplicationState() {
* @param name a name to look for.
* @return the corresponding ReplicationState.
*/
- @JsonCreator
public static ReplicationState fromString(String name) {
return fromString(name, ReplicationState.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestartParameter.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestartParameter.java
index d4bb1051787ab..9a459e14d9217 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestartParameter.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestartParameter.java
@@ -5,23 +5,25 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Represents server restart parameters.
*/
@Fluent
-public final class RestartParameter {
+public final class RestartParameter implements JsonSerializable {
/*
* Indicates whether to restart the server with failover.
*/
- @JsonProperty(value = "restartWithFailover")
private Boolean restartWithFailover;
/*
* Failover mode.
*/
- @JsonProperty(value = "failoverMode")
private FailoverMode failoverMode;
/**
@@ -77,4 +79,43 @@ public RestartParameter withFailoverMode(FailoverMode failoverMode) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("restartWithFailover", this.restartWithFailover);
+ jsonWriter.writeStringField("failoverMode", this.failoverMode == null ? null : this.failoverMode.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of RestartParameter from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of RestartParameter if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the RestartParameter.
+ */
+ public static RestartParameter fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ RestartParameter deserializedRestartParameter = new RestartParameter();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("restartWithFailover".equals(fieldName)) {
+ deserializedRestartParameter.restartWithFailover = reader.getNullable(JsonReader::getBoolean);
+ } else if ("failoverMode".equals(fieldName)) {
+ deserializedRestartParameter.failoverMode = FailoverMode.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedRestartParameter;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestrictedEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestrictedEnum.java
index 39eb8903137b8..7e9d344449f3e 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestrictedEnum.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestrictedEnum.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -38,7 +37,6 @@ public RestrictedEnum() {
* @param name a name to look for.
* @return the corresponding RestrictedEnum.
*/
- @JsonCreator
public static RestrictedEnum fromString(String name) {
return fromString(name, RestrictedEnum.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Server.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Server.java
index c88d5edd2b9fe..651c795fa2b88 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Server.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Server.java
@@ -577,10 +577,11 @@ interface WithCreateMode {
* The template for Server update.
*/
interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, UpdateStages.WithIdentity,
- UpdateStages.WithAdministratorLoginPassword, UpdateStages.WithVersion, UpdateStages.WithStorage,
- UpdateStages.WithBackup, UpdateStages.WithHighAvailability, UpdateStages.WithMaintenanceWindow,
- UpdateStages.WithAuthConfig, UpdateStages.WithDataEncryption, UpdateStages.WithCreateMode,
- UpdateStages.WithReplicationRole, UpdateStages.WithReplica, UpdateStages.WithNetwork {
+ UpdateStages.WithAdministratorLogin, UpdateStages.WithAdministratorLoginPassword, UpdateStages.WithVersion,
+ UpdateStages.WithStorage, UpdateStages.WithBackup, UpdateStages.WithHighAvailability,
+ UpdateStages.WithMaintenanceWindow, UpdateStages.WithAuthConfig, UpdateStages.WithDataEncryption,
+ UpdateStages.WithCreateMode, UpdateStages.WithReplicationRole, UpdateStages.WithReplica,
+ UpdateStages.WithNetwork {
/**
* Executes the update request.
*
@@ -640,6 +641,22 @@ interface WithIdentity {
Update withIdentity(UserAssignedIdentity identity);
}
+ /**
+ * The stage of the Server update allowing to specify administratorLogin.
+ */
+ interface WithAdministratorLogin {
+ /**
+ * Specifies the administratorLogin property: The administrator's login name of a server. Can only be
+ * specified when the server is trying to switch to password authentication and does not have default
+ * administrator login..
+ *
+ * @param administratorLogin The administrator's login name of a server. Can only be specified when the
+ * server is trying to switch to password authentication and does not have default administrator login.
+ * @return the next definition stage.
+ */
+ Update withAdministratorLogin(String administratorLogin);
+ }
+
/**
* The stage of the Server update allowing to specify administratorLoginPassword.
*/
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerBackupListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerBackupListResult.java
index ffbbc9ef146c5..858cae5301901 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerBackupListResult.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerBackupListResult.java
@@ -5,25 +5,27 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerBackupInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* A list of server backups.
*/
@Fluent
-public final class ServerBackupListResult {
+public final class ServerBackupListResult implements JsonSerializable {
/*
* The list of backups of a server.
*/
- @JsonProperty(value = "value")
private List value;
/*
* The link used to get the next page of operations.
*/
- @JsonProperty(value = "nextLink")
private String nextLink;
/**
@@ -82,4 +84,44 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ServerBackupListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ServerBackupListResult if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ServerBackupListResult.
+ */
+ public static ServerBackupListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ServerBackupListResult deserializedServerBackupListResult = new ServerBackupListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> ServerBackupInner.fromJson(reader1));
+ deserializedServerBackupListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedServerBackupListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedServerBackupListResult;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForUpdate.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForUpdate.java
index 7f4d4ff2d04ca..a754d623d7b60 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForUpdate.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForUpdate.java
@@ -5,39 +5,37 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerPropertiesForUpdate;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.Map;
/**
* Represents a server to be updated.
*/
@Fluent
-public final class ServerForUpdate {
+public final class ServerForUpdate implements JsonSerializable {
/*
* The SKU (pricing tier) of the server.
*/
- @JsonProperty(value = "sku")
private Sku sku;
/*
* Describes the identity of the application.
*/
- @JsonProperty(value = "identity")
private UserAssignedIdentity identity;
/*
* Properties of the server.
*/
- @JsonProperty(value = "properties")
private ServerPropertiesForUpdate innerProperties;
/*
* Application-specific metadata in the form of key-value pairs.
*/
- @JsonProperty(value = "tags")
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
/**
@@ -115,6 +113,31 @@ public ServerForUpdate withTags(Map tags) {
return this;
}
+ /**
+ * Get the administratorLogin property: The administrator's login name of a server. Can only be specified when the
+ * server is trying to switch to password authentication and does not have default administrator login.
+ *
+ * @return the administratorLogin value.
+ */
+ public String administratorLogin() {
+ return this.innerProperties() == null ? null : this.innerProperties().administratorLogin();
+ }
+
+ /**
+ * Set the administratorLogin property: The administrator's login name of a server. Can only be specified when the
+ * server is trying to switch to password authentication and does not have default administrator login.
+ *
+ * @param administratorLogin the administratorLogin value to set.
+ * @return the ServerForUpdate object itself.
+ */
+ public ServerForUpdate withAdministratorLogin(String administratorLogin) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerPropertiesForUpdate();
+ }
+ this.innerProperties().withAdministratorLogin(administratorLogin);
+ return this;
+ }
+
/**
* Get the administratorLoginPassword property: The password of the administrator login.
*
@@ -411,4 +434,50 @@ public void validate() {
innerProperties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("sku", this.sku);
+ jsonWriter.writeJsonField("identity", this.identity);
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ServerForUpdate from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ServerForUpdate if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ServerForUpdate.
+ */
+ public static ServerForUpdate fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ServerForUpdate deserializedServerForUpdate = new ServerForUpdate();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("sku".equals(fieldName)) {
+ deserializedServerForUpdate.sku = Sku.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedServerForUpdate.identity = UserAssignedIdentity.fromJson(reader);
+ } else if ("properties".equals(fieldName)) {
+ deserializedServerForUpdate.innerProperties = ServerPropertiesForUpdate.fromJson(reader);
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedServerForUpdate.tags = tags;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedServerForUpdate;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerHAState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerHAState.java
index 3e74fb1ecf7c8..a483089e1881c 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerHAState.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerHAState.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -57,7 +56,6 @@ public ServerHAState() {
* @param name a name to look for.
* @return the corresponding ServerHAState.
*/
- @JsonCreator
public static ServerHAState fromString(String name) {
return fromString(name, ServerHAState.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerListResult.java
index d108ae63a04f8..18be8a706d162 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerListResult.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerListResult.java
@@ -5,25 +5,27 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* A list of servers.
*/
@Fluent
-public final class ServerListResult {
+public final class ServerListResult implements JsonSerializable {
/*
* The list of flexible servers
*/
- @JsonProperty(value = "value")
private List value;
/*
* The link used to get the next page of operations.
*/
- @JsonProperty(value = "nextLink")
private String nextLink;
/**
@@ -82,4 +84,44 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ServerListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ServerListResult if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ServerListResult.
+ */
+ public static ServerListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ServerListResult deserializedServerListResult = new ServerListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> ServerInner.fromJson(reader1));
+ deserializedServerListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedServerListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedServerListResult;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerPublicNetworkAccessState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerPublicNetworkAccessState.java
index 8893967d02532..095df310bd127 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerPublicNetworkAccessState.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerPublicNetworkAccessState.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public ServerPublicNetworkAccessState() {
* @param name a name to look for.
* @return the corresponding ServerPublicNetworkAccessState.
*/
- @JsonCreator
public static ServerPublicNetworkAccessState fromString(String name) {
return fromString(name, ServerPublicNetworkAccessState.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSku.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSku.java
index 022c604a2b40a..63f99216aa9ed 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSku.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSku.java
@@ -5,23 +5,25 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Sku information related properties of a server.
*/
@Fluent
-public final class ServerSku {
+public final class ServerSku implements JsonSerializable {
/*
* The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3.
*/
- @JsonProperty(value = "name")
private String name;
/*
* The tier of the particular SKU, e.g. Burstable.
*/
- @JsonProperty(value = "tier")
private SkuTier tier;
/**
@@ -77,4 +79,43 @@ public ServerSku withTier(SkuTier tier) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("name", this.name);
+ jsonWriter.writeStringField("tier", this.tier == null ? null : this.tier.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ServerSku from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ServerSku if the JsonReader was pointing to an instance of it, or null if it was pointing
+ * to JSON null.
+ * @throws IOException If an error occurs while reading the ServerSku.
+ */
+ public static ServerSku fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ServerSku deserializedServerSku = new ServerSku();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedServerSku.name = reader.getString();
+ } else if ("tier".equals(fieldName)) {
+ deserializedServerSku.tier = SkuTier.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedServerSku;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSkuCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSkuCapability.java
index cee4fe085b4f4..c9523b6952d2a 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSkuCapability.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSkuCapability.java
@@ -5,7 +5,10 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.List;
/**
@@ -16,39 +19,43 @@ public final class ServerSkuCapability extends CapabilityBase {
/*
* Sku name
*/
- @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
/*
* Supported vCores
*/
- @JsonProperty(value = "vCores", access = JsonProperty.Access.WRITE_ONLY)
private Integer vCores;
/*
* Supported IOPS
*/
- @JsonProperty(value = "supportedIops", access = JsonProperty.Access.WRITE_ONLY)
private Integer supportedIops;
/*
* Supported memory per vCore in MB
*/
- @JsonProperty(value = "supportedMemoryPerVcoreMb", access = JsonProperty.Access.WRITE_ONLY)
private Long supportedMemoryPerVcoreMb;
/*
* List of supported Availability Zones. E.g. "1", "2", "3"
*/
- @JsonProperty(value = "supportedZones", access = JsonProperty.Access.WRITE_ONLY)
private List supportedZones;
/*
* Supported high availability mode
*/
- @JsonProperty(value = "supportedHaMode", access = JsonProperty.Access.WRITE_ONLY)
private List supportedHaMode;
+ /*
+ * The reason for the capability not being available.
+ */
+ private String reason;
+
+ /*
+ * The status of the capability.
+ */
+ private CapabilityStatus status;
+
/**
* Creates an instance of ServerSkuCapability class.
*/
@@ -109,6 +116,26 @@ public List supportedHaMode() {
return this.supportedHaMode;
}
+ /**
+ * Get the reason property: The reason for the capability not being available.
+ *
+ * @return the reason value.
+ */
+ @Override
+ public String reason() {
+ return this.reason;
+ }
+
+ /**
+ * Get the status property: The status of the capability.
+ *
+ * @return the status value.
+ */
+ @Override
+ public CapabilityStatus status() {
+ return this.status;
+ }
+
/**
* Validates the instance.
*
@@ -116,6 +143,56 @@ public List supportedHaMode() {
*/
@Override
public void validate() {
- super.validate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ServerSkuCapability from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ServerSkuCapability if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ServerSkuCapability.
+ */
+ public static ServerSkuCapability fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ServerSkuCapability deserializedServerSkuCapability = new ServerSkuCapability();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("status".equals(fieldName)) {
+ deserializedServerSkuCapability.status = CapabilityStatus.fromString(reader.getString());
+ } else if ("reason".equals(fieldName)) {
+ deserializedServerSkuCapability.reason = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedServerSkuCapability.name = reader.getString();
+ } else if ("vCores".equals(fieldName)) {
+ deserializedServerSkuCapability.vCores = reader.getNullable(JsonReader::getInt);
+ } else if ("supportedIops".equals(fieldName)) {
+ deserializedServerSkuCapability.supportedIops = reader.getNullable(JsonReader::getInt);
+ } else if ("supportedMemoryPerVcoreMb".equals(fieldName)) {
+ deserializedServerSkuCapability.supportedMemoryPerVcoreMb = reader.getNullable(JsonReader::getLong);
+ } else if ("supportedZones".equals(fieldName)) {
+ List supportedZones = reader.readArray(reader1 -> reader1.getString());
+ deserializedServerSkuCapability.supportedZones = supportedZones;
+ } else if ("supportedHaMode".equals(fieldName)) {
+ List supportedHaMode = reader.readArray(reader1 -> HaMode.fromString(reader1.getString()));
+ deserializedServerSkuCapability.supportedHaMode = supportedHaMode;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedServerSkuCapability;
+ });
}
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerState.java
index a52348063fc5d..a85bf6e086ce2 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerState.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerState.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -62,7 +61,6 @@ public ServerState() {
* @param name a name to look for.
* @return the corresponding ServerState.
*/
- @JsonCreator
public static ServerState fromString(String name) {
return fromString(name, ServerState.class);
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionListResult.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionListResult.java
index c74b17508d0a9..cf42365a2e8b6 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionListResult.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionListResult.java
@@ -5,25 +5,27 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerThreatProtectionSettingsModelInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* A list of the server's Advanced Threat Protection settings.
*/
@Immutable
-public final class ServerThreatProtectionListResult {
+public final class ServerThreatProtectionListResult implements JsonSerializable {
/*
* Array of results.
*/
- @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
private List value;
/*
* Link to retrieve next page of results.
*/
- @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
private String nextLink;
/**
@@ -60,4 +62,44 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ServerThreatProtectionListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ServerThreatProtectionListResult if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ServerThreatProtectionListResult.
+ */
+ public static ServerThreatProtectionListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ServerThreatProtectionListResult deserializedServerThreatProtectionListResult
+ = new ServerThreatProtectionListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> ServerThreatProtectionSettingsModelInner.fromJson(reader1));
+ deserializedServerThreatProtectionListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedServerThreatProtectionListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedServerThreatProtectionListResult;
+ });
+ }
}
diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersion.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersion.java
index 595758c9ddc2c..6b152fa9b30aa 100644
--- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersion.java
+++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersion.java
@@ -5,13 +5,17 @@
package com.azure.resourcemanager.postgresqlflexibleserver.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
* The version of a server.
*/
public final class ServerVersion extends ExpandableStringEnum