diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md index c8374fa740d0..3495eb6d466d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/CHANGELOG.md @@ -1,14 +1,415 @@ # Release History -## 2.1.0-beta.1 (Unreleased) +## 2.1.0-beta.1 (2026-01-20) -### Features Added +- Azure Resource Manager PostgreSql client library for Java. This package contains Microsoft Azure SDK for PostgreSql Management SDK. The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, log files and configurations with new business model. Package api-version 2026-01-01-preview. 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.BackupAutomaticAndOnDemandList` was removed + +#### `models.ServerList` was removed + +#### `models.FirewallRuleList` was removed + +#### `models.PrivateEndpointConnectionList` was removed + +#### `models.DatabaseList` was removed + +#### `models.TuningOptionsList` was removed + +#### `models.ObjectRecommendationList` was removed + +#### `models.AdvancedThreatProtectionSettingsList` was removed + +#### `models.AdministratorMicrosoftEntraList` was removed + +#### `models.ConfigurationList` was removed + +#### `models.OperationList` was removed + +#### `models.PrivateLinkResourceList` was removed + +#### `models.MigrationList` was removed + +#### `models.CapabilityList` was removed + +#### `models.QuotaUsageList` was removed + +#### `models.VirtualEndpointsList` was removed + +#### `models.CapturedLogList` was removed + +#### `models.LtrServerBackupOperationList` was removed + +#### `models.Backup` was modified + +* `validate()` was removed + +#### `models.StorageTierCapability` was modified + +* `StorageTierCapability()` was changed to private access +* `validate()` was removed + +#### `models.HighAvailability` was modified + +* `withMode(models.HighAvailabilityMode)` was removed +* `models.HighAvailabilityMode mode()` -> `models.PostgreSqlFlexibleServerHighAvailabilityMode mode()` +* `validate()` was removed + +#### `models.VirtualNetworkSubnetUsageParameter` was modified + +* `validate()` was removed + +#### `models.ImpactRecord` was modified + +* `ImpactRecord()` was changed to private access +* `withAbsoluteValue(java.lang.Double)` was removed +* `withDimensionName(java.lang.String)` was removed +* `withQueryId(java.lang.Long)` was removed +* `validate()` was removed +* `withUnit(java.lang.String)` was removed + +#### `models.Replica` was modified + +* `validate()` was removed + +#### `models.ObjectRecommendationDetails` was modified + +* `ObjectRecommendationDetails()` was changed to private access +* `withDatabaseName(java.lang.String)` was removed +* `withSchema(java.lang.String)` was removed +* `withIndexType(java.lang.String)` was removed +* `withIncludedColumns(java.util.List)` was removed +* `withTable(java.lang.String)` was removed +* `withIndexColumns(java.util.List)` was removed +* `withIndexName(java.lang.String)` was removed +* `validate()` was removed + +#### `models.CheckNameAvailabilityResponse` was modified + +* `models.CheckNameAvailabilityResponse withMessage(java.lang.String)` -> `models.CheckNameAvailabilityResponse withMessage(java.lang.String)` +* `models.CheckNameAvailabilityResponse withReason(models.CheckNameAvailabilityReason)` -> `models.CheckNameAvailabilityResponse withReason(models.CheckNameAvailabilityReason)` +* `validate()` was removed +* `models.CheckNameAvailabilityResponse withNameAvailable(java.lang.Boolean)` -> `models.CheckNameAvailabilityResponse withNameAvailable(java.lang.Boolean)` + +#### `models.HighAvailabilityForPatch` was modified + +* `models.HighAvailabilityMode mode()` -> `models.PostgreSqlFlexibleServerHighAvailabilityMode mode()` +* `withMode(models.HighAvailabilityMode)` was removed +* `validate()` was removed + +#### `models.NameProperty` was modified + +* `NameProperty()` was changed to private access +* `withLocalizedValue(java.lang.String)` was removed +* `validate()` was removed +* `withValue(java.lang.String)` was removed + +#### `models.MigrationResourceForPatch` was modified + +* `validate()` was removed + +#### `models.FastProvisioningEditionCapability` was modified + +* `FastProvisioningEditionCapability()` was changed to private access +* `validate()` was removed + +#### `models.SkuForPatch` was modified + +* `validate()` was removed + +#### `models.Storage` was modified + +* `validate()` was removed + +#### `models.UserIdentity` was modified + +* `validate()` was removed + +#### `models.OperationDisplay` was modified + +* `OperationDisplay()` was changed to private access +* `validate()` was removed + +#### `models.MaintenanceWindowForPatch` was modified + +* `validate()` was removed + +#### `models.PrivateLinkServiceConnectionState` was modified + +* `validate()` was removed + +#### `models.AuthConfigForPatch` was modified + +* `validate()` was removed + +#### `models.UserAssignedIdentity` was modified + +* `validate()` was removed + +#### `models.ObjectRecommendationPropertiesImplementationDetails` was modified + +* `ObjectRecommendationPropertiesImplementationDetails()` was changed to private access +* `withScript(java.lang.String)` was removed +* `withMethod(java.lang.String)` was removed +* `validate()` was removed + +#### `models.DelegatedSubnetUsage` was modified + +* `DelegatedSubnetUsage()` was changed to private access +* `validate()` was removed + +#### `models.MigrationStatus` was modified + +* `MigrationStatus()` was changed to private access +* `validate()` was removed + +#### `models.StorageMbCapability` was modified + +* `StorageMbCapability()` was changed to private access +* `validate()` was removed + +#### `models.SupportedFeature` was modified + +* `SupportedFeature()` was changed to private access +* `validate()` was removed + +#### `models.ServerSku` was modified + +* `ServerSku()` was changed to private access +* `validate()` was removed +* `withTier(models.SkuTier)` was removed +* `withName(java.lang.String)` was removed + +#### `models.PrivateEndpoint` was modified + +* `validate()` was removed + +#### `models.BackupStoreDetails` was modified + +* `validate()` was removed + +#### `models.AdministratorMicrosoftEntraAdd` was modified + +* `validate()` was removed + +#### `models.DatabaseMigrationState` was modified + +* `DatabaseMigrationState()` was changed to private access +* `validate()` was removed +* `withEndedOn(java.time.OffsetDateTime)` was removed +* `withFullLoadCompletedTables(java.lang.Integer)` was removed +* `withIncomingChanges(java.lang.Integer)` was removed +* `withMigrationOperation(java.lang.String)` was removed +* `withCdcInsertCounter(java.lang.Integer)` was removed +* `withAppliedChanges(java.lang.Integer)` was removed +* `withStartedOn(java.time.OffsetDateTime)` was removed +* `withMessage(java.lang.String)` was removed +* `withMigrationState(models.MigrationDatabaseState)` was removed +* `withFullLoadQueuedTables(java.lang.Integer)` was removed +* `withFullLoadErroredTables(java.lang.Integer)` was removed +* `withCdcUpdateCounter(java.lang.Integer)` was removed +* `withFullLoadLoadingTables(java.lang.Integer)` was removed +* `withDatabaseName(java.lang.String)` was removed +* `withLatency(java.lang.Integer)` was removed +* `withCdcDeleteCounter(java.lang.Integer)` was removed + +#### `models.CapabilityBase` was modified + +* `validate()` was removed + +#### `models.DataEncryption` was modified + +* `withGeoBackupEncryptionKeyStatus(models.EncryptionKeyStatus)` was removed +* `validate()` was removed +* `withPrimaryEncryptionKeyStatus(models.EncryptionKeyStatus)` was removed + +#### `models.RestartParameter` was modified + +* `validate()` was removed + +#### `models.ServerVersionCapability` was modified + +* `ServerVersionCapability()` was changed to private access +* `validate()` was removed + +#### `models.BackupForPatch` was modified + +* `validate()` was removed +* `withGeoRedundantBackup(models.GeographicallyRedundantBackup)` was removed + +#### `models.ValidationDetails` was modified + +* `ValidationDetails()` was changed to private access +* `withServerLevelValidationDetails(java.util.List)` was removed +* `validate()` was removed +* `withValidationEndTimeInUtc(java.time.OffsetDateTime)` was removed +* `withValidationStartTimeInUtc(java.time.OffsetDateTime)` was removed +* `withDbLevelValidationDetails(java.util.List)` was removed +* `withStatus(models.ValidationState)` was removed + +#### `models.ServerForPatch` was modified + +* `validate()` was removed +* `withAdministratorLogin(java.lang.String)` was removed + +#### `models.BackupsLongTermRetentionRequest` was modified + +* `validate()` was removed + +#### `models.Cluster` was modified + +* `validate()` was removed + +#### `models.VirtualEndpointResourceForPatch` was modified + +* `validate()` was removed + +#### `models.BackupRequestBase` was modified + +* `validate()` was removed + +#### `models.ServerSkuCapability` was modified + +* `ServerSkuCapability()` was changed to private access +* `validate()` was removed + +#### `models.ValidationMessage` was modified + +* `ValidationMessage()` was changed to private access +* `validate()` was removed +* `withState(models.ValidationState)` was removed +* `withMessage(java.lang.String)` was removed + +#### `models.BackupsLongTermRetentionsCheckPrerequisitesHeaders` was modified + +* `withXMsRequestId(java.lang.String)` was removed +* `validate()` was removed + +#### `models.ConfigurationForUpdate` was modified + +* `validate()` was removed + +#### `models.AdminCredentialsForPatch` was modified + +* `validate()` was removed + +#### `models.MaintenanceWindow` was modified + +* `validate()` was removed + +#### `models.Network` was modified + +* `validate()` was removed + +#### `models.BackupSettings` was modified + +* `validate()` was removed + +#### `models.Sku` was modified + +* `validate()` was removed + +#### `models.MigrationSecretParametersForPatch` was modified + +* `validate()` was removed + +#### `models.ValidationSummaryItem` was modified + +* `ValidationSummaryItem()` was changed to private access +* `withType(java.lang.String)` was removed +* `withMessages(java.util.List)` was removed +* `validate()` was removed +* `withState(models.ValidationState)` was removed + +#### `models.LtrPreBackupRequest` was modified + +* `validate()` was removed + +#### `models.CheckNameAvailabilityRequest` was modified + +* `validate()` was removed + +#### `models.MigrationSecretParameters` was modified + +* `validate()` was removed + +#### `models.DbLevelValidationStatus` was modified + +* `DbLevelValidationStatus()` was changed to private access +* `withStartedOn(java.time.OffsetDateTime)` was removed +* `validate()` was removed +* `withDatabaseName(java.lang.String)` was removed +* `withEndedOn(java.time.OffsetDateTime)` was removed +* `withSummary(java.util.List)` was removed + +#### `models.StorageEditionCapability` was modified + +* `StorageEditionCapability()` was changed to private access +* `validate()` was removed + +#### `models.DbServerMetadata` was modified + +* `DbServerMetadata()` was changed to private access +* `withStorageMb(java.lang.Integer)` was removed +* `validate()` was removed +* `withVersion(java.lang.String)` was removed +* `withSku(models.ServerSku)` was removed + +#### `models.AdminCredentials` was modified + +* `validate()` was removed + +#### `models.ObjectRecommendationPropertiesAnalyzedWorkload` was modified + +* `ObjectRecommendationPropertiesAnalyzedWorkload()` was changed to private access +* `withEndTime(java.time.OffsetDateTime)` was removed +* `withQueryCount(java.lang.Integer)` was removed +* `validate()` was removed +* `withStartTime(java.time.OffsetDateTime)` was removed + +#### `models.AuthConfig` was modified + +* `validate()` was removed + +#### `models.MigrationSubstateDetails` was modified + +* `MigrationSubstateDetails()` was changed to private access +* `withDbDetails(java.util.Map)` was removed +* `withValidationDetails(models.ValidationDetails)` was removed +* `validate()` was removed + +#### `models.ServerEditionCapability` was modified + +* `ServerEditionCapability()` was changed to private access +* `validate()` was removed + +### Features Added + +* `models.MigrateNetworkStatus` was added + +* `models.NetworkMigrationState` was added + +* `models.PostgreSqlFlexibleServerHighAvailabilityMode` was added + +#### `models.HighAvailability` was modified + +* `withMode(models.PostgreSqlFlexibleServerHighAvailabilityMode)` was added + +#### `models.Servers` was modified + +* `migrateNetworkMode(java.lang.String,java.lang.String)` was added +* `migrateNetworkMode(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.HighAvailabilityForPatch` was modified + +* `withMode(models.PostgreSqlFlexibleServerHighAvailabilityMode)` was added + +#### `models.Server` was modified -### Other Changes +* `migrateNetworkMode()` was added +* `migrateNetworkMode(com.azure.core.util.Context)` was added ## 2.0.0 (2025-11-21) diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md index a258ac45fa91..1441b4a0db85 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/README.md @@ -2,7 +2,7 @@ Azure Resource Manager PostgreSql client library for Java. -This package contains Microsoft Azure SDK for PostgreSql Management SDK. The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2025-08-01. 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 PostgreSql Management SDK. The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, log files and configurations with new business model. Package api-version 2026-01-01-preview. 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 - 2.0.0 + 2.1.0-beta.1 ``` [//]: # ({x-version-update-end}) @@ -78,17 +78,17 @@ server = postgreSqlManager.servers() .withAdministratorLogin(adminName) .withAdministratorLoginPassword(adminPwd) .withSku(new Sku().withName("Standard_D2ds_v4").withTier(SkuTier.GENERAL_PURPOSE)) - .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(MicrosoftEntraAuth.DISABLED) + .withAuthConfig(new AuthConfig().withActiveDirectoryAuth(MicrosoftEntraAuth.DISABLED) .withPasswordAuth(PasswordBasedAuth.ENABLED)) - .withIdentity(new UserAssignedIdentity().withType(IdentityType.NONE)) - .withDataEncryption(new DataEncryption().withType(DataEncryptionType.SYSTEM_MANAGED)) - .withVersion(PostgresMajorVersion.ONE_FOUR) + .withIdentity(new UserAssignedIdentity().withType(IdentityType.NONE)) + .withDataEncryption(new DataEncryption().withType(DataEncryptionType.SYSTEM_MANAGED)) + .withVersion(PostgresMajorVersion.ONE_FOUR) .withAvailabilityZone("2") .withStorage(new Storage().withStorageSizeGB(128)) - .withBackup(new Backup().withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED) + .withBackup(new Backup().withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED) .withBackupRetentionDays(7)) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.SAME_ZONE)) - .withReplicationRole(ReplicationRole.PRIMARY) + .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.SAME_ZONE)) + .withReplicationRole(ReplicationRole.PRIMARY) .create(); ``` [Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md) diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md index 4643e63aa74d..39cca1bf9839 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/SAMPLE.md @@ -109,6 +109,7 @@ - [GetByResourceGroup](#servers_getbyresourcegroup) - [List](#servers_list) - [ListByResourceGroup](#servers_listbyresourcegroup) +- [MigrateNetworkMode](#servers_migratenetworkmode) - [Restart](#servers_restart) - [Start](#servers_start) - [Stop](#servers_stop) @@ -141,9 +142,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; */ public final class AdministratorsMicrosoftEntraCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * AdministratorsMicrosoftEntraAdd.json + * x-ms-original-file: 2026-01-01-preview/AdministratorsMicrosoftEntraAdd.json */ /** * Sample code: Add a server administrator associated to a Microsoft Entra principal. @@ -171,9 +170,7 @@ public final class AdministratorsMicrosoftEntraCreateOrUpdateSamples { */ public final class AdministratorsMicrosoftEntraDeleteSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * AdministratorsMicrosoftEntraDelete.json + * x-ms-original-file: 2026-01-01-preview/AdministratorsMicrosoftEntraDelete.json */ /** * Sample code: Delete a server administrator associated to a Microsoft Entra principal. @@ -197,9 +194,7 @@ public final class AdministratorsMicrosoftEntraDeleteSamples { */ public final class AdministratorsMicrosoftEntraGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * AdministratorsMicrosoftEntraGet.json + * x-ms-original-file: 2026-01-01-preview/AdministratorsMicrosoftEntraGet.json */ /** * Sample code: Get information about a server administrator associated to a Microsoft Entra principal. @@ -223,9 +218,7 @@ public final class AdministratorsMicrosoftEntraGetSamples { */ public final class AdministratorsMicrosoftEntraListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * AdministratorsMicrosoftEntraListByServer.json + * x-ms-original-file: 2026-01-01-preview/AdministratorsMicrosoftEntraListByServer.json */ /** * Sample code: List information about all server administrators associated to Microsoft Entra principals. @@ -250,9 +243,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectio */ public final class AdvancedThreatProtectionSettingsGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * AdvancedThreatProtectionSettingsGet.json + * x-ms-original-file: 2026-01-01-preview/AdvancedThreatProtectionSettingsGet.json */ /** * Sample code: Get state of advanced threat protection settings for a server. @@ -276,9 +267,7 @@ public final class AdvancedThreatProtectionSettingsGetSamples { */ public final class AdvancedThreatProtectionSettingsListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * AdvancedThreatProtectionSettingsListByServer.json + * x-ms-original-file: 2026-01-01-preview/AdvancedThreatProtectionSettingsListByServer.json */ /** * Sample code: List state of advanced threat protection settings for a server. @@ -301,9 +290,7 @@ public final class AdvancedThreatProtectionSettingsListByServerSamples { */ public final class BackupsAutomaticAndOnDemandCreateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * BackupsAutomaticAndOnDemandCreate.json + * x-ms-original-file: 2026-01-01-preview/BackupsAutomaticAndOnDemandCreate.json */ /** * Sample code: Create an on demand backup of a server. @@ -327,9 +314,7 @@ public final class BackupsAutomaticAndOnDemandCreateSamples { */ public final class BackupsAutomaticAndOnDemandDeleteSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * BackupsAutomaticAndOnDemandDelete.json + * x-ms-original-file: 2026-01-01-preview/BackupsAutomaticAndOnDemandDelete.json */ /** * Sample code: Delete an on demand backup, given its name. @@ -353,9 +338,7 @@ public final class BackupsAutomaticAndOnDemandDeleteSamples { */ public final class BackupsAutomaticAndOnDemandGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * BackupsAutomaticAndOnDemandGet.json + * x-ms-original-file: 2026-01-01-preview/BackupsAutomaticAndOnDemandGet.json */ /** * Sample code: Get an on demand backup, given its name. @@ -379,9 +362,7 @@ public final class BackupsAutomaticAndOnDemandGetSamples { */ public final class BackupsAutomaticAndOnDemandListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * BackupsAutomaticAndOnDemandListByServer.json + * x-ms-original-file: 2026-01-01-preview/BackupsAutomaticAndOnDemandListByServer.json */ /** * Sample code: List all available backups of a server. @@ -407,9 +388,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupReq */ public final class BackupsLongTermRetentionCheckPrerequisitesSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * BackupsLongTermRetentionCheckPrerequisites.json + * x-ms-original-file: 2026-01-01-preview/BackupsLongTermRetentionCheckPrerequisites.json */ /** * Sample code: Perform all checks required for a long term retention backup operation to succeed. @@ -434,9 +413,7 @@ public final class BackupsLongTermRetentionCheckPrerequisitesSamples { */ public final class BackupsLongTermRetentionGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * BackupsLongTermRetentionGet.json + * x-ms-original-file: 2026-01-01-preview/BackupsLongTermRetentionGet.json */ /** * Sample code: Get the results of a long retention backup operation for a server. @@ -460,9 +437,7 @@ public final class BackupsLongTermRetentionGetSamples { */ public final class BackupsLongTermRetentionListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * BackupsLongTermRetentionListByServer.json + * x-ms-original-file: 2026-01-01-preview/BackupsLongTermRetentionListByServer.json */ /** * Sample code: List the results of the long term retention backup operations for a server. @@ -490,9 +465,7 @@ import java.util.Arrays; */ public final class BackupsLongTermRetentionStartSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * BackupsLongTermRetentionStart.json + * x-ms-original-file: 2026-01-01-preview/BackupsLongTermRetentionStart.json */ /** * Sample code: Initiate a long term retention backup. @@ -519,9 +492,7 @@ public final class BackupsLongTermRetentionStartSamples { */ public final class CapabilitiesByLocationListSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * CapabilitiesByLocationList.json + * x-ms-original-file: 2026-01-01-preview/CapabilitiesByLocationList.json */ /** * Sample code: List the capabilities available in a given location for a specific subscription. @@ -543,9 +514,7 @@ public final class CapabilitiesByLocationListSamples { */ public final class CapabilitiesByServerListSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * CapabilitiesByServerList.json + * x-ms-original-file: 2026-01-01-preview/CapabilitiesByServerList.json */ /** * Sample code: List the capabilities available for a given server. @@ -567,9 +536,7 @@ public final class CapabilitiesByServerListSamples { */ public final class CapturedLogsListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * CapturedLogsListByServer.json + * x-ms-original-file: 2026-01-01-preview/CapturedLogsListByServer.json */ /** * Sample code: List all captured logs for download in a server. @@ -591,9 +558,7 @@ public final class CapturedLogsListByServerSamples { */ public final class ConfigurationsGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ConfigurationsGet. - * json + * x-ms-original-file: 2026-01-01-preview/ConfigurationsGet.json */ /** * Sample code: Get information about a specific configuration (also known as server parameter) of a server. @@ -616,9 +581,7 @@ public final class ConfigurationsGetSamples { */ public final class ConfigurationsListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ConfigurationsListByServer.json + * x-ms-original-file: 2026-01-01-preview/ConfigurationsListByServer.json */ /** * Sample code: List all configurations (also known as server parameters) of a server. @@ -641,9 +604,7 @@ public final class ConfigurationsListByServerSamples { */ public final class ConfigurationsPutSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ConfigurationsUpdateUsingPut.json + * x-ms-original-file: 2026-01-01-preview/ConfigurationsUpdateUsingPut.json */ /** * Sample code: Update, using Put verb, the value assigned to a specific modifiable configuration (also known as @@ -674,9 +635,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.Configuration; */ public final class ConfigurationsUpdateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ConfigurationsUpdate.json + * x-ms-original-file: 2026-01-01-preview/ConfigurationsUpdate.json */ /** * Sample code: Update the value assigned to a specific modifiable configuration (also known as server parameter) of @@ -703,9 +662,7 @@ public final class ConfigurationsUpdateSamples { */ public final class DatabasesCreateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesCreate. - * json + * x-ms-original-file: 2026-01-01-preview/DatabasesCreate.json */ /** * Sample code: Create a database. @@ -731,9 +688,7 @@ public final class DatabasesCreateSamples { */ public final class DatabasesDeleteSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesDelete. - * json + * x-ms-original-file: 2026-01-01-preview/DatabasesDelete.json */ /** * Sample code: Delete an existing database. @@ -756,8 +711,7 @@ public final class DatabasesDeleteSamples { */ public final class DatabasesGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesGet.json + * x-ms-original-file: 2026-01-01-preview/DatabasesGet.json */ /** * Sample code: Get information about an existing database. @@ -781,9 +735,7 @@ public final class DatabasesGetSamples { */ public final class DatabasesListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * DatabasesListByServer.json + * x-ms-original-file: 2026-01-01-preview/DatabasesListByServer.json */ /** * Sample code: List all databases in a server. @@ -805,9 +757,7 @@ public final class DatabasesListByServerSamples { */ public final class FirewallRulesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * FirewallRulesCreateOrUpdate.json + * x-ms-original-file: 2026-01-01-preview/FirewallRulesCreateOrUpdate.json */ /** * Sample code: Create a new firewall rule or update an existing firewall rule. @@ -834,9 +784,7 @@ public final class FirewallRulesCreateOrUpdateSamples { */ public final class FirewallRulesDeleteSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * FirewallRulesDelete.json + * x-ms-original-file: 2026-01-01-preview/FirewallRulesDelete.json */ /** * Sample code: Delete an existing firewall rule. @@ -859,9 +807,7 @@ public final class FirewallRulesDeleteSamples { */ public final class FirewallRulesGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/FirewallRulesGet. - * json + * x-ms-original-file: 2026-01-01-preview/FirewallRulesGet.json */ /** * Sample code: Get information about a firewall rule in a server. @@ -885,9 +831,7 @@ public final class FirewallRulesGetSamples { */ public final class FirewallRulesListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * FirewallRulesListByServer.json + * x-ms-original-file: 2026-01-01-preview/FirewallRulesListByServer.json */ /** * Sample code: List information about all firewall rules in a server. @@ -909,9 +853,7 @@ public final class FirewallRulesListByServerSamples { */ public final class MigrationsCancelSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsCancel. - * json + * x-ms-original-file: 2026-01-01-preview/MigrationsCancel.json */ /** * Sample code: Cancel an active migration. @@ -937,9 +879,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.Migratio */ public final class MigrationsCheckNameAvailabilitySamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsCheckNameAvailability.json + * x-ms-original-file: 2026-01-01-preview/MigrationsCheckNameAvailability.json */ /** * Sample code: Check the validity and availability of the given name, to assign it to a new migration. @@ -975,9 +915,7 @@ import java.util.Arrays; */ public final class MigrationsCreateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsCreateWithOtherUsers.json + * x-ms-original-file: 2026-01-01-preview/MigrationsCreateWithOtherUsers.json */ /** * Sample code: Create a migration specifying user names. @@ -1004,9 +942,7 @@ public final class MigrationsCreateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsCreateOtherSourceTypesValidateMigrate.json + * x-ms-original-file: 2026-01-01-preview/MigrationsCreateOtherSourceTypesValidateMigrate.json */ /** * Sample code: Create a migration with other source type for validating and migrating. @@ -1034,9 +970,7 @@ public final class MigrationsCreateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsCreateWithPrivateEndpointServers.json + * x-ms-original-file: 2026-01-01-preview/MigrationsCreateWithPrivateEndpointServers.json */ /** * Sample code: Create a migration with private endpoint. @@ -1064,9 +998,7 @@ public final class MigrationsCreateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsCreate. - * json + * x-ms-original-file: 2026-01-01-preview/MigrationsCreate.json */ /** * Sample code: Create a migration. @@ -1091,9 +1023,7 @@ public final class MigrationsCreateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsCreateWithRoles.json + * x-ms-original-file: 2026-01-01-preview/MigrationsCreateWithRoles.json */ /** * Sample code: Create a migration with roles. @@ -1120,9 +1050,7 @@ public final class MigrationsCreateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsCreateWithFullyQualifiedDomainName.json + * x-ms-original-file: 2026-01-01-preview/MigrationsCreateWithFullyQualifiedDomainName.json */ /** * Sample code: Create a migration with fully qualified domain names for source and target servers. @@ -1150,9 +1078,7 @@ public final class MigrationsCreateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsCreateValidateOnly.json + * x-ms-original-file: 2026-01-01-preview/MigrationsCreateValidateOnly.json */ /** * Sample code: Create a migration for validating only. @@ -1188,9 +1114,7 @@ public final class MigrationsCreateSamples { */ public final class MigrationsGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsGetMigrationWithSuccessfulValidationOnly.json + * x-ms-original-file: 2026-01-01-preview/MigrationsGetMigrationWithSuccessfulValidationOnly.json */ /** * Sample code: Get information about a migration with successful validation only. @@ -1205,9 +1129,7 @@ public final class MigrationsGetSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsGetMigrationWithSuccessfulValidationAndMigration.json + * x-ms-original-file: 2026-01-01-preview/MigrationsGetMigrationWithSuccessfulValidationAndMigration.json */ /** * Sample code: Get information about a migration with successful validation and successful migration. @@ -1222,9 +1144,7 @@ public final class MigrationsGetSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsGetMigrationWithSuccessfulValidationButMigrationFailure.json + * x-ms-original-file: 2026-01-01-preview/MigrationsGetMigrationWithSuccessfulValidationButMigrationFailure.json */ /** * Sample code: Get information about a migration with successful validation but failed migration. @@ -1239,9 +1159,7 @@ public final class MigrationsGetSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsGetMigrationWithValidationFailures.json + * x-ms-original-file: 2026-01-01-preview/MigrationsGetMigrationWithValidationFailures.json */ /** * Sample code: Get information about a migration with validation failures. @@ -1256,8 +1174,7 @@ public final class MigrationsGetSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGet.json + * x-ms-original-file: 2026-01-01-preview/MigrationsGet.json */ /** * Sample code: Get information about a migration. @@ -1283,9 +1200,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationListFi */ public final class MigrationsListByTargetServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsListByTargetServer.json + * x-ms-original-file: 2026-01-01-preview/MigrationsListByTargetServer.json */ /** * Sample code: List all migrations of a target flexible server. @@ -1312,9 +1227,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.Migration; */ public final class MigrationsUpdateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsUpdate. - * json + * x-ms-original-file: 2026-01-01-preview/MigrationsUpdate.json */ /** * Sample code: Update an existing migration. @@ -1342,9 +1255,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvaila */ public final class NameAvailabilityCheckGloballySamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * NameAvailabilityCheckGlobally.json + * x-ms-original-file: 2026-01-01-preview/NameAvailabilityCheckGlobally.json */ /** * Sample code: Check the validity and availability of the given name, to assign it to a new server or to use it as @@ -1372,9 +1283,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvaila */ public final class NameAvailabilityCheckWithLocationSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * NameAvailabilityCheckWithLocation.json + * x-ms-original-file: 2026-01-01-preview/NameAvailabilityCheckWithLocation.json */ /** * Sample code: Check the validity and availability of the given name, in the given location, to assign it to a new @@ -1400,9 +1309,7 @@ public final class NameAvailabilityCheckWithLocationSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/OperationsList. - * json + * x-ms-original-file: 2026-01-01-preview/OperationsList.json */ /** * Sample code: List all available REST API operations. @@ -1424,9 +1331,7 @@ public final class OperationsListSamples { */ public final class PrivateDnsZoneSuffixGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * PrivateDnsZoneSuffixGet.json + * x-ms-original-file: 2026-01-01-preview/PrivateDnsZoneSuffixGet.json */ /** * Sample code: Get the private DNS suffix. @@ -1448,9 +1353,7 @@ public final class PrivateDnsZoneSuffixGetSamples { */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * PrivateEndpointConnectionsDelete.json + * x-ms-original-file: 2026-01-01-preview/PrivateEndpointConnectionsDelete.json */ /** * Sample code: Delete a private endpoint connection. @@ -1475,9 +1378,7 @@ public final class PrivateEndpointConnectionsDeleteSamples { */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * PrivateEndpointConnectionsGet.json + * x-ms-original-file: 2026-01-01-preview/PrivateEndpointConnectionsGet.json */ /** * Sample code: Get a private endpoint connection. @@ -1502,9 +1403,7 @@ public final class PrivateEndpointConnectionsGetSamples { */ public final class PrivateEndpointConnectionsListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * PrivateEndpointConnectionsList.json + * x-ms-original-file: 2026-01-01-preview/PrivateEndpointConnectionsList.json */ /** * Sample code: List all private endpoint connections on a server. @@ -1531,9 +1430,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServ */ public final class PrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * PrivateEndpointConnectionsUpdate.json + * x-ms-original-file: 2026-01-01-preview/PrivateEndpointConnectionsUpdate.json */ /** * Sample code: Approve or reject a private endpoint connection. @@ -1561,9 +1458,7 @@ public final class PrivateEndpointConnectionsUpdateSamples { */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * PrivateLinkResourcesGet.json + * x-ms-original-file: 2026-01-01-preview/PrivateLinkResourcesGet.json */ /** * Sample code: Gets a private link resource for PostgreSQL. @@ -1587,9 +1482,7 @@ public final class PrivateLinkResourcesGetSamples { */ public final class PrivateLinkResourcesListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * PrivateLinkResourcesList.json + * x-ms-original-file: 2026-01-01-preview/PrivateLinkResourcesList.json */ /** * Sample code: Gets private link resources for PostgreSQL. @@ -1612,9 +1505,7 @@ public final class PrivateLinkResourcesListByServerSamples { */ public final class QuotaUsagesListSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * QuotaUsagesForFlexibleServers.json + * x-ms-original-file: 2026-01-01-preview/QuotaUsagesForFlexibleServers.json */ /** * Sample code: List of quota usages for servers. @@ -1636,9 +1527,7 @@ public final class QuotaUsagesListSamples { */ public final class ReplicasListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ReplicasListByServer.json + * x-ms-original-file: 2026-01-01-preview/ReplicasListByServer.json */ /** * Sample code: List all read replicas of a server. @@ -1664,11 +1553,11 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption; import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryptionType; import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackup; import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode; import com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType; import com.azure.resourcemanager.postgresqlflexibleserver.models.MicrosoftEntraAuth; import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordBasedAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgreSqlFlexibleServerHighAvailabilityMode; import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerPublicNetworkAccessState; import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; @@ -1686,9 +1575,7 @@ import java.util.Map; */ public final class ServersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateReviveDropped.json + * x-ms-original-file: 2026-01-01-preview/ServersCreateReviveDropped.json */ /** * Sample code: Create a new server using a backup of a server that was deleted or dropped recently. @@ -1710,8 +1597,7 @@ public final class ServersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateInMicrosoftOwnedVirtualNetworkWithZoneRedundantHighAvailability.json + * 2026-01-01-preview/ServersCreateInMicrosoftOwnedVirtualNetworkWithZoneRedundantHighAvailability.json */ /** * Sample code: Create a new server in Microsoft owned virtual network with zone redundant high availability. @@ -1735,16 +1621,15 @@ public final class ServersCreateOrUpdateSamples { .withBackup( new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.ENABLED)) .withNetwork(new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.ENABLED)) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) + .withHighAvailability( + new HighAvailability().withMode(PostgreSqlFlexibleServerHighAvailabilityMode.ZONE_REDUNDANT)) .withAvailabilityZone("1") .withCreateMode(CreateMode.CREATE) .create(); } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateGeoRestoreWithDataEncryptionEnabledAutoUpdate.json + * x-ms-original-file: 2026-01-01-preview/ServersCreateGeoRestoreWithDataEncryptionEnabledAutoUpdate.json */ /** * Sample code: Create a new server using a restore of a geographically redundant backup of an existing server, with @@ -1779,9 +1664,7 @@ public final class ServersCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateWithDataEncryptionEnabled.json + * x-ms-original-file: 2026-01-01-preview/ServersCreateWithDataEncryptionEnabled.json */ /** * Sample code: Create a new server with data encryption based on customer managed key. @@ -1816,16 +1699,15 @@ public final class ServersCreateOrUpdateSamples { "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") .withPrivateDnsZoneArmResourceId( "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) + .withHighAvailability( + new HighAvailability().withMode(PostgreSqlFlexibleServerHighAvailabilityMode.ZONE_REDUNDANT)) .withAvailabilityZone("1") .withCreateMode(CreateMode.CREATE) .create(); } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateGeoRestoreWithDataEncryptionEnabled.json + * x-ms-original-file: 2026-01-01-preview/ServersCreateGeoRestoreWithDataEncryptionEnabled.json */ /** * Sample code: Create a new server using a restore of a geographically redundant backup of an existing server, with @@ -1860,9 +1742,7 @@ public final class ServersCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateReplica.json + * x-ms-original-file: 2026-01-01-preview/ServersCreateReplica.json */ /** * Sample code: Create a read replica of an existing server. @@ -1892,9 +1772,7 @@ public final class ServersCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateInYourOwnVirtualNetworkWithSameZoneHighAvailability.json + * x-ms-original-file: 2026-01-01-preview/ServersCreateInYourOwnVirtualNetworkWithSameZoneHighAvailability.json */ /** * Sample code: Create a new server in your own virtual network with same zone high availability. @@ -1921,16 +1799,15 @@ public final class ServersCreateOrUpdateSamples { "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") .withPrivateDnsZoneArmResourceId( "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.private.postgres.database")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.SAME_ZONE)) + .withHighAvailability( + new HighAvailability().withMode(PostgreSqlFlexibleServerHighAvailabilityMode.SAME_ZONE)) .withAvailabilityZone("1") .withCreateMode(CreateMode.CREATE) .create(); } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersClusterCreate.json + * x-ms-original-file: 2026-01-01-preview/ServersClusterCreate.json */ /** * Sample code: Create a new elastic cluster. @@ -1953,16 +1830,15 @@ public final class ServersCreateOrUpdateSamples { .withBackup( new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) .withNetwork(new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.DISABLED)) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.fromString("Disabled"))) + .withHighAvailability( + new HighAvailability().withMode(PostgreSqlFlexibleServerHighAvailabilityMode.DISABLED)) .withCreateMode(CreateMode.CREATE) .withCluster(new Cluster().withClusterSize(2).withDefaultDatabaseName("clusterdb")) .create(); } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreatePointInTimeRestore.json + * x-ms-original-file: 2026-01-01-preview/ServersCreatePointInTimeRestore.json */ /** * Sample code: Create a new server using a point in time restore of a backup of an existing server. @@ -1984,8 +1860,7 @@ public final class ServersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateWithMicrosoftEntraEnabledInYourOwnVirtualNetworkWithoutHighAvailability.json + * 2026-01-01-preview/ServersCreateWithMicrosoftEntraEnabledInYourOwnVirtualNetworkWithoutHighAvailability.json */ /** * Sample code: Create a new server with Microsoft Entra authentication enabled in your own virtual network and @@ -2017,16 +1892,15 @@ public final class ServersCreateOrUpdateSamples { "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") .withPrivateDnsZoneArmResourceId( "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.fromString("Disabled"))) + .withHighAvailability( + new HighAvailability().withMode(PostgreSqlFlexibleServerHighAvailabilityMode.DISABLED)) .withAvailabilityZone("1") .withCreateMode(CreateMode.CREATE) .create(); } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateWithDataEncryptionEnabledAutoUpdate.json + * x-ms-original-file: 2026-01-01-preview/ServersCreateWithDataEncryptionEnabledAutoUpdate.json */ /** * Sample code: Create a new server with data encryption based on customer managed key with automatic key version @@ -2062,7 +1936,8 @@ public final class ServersCreateOrUpdateSamples { "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") .withPrivateDnsZoneArmResourceId( "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) + .withHighAvailability( + new HighAvailability().withMode(PostgreSqlFlexibleServerHighAvailabilityMode.ZONE_REDUNDANT)) .withAvailabilityZone("1") .withCreateMode(CreateMode.CREATE) .create(); @@ -2090,8 +1965,7 @@ public final class ServersCreateOrUpdateSamples { */ public final class ServersDeleteSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersDelete.json + * x-ms-original-file: 2026-01-01-preview/ServersDelete.json */ /** * Sample code: Delete or drop an existing server. @@ -2113,9 +1987,7 @@ public final class ServersDeleteSamples { */ public final class ServersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersGetWithPrivateEndpoints.json + * x-ms-original-file: 2026-01-01-preview/ServersGetWithPrivateEndpoints.json */ /** * Sample code: Get information about an existing server that isn't integrated into a virtual network provided by @@ -2131,9 +2003,7 @@ public final class ServersGetByResourceGroupSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersGetWithVnet - * .json + * x-ms-original-file: 2026-01-01-preview/ServersGetWithVnet.json */ /** * Sample code: Get information about an existing server that is integrated into a virtual network provided by @@ -2148,8 +2018,7 @@ public final class ServersGetByResourceGroupSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersGet.json + * x-ms-original-file: 2026-01-01-preview/ServersGet.json */ /** * Sample code: Get information about an existing server. @@ -2172,9 +2041,7 @@ public final class ServersGetByResourceGroupSamples { */ public final class ServersListSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersListBySubscription.json + * x-ms-original-file: 2026-01-01-preview/ServersListBySubscription.json */ /** * Sample code: List all servers in a subscription. @@ -2196,9 +2063,7 @@ public final class ServersListSamples { */ public final class ServersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersListByResourceGroup.json + * x-ms-original-file: 2026-01-01-preview/ServersListByResourceGroup.json */ /** * Sample code: List all servers in a resource group. @@ -2212,6 +2077,28 @@ public final class ServersListByResourceGroupSamples { } ``` +### Servers_MigrateNetworkMode + +```java +/** + * Samples for Servers MigrateNetworkMode. + */ +public final class ServersMigrateNetworkModeSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ServersMigrateNetworkMode.json + */ + /** + * Sample code: Migrate server network configuration. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void migrateServerNetworkConfiguration( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().migrateNetworkMode("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} +``` + ### Servers_Restart ```java @@ -2223,9 +2110,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParamete */ public final class ServersRestartSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersRestartWithFailover.json + * x-ms-original-file: 2026-01-01-preview/ServersRestartWithFailover.json */ /** * Sample code: Restart PostgreSQL database engine in a server with a forced failover to standby server. @@ -2241,9 +2126,7 @@ public final class ServersRestartSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersRestart. - * json + * x-ms-original-file: 2026-01-01-preview/ServersRestart.json */ /** * Sample code: Restart PostgreSQL database engine in a server. @@ -2265,8 +2148,7 @@ public final class ServersRestartSamples { */ public final class ServersStartSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersStart.json + * x-ms-original-file: 2026-01-01-preview/ServersStart.json */ /** * Sample code: Start a stopped server. @@ -2288,8 +2170,7 @@ public final class ServersStartSamples { */ public final class ServersStopSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersStop.json + * x-ms-original-file: 2026-01-01-preview/ServersStop.json */ /** * Sample code: Stop a server. @@ -2334,9 +2215,7 @@ import java.util.Map; */ public final class ServersUpdateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersPromoteReplicaAsForcedSwitchover.json + * x-ms-original-file: 2026-01-01-preview/ServersPromoteReplicaAsForcedSwitchover.json */ /** * Sample code: Switch over a read replica to primary server with forced data synchronization. Meaning that it @@ -2358,9 +2237,7 @@ public final class ServersUpdateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersPromoteReplicaAsPlannedSwitchover.json + * x-ms-original-file: 2026-01-01-preview/ServersPromoteReplicaAsPlannedSwitchover.json */ /** * Sample code: Switch over a read replica to primary server with planned data synchronization. Meaning that it @@ -2382,38 +2259,7 @@ public final class ServersUpdateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersUpdateWithMicrosoftEntraEnabled.json - */ - /** - * Sample code: Update an existing server with Microsoft Entra authentication enabled. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void updateAnExistingServerWithMicrosoftEntraAuthenticationEnabled( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - Server resource = manager.servers() - .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLoginPassword("examplenewpassword") - .withStorage(new Storage().withStorageSizeGB(1024) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTier.P30)) - .withBackup(new BackupForPatch().withBackupRetentionDays(20)) - .withAuthConfig(new AuthConfigForPatch().withActiveDirectoryAuth(MicrosoftEntraAuth.ENABLED) - .withPasswordAuth(PasswordBasedAuth.ENABLED) - .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) - .withCreateMode(CreateModeForPatch.UPDATE) - .apply(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersUpdateWithDataEncryptionEnabledAutoUpdate.json + * x-ms-original-file: 2026-01-01-preview/ServersUpdateWithDataEncryptionEnabledAutoUpdate.json */ /** * Sample code: Update an existing server with data encryption based on customer managed key with automatic key @@ -2447,27 +2293,34 @@ public final class ServersUpdateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersUpdateWithMajorVersionUpgrade.json + * x-ms-original-file: 2026-01-01-preview/ServersUpdateWithMicrosoftEntraEnabled.json */ /** - * Sample code: Update an existing server to upgrade the major version of PostgreSQL database engine. + * Sample code: Update an existing server with Microsoft Entra authentication enabled. * * @param manager Entry point to PostgreSqlManager. */ - public static void updateAnExistingServerToUpgradeTheMajorVersionOfPostgreSQLDatabaseEngine( + public static void updateAnExistingServerWithMicrosoftEntraAuthenticationEnabled( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withVersion(PostgresMajorVersion.ONE_SEVEN).withCreateMode(CreateModeForPatch.UPDATE).apply(); + resource.update() + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLoginPassword("examplenewpassword") + .withStorage(new Storage().withStorageSizeGB(1024) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P30)) + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withAuthConfig(new AuthConfigForPatch().withActiveDirectoryAuth(MicrosoftEntraAuth.ENABLED) + .withPasswordAuth(PasswordBasedAuth.ENABLED) + .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) + .withCreateMode(CreateModeForPatch.UPDATE) + .apply(); } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersUpdateWithCustomMaintenanceWindow.json + * x-ms-original-file: 2026-01-01-preview/ServersUpdateWithCustomMaintenanceWindow.json */ /** * Sample code: Update an existing server with custom maintenance window. @@ -2489,9 +2342,7 @@ public final class ServersUpdateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersUpdateWithDataEncryptionEnabled.json + * x-ms-original-file: 2026-01-01-preview/ServersUpdateWithDataEncryptionEnabled.json */ /** * Sample code: Update an existing server with data encryption based on customer managed key. @@ -2524,8 +2375,23 @@ public final class ServersUpdateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersUpdate.json + * x-ms-original-file: 2026-01-01-preview/ServersUpdateWithMajorVersionUpgrade.json + */ + /** + * Sample code: Update an existing server to upgrade the major version of PostgreSQL database engine. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void updateAnExistingServerToUpgradeTheMajorVersionOfPostgreSQLDatabaseEngine( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + Server resource = manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withVersion(PostgresMajorVersion.ONE_SEVEN).withCreateMode(CreateModeForPatch.UPDATE).apply(); + } + + /* + * x-ms-original-file: 2026-01-01-preview/ServersUpdate.json */ /** * Sample code: Update an existing server. @@ -2549,9 +2415,7 @@ public final class ServersUpdateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersPromoteReplicaAsForcedStandaloneServer.json + * x-ms-original-file: 2026-01-01-preview/ServersPromoteReplicaAsForcedStandaloneServer.json */ /** * Sample code: Promote a read replica to a standalone server with forced data synchronization. Meaning that it @@ -2573,9 +2437,7 @@ public final class ServersUpdateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersPromoteReplicaAsPlannedStandaloneServer.json + * x-ms-original-file: 2026-01-01-preview/ServersPromoteReplicaAsPlannedStandaloneServer.json */ /** * Sample code: Promote a read replica to a standalone server with planned data synchronization. Meaning that it @@ -2620,9 +2482,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionPar */ public final class TuningOptionsOperationGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/TuningOptionsGet. - * json + * x-ms-original-file: 2026-01-01-preview/TuningOptionsGet.json */ /** * Sample code: Get the tuning options of a server. @@ -2646,9 +2506,7 @@ public final class TuningOptionsOperationGetSamples { */ public final class TuningOptionsOperationListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * TuningOptionsListByServer.json + * x-ms-original-file: 2026-01-01-preview/TuningOptionsListByServer.json */ /** * Sample code: List the tuning options of a server. @@ -2674,9 +2532,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionPar */ public final class TuningOptionsOperationListRecommendationsSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * TuningOptionsListIndexRecommendations.json + * x-ms-original-file: 2026-01-01-preview/TuningOptionsListIndexRecommendations.json */ /** * Sample code: List available index recommendations. @@ -2691,9 +2547,7 @@ public final class TuningOptionsOperationListRecommendationsSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * TuningOptionsListTableRecommendations.json + * x-ms-original-file: 2026-01-01-preview/TuningOptionsListTableRecommendations.json */ /** * Sample code: List available table recommendations. @@ -2708,9 +2562,7 @@ public final class TuningOptionsOperationListRecommendationsSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * TuningOptionsListIndexRecommendationsFilteredForCreateIndex.json + * x-ms-original-file: 2026-01-01-preview/TuningOptionsListIndexRecommendationsFilteredForCreateIndex.json */ /** * Sample code: List available index recommendations, filtered to exclusively get those of CREATE INDEX type. @@ -2725,9 +2577,7 @@ public final class TuningOptionsOperationListRecommendationsSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * TuningOptionsListTableRecommendationsFilteredForAnalyzeTable.json + * x-ms-original-file: 2026-01-01-preview/TuningOptionsListTableRecommendationsFilteredForAnalyzeTable.json */ /** * Sample code: List available table recommendations, filtered to exclusively get those of ANALYZE TABLE type. @@ -2754,9 +2604,7 @@ import java.util.Arrays; */ public final class VirtualEndpointsCreateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * VirtualEndpointCreate.json + * x-ms-original-file: 2026-01-01-preview/VirtualEndpointCreate.json */ /** * Sample code: Create a pair of virtual endpoints for a server. @@ -2783,9 +2631,7 @@ public final class VirtualEndpointsCreateSamples { */ public final class VirtualEndpointsDeleteSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * VirtualEndpointDelete.json + * x-ms-original-file: 2026-01-01-preview/VirtualEndpointDelete.json */ /** * Sample code: Delete a pair of virtual endpoints. @@ -2808,9 +2654,7 @@ public final class VirtualEndpointsDeleteSamples { */ public final class VirtualEndpointsGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * VirtualEndpointsGet.json + * x-ms-original-file: 2026-01-01-preview/VirtualEndpointsGet.json */ /** * Sample code: Get information about a pair of virtual endpoints. @@ -2834,9 +2678,7 @@ public final class VirtualEndpointsGetSamples { */ public final class VirtualEndpointsListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * VirtualEndpointsListByServer.json + * x-ms-original-file: 2026-01-01-preview/VirtualEndpointsListByServer.json */ /** * Sample code: List pair of virtual endpoints associated to a server. @@ -2863,9 +2705,7 @@ import java.util.Arrays; */ public final class VirtualEndpointsUpdateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * VirtualEndpointUpdate.json + * x-ms-original-file: 2026-01-01-preview/VirtualEndpointUpdate.json */ /** * Sample code: Update a pair of virtual endpoints for a server. @@ -2896,9 +2736,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkS */ public final class VirtualNetworkSubnetUsageListSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * VirtualNetworkSubnetUsageList.json + * x-ms-original-file: 2026-01-01-preview/VirtualNetworkSubnetUsageList.json */ /** * Sample code: List the virtual network subnet usage for a given virtual network. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml index 1905a0feab12..01917ff5214f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/pom.xml @@ -1,7 +1,7 @@ 4.0.0 @@ -18,7 +18,7 @@ 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 Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, log files and configurations with new business model. Package tag package-flexibleserver-2025-08-01. + 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 Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, log files and configurations with new business model. Package api-version 2026-01-01-preview. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true 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/PostgreSqlManager.java index 0bfe67bdc205..e1de864828d0 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/PostgreSqlManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver; @@ -87,19 +87,11 @@ * log files and configurations with new business model. */ public final class PostgreSqlManager { - private AdministratorsMicrosoftEntras administratorsMicrosoftEntras; - - private AdvancedThreatProtectionSettings advancedThreatProtectionSettings; - - private ServerThreatProtectionSettings serverThreatProtectionSettings; - - private BackupsAutomaticAndOnDemands backupsAutomaticAndOnDemands; - - private CapabilitiesByLocations capabilitiesByLocations; + private Operations operations; - private CapabilitiesByServers capabilitiesByServers; + private Migrations migrations; - private CapturedLogs capturedLogs; + private Servers servers; private Configurations configurations; @@ -107,29 +99,37 @@ public final class PostgreSqlManager { private FirewallRules firewallRules; - private BackupsLongTermRetentions backupsLongTermRetentions; - - private Migrations migrations; + private PrivateEndpointConnections privateEndpointConnections; - private NameAvailabilities nameAvailabilities; + private PrivateLinkResources privateLinkResources; - private Operations operations; + private VirtualEndpoints virtualEndpoints; - private PrivateDnsZoneSuffixes privateDnsZoneSuffixes; + private AdministratorsMicrosoftEntras administratorsMicrosoftEntras; - private PrivateEndpointConnections privateEndpointConnections; + private CapabilitiesByServers capabilitiesByServers; - private PrivateLinkResources privateLinkResources; + private CapturedLogs capturedLogs; - private QuotaUsages quotaUsages; + private BackupsLongTermRetentions backupsLongTermRetentions; private Replicas replicas; - private Servers servers; + private AdvancedThreatProtectionSettings advancedThreatProtectionSettings; + + private ServerThreatProtectionSettings serverThreatProtectionSettings; + + private BackupsAutomaticAndOnDemands backupsAutomaticAndOnDemands; private TuningOptionsOperations tuningOptionsOperations; - private VirtualEndpoints virtualEndpoints; + private CapabilitiesByLocations capabilitiesByLocations; + + private NameAvailabilities nameAvailabilities; + + private PrivateDnsZoneSuffixes privateDnsZoneSuffixes; + + private QuotaUsages quotaUsages; private VirtualNetworkSubnetUsages virtualNetworkSubnetUsages; @@ -349,93 +349,39 @@ public PostgreSqlManager authenticate(TokenCredential credential, AzureProfile p } /** - * Gets the resource collection API of AdministratorsMicrosoftEntras. It manages AdministratorMicrosoftEntra. - * - * @return Resource collection API of AdministratorsMicrosoftEntras. - */ - public AdministratorsMicrosoftEntras administratorsMicrosoftEntras() { - if (this.administratorsMicrosoftEntras == null) { - this.administratorsMicrosoftEntras - = new AdministratorsMicrosoftEntrasImpl(clientObject.getAdministratorsMicrosoftEntras(), this); - } - return administratorsMicrosoftEntras; - } - - /** - * Gets the resource collection API of AdvancedThreatProtectionSettings. - * - * @return Resource collection API of AdvancedThreatProtectionSettings. - */ - public AdvancedThreatProtectionSettings advancedThreatProtectionSettings() { - if (this.advancedThreatProtectionSettings == null) { - this.advancedThreatProtectionSettings - = new AdvancedThreatProtectionSettingsImpl(clientObject.getAdvancedThreatProtectionSettings(), this); - } - return advancedThreatProtectionSettings; - } - - /** - * Gets the resource collection API of ServerThreatProtectionSettings. It manages - * AdvancedThreatProtectionSettingsModel. - * - * @return Resource collection API of ServerThreatProtectionSettings. - */ - public ServerThreatProtectionSettings serverThreatProtectionSettings() { - if (this.serverThreatProtectionSettings == null) { - this.serverThreatProtectionSettings - = new ServerThreatProtectionSettingsImpl(clientObject.getServerThreatProtectionSettings(), this); - } - return serverThreatProtectionSettings; - } - - /** - * Gets the resource collection API of BackupsAutomaticAndOnDemands. - * - * @return Resource collection API of BackupsAutomaticAndOnDemands. - */ - public BackupsAutomaticAndOnDemands backupsAutomaticAndOnDemands() { - if (this.backupsAutomaticAndOnDemands == null) { - this.backupsAutomaticAndOnDemands - = new BackupsAutomaticAndOnDemandsImpl(clientObject.getBackupsAutomaticAndOnDemands(), this); - } - return backupsAutomaticAndOnDemands; - } - - /** - * Gets the resource collection API of CapabilitiesByLocations. + * Gets the resource collection API of Operations. * - * @return Resource collection API of CapabilitiesByLocations. + * @return Resource collection API of Operations. */ - public CapabilitiesByLocations capabilitiesByLocations() { - if (this.capabilitiesByLocations == null) { - this.capabilitiesByLocations - = new CapabilitiesByLocationsImpl(clientObject.getCapabilitiesByLocations(), this); + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); } - return capabilitiesByLocations; + return operations; } /** - * Gets the resource collection API of CapabilitiesByServers. + * Gets the resource collection API of Migrations. It manages Migration. * - * @return Resource collection API of CapabilitiesByServers. + * @return Resource collection API of Migrations. */ - public CapabilitiesByServers capabilitiesByServers() { - if (this.capabilitiesByServers == null) { - this.capabilitiesByServers = new CapabilitiesByServersImpl(clientObject.getCapabilitiesByServers(), this); + public Migrations migrations() { + if (this.migrations == null) { + this.migrations = new MigrationsImpl(clientObject.getMigrations(), this); } - return capabilitiesByServers; + return migrations; } /** - * Gets the resource collection API of CapturedLogs. + * Gets the resource collection API of Servers. It manages Server. * - * @return Resource collection API of CapturedLogs. + * @return Resource collection API of Servers. */ - public CapturedLogs capturedLogs() { - if (this.capturedLogs == null) { - this.capturedLogs = new CapturedLogsImpl(clientObject.getCapturedLogs(), this); + public Servers servers() { + if (this.servers == null) { + this.servers = new ServersImpl(clientObject.getServers(), this); } - return capturedLogs; + return servers; } /** @@ -475,102 +421,90 @@ public FirewallRules firewallRules() { } /** - * Gets the resource collection API of BackupsLongTermRetentions. - * - * @return Resource collection API of BackupsLongTermRetentions. - */ - public BackupsLongTermRetentions backupsLongTermRetentions() { - if (this.backupsLongTermRetentions == null) { - this.backupsLongTermRetentions - = new BackupsLongTermRetentionsImpl(clientObject.getBackupsLongTermRetentions(), this); - } - return backupsLongTermRetentions; - } - - /** - * Gets the resource collection API of Migrations. It manages Migration. + * Gets the resource collection API of PrivateEndpointConnections. * - * @return Resource collection API of Migrations. + * @return Resource collection API of PrivateEndpointConnections. */ - public Migrations migrations() { - if (this.migrations == null) { - this.migrations = new MigrationsImpl(clientObject.getMigrations(), this); + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections + = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); } - return migrations; + return privateEndpointConnections; } /** - * Gets the resource collection API of NameAvailabilities. + * Gets the resource collection API of PrivateLinkResources. * - * @return Resource collection API of NameAvailabilities. + * @return Resource collection API of PrivateLinkResources. */ - public NameAvailabilities nameAvailabilities() { - if (this.nameAvailabilities == null) { - this.nameAvailabilities = new NameAvailabilitiesImpl(clientObject.getNameAvailabilities(), this); + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); } - return nameAvailabilities; + return privateLinkResources; } /** - * Gets the resource collection API of Operations. + * Gets the resource collection API of VirtualEndpoints. It manages VirtualEndpoint. * - * @return Resource collection API of Operations. + * @return Resource collection API of VirtualEndpoints. */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); + public VirtualEndpoints virtualEndpoints() { + if (this.virtualEndpoints == null) { + this.virtualEndpoints = new VirtualEndpointsImpl(clientObject.getVirtualEndpoints(), this); } - return operations; + return virtualEndpoints; } /** - * Gets the resource collection API of PrivateDnsZoneSuffixes. + * Gets the resource collection API of AdministratorsMicrosoftEntras. It manages AdministratorMicrosoftEntra. * - * @return Resource collection API of PrivateDnsZoneSuffixes. + * @return Resource collection API of AdministratorsMicrosoftEntras. */ - public PrivateDnsZoneSuffixes privateDnsZoneSuffixes() { - if (this.privateDnsZoneSuffixes == null) { - this.privateDnsZoneSuffixes - = new PrivateDnsZoneSuffixesImpl(clientObject.getPrivateDnsZoneSuffixes(), this); + public AdministratorsMicrosoftEntras administratorsMicrosoftEntras() { + if (this.administratorsMicrosoftEntras == null) { + this.administratorsMicrosoftEntras + = new AdministratorsMicrosoftEntrasImpl(clientObject.getAdministratorsMicrosoftEntras(), this); } - return privateDnsZoneSuffixes; + return administratorsMicrosoftEntras; } /** - * Gets the resource collection API of PrivateEndpointConnections. + * Gets the resource collection API of CapabilitiesByServers. * - * @return Resource collection API of PrivateEndpointConnections. + * @return Resource collection API of CapabilitiesByServers. */ - public PrivateEndpointConnections privateEndpointConnections() { - if (this.privateEndpointConnections == null) { - this.privateEndpointConnections - = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + public CapabilitiesByServers capabilitiesByServers() { + if (this.capabilitiesByServers == null) { + this.capabilitiesByServers = new CapabilitiesByServersImpl(clientObject.getCapabilitiesByServers(), this); } - return privateEndpointConnections; + return capabilitiesByServers; } /** - * Gets the resource collection API of PrivateLinkResources. + * Gets the resource collection API of CapturedLogs. * - * @return Resource collection API of PrivateLinkResources. + * @return Resource collection API of CapturedLogs. */ - public PrivateLinkResources privateLinkResources() { - if (this.privateLinkResources == null) { - this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); + public CapturedLogs capturedLogs() { + if (this.capturedLogs == null) { + this.capturedLogs = new CapturedLogsImpl(clientObject.getCapturedLogs(), this); } - return privateLinkResources; + return capturedLogs; } /** - * Gets the resource collection API of QuotaUsages. + * Gets the resource collection API of BackupsLongTermRetentions. * - * @return Resource collection API of QuotaUsages. + * @return Resource collection API of BackupsLongTermRetentions. */ - public QuotaUsages quotaUsages() { - if (this.quotaUsages == null) { - this.quotaUsages = new QuotaUsagesImpl(clientObject.getQuotaUsages(), this); + public BackupsLongTermRetentions backupsLongTermRetentions() { + if (this.backupsLongTermRetentions == null) { + this.backupsLongTermRetentions + = new BackupsLongTermRetentionsImpl(clientObject.getBackupsLongTermRetentions(), this); } - return quotaUsages; + return backupsLongTermRetentions; } /** @@ -586,15 +520,43 @@ public Replicas replicas() { } /** - * Gets the resource collection API of Servers. It manages Server. + * Gets the resource collection API of AdvancedThreatProtectionSettings. * - * @return Resource collection API of Servers. + * @return Resource collection API of AdvancedThreatProtectionSettings. */ - public Servers servers() { - if (this.servers == null) { - this.servers = new ServersImpl(clientObject.getServers(), this); + public AdvancedThreatProtectionSettings advancedThreatProtectionSettings() { + if (this.advancedThreatProtectionSettings == null) { + this.advancedThreatProtectionSettings + = new AdvancedThreatProtectionSettingsImpl(clientObject.getAdvancedThreatProtectionSettings(), this); } - return servers; + return advancedThreatProtectionSettings; + } + + /** + * Gets the resource collection API of ServerThreatProtectionSettings. It manages + * AdvancedThreatProtectionSettingsModel. + * + * @return Resource collection API of ServerThreatProtectionSettings. + */ + public ServerThreatProtectionSettings serverThreatProtectionSettings() { + if (this.serverThreatProtectionSettings == null) { + this.serverThreatProtectionSettings + = new ServerThreatProtectionSettingsImpl(clientObject.getServerThreatProtectionSettings(), this); + } + return serverThreatProtectionSettings; + } + + /** + * Gets the resource collection API of BackupsAutomaticAndOnDemands. + * + * @return Resource collection API of BackupsAutomaticAndOnDemands. + */ + public BackupsAutomaticAndOnDemands backupsAutomaticAndOnDemands() { + if (this.backupsAutomaticAndOnDemands == null) { + this.backupsAutomaticAndOnDemands + = new BackupsAutomaticAndOnDemandsImpl(clientObject.getBackupsAutomaticAndOnDemands(), this); + } + return backupsAutomaticAndOnDemands; } /** @@ -611,15 +573,53 @@ public TuningOptionsOperations tuningOptionsOperations() { } /** - * Gets the resource collection API of VirtualEndpoints. It manages VirtualEndpoint. + * Gets the resource collection API of CapabilitiesByLocations. * - * @return Resource collection API of VirtualEndpoints. + * @return Resource collection API of CapabilitiesByLocations. */ - public VirtualEndpoints virtualEndpoints() { - if (this.virtualEndpoints == null) { - this.virtualEndpoints = new VirtualEndpointsImpl(clientObject.getVirtualEndpoints(), this); + public CapabilitiesByLocations capabilitiesByLocations() { + if (this.capabilitiesByLocations == null) { + this.capabilitiesByLocations + = new CapabilitiesByLocationsImpl(clientObject.getCapabilitiesByLocations(), this); } - return virtualEndpoints; + return capabilitiesByLocations; + } + + /** + * Gets the resource collection API of NameAvailabilities. + * + * @return Resource collection API of NameAvailabilities. + */ + public NameAvailabilities nameAvailabilities() { + if (this.nameAvailabilities == null) { + this.nameAvailabilities = new NameAvailabilitiesImpl(clientObject.getNameAvailabilities(), this); + } + return nameAvailabilities; + } + + /** + * Gets the resource collection API of PrivateDnsZoneSuffixes. + * + * @return Resource collection API of PrivateDnsZoneSuffixes. + */ + public PrivateDnsZoneSuffixes privateDnsZoneSuffixes() { + if (this.privateDnsZoneSuffixes == null) { + this.privateDnsZoneSuffixes + = new PrivateDnsZoneSuffixesImpl(clientObject.getPrivateDnsZoneSuffixes(), this); + } + return privateDnsZoneSuffixes; + } + + /** + * 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; } /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsMicrosoftEntrasClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsMicrosoftEntrasClient.java index ead2efe4cc2b..613c45cc35cc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsMicrosoftEntrasClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsMicrosoftEntrasClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -23,6 +23,68 @@ * An instance of this class provides access to all the operations defined in AdministratorsMicrosoftEntrasClient. */ public interface AdministratorsMicrosoftEntrasClient { + /** + * Gets information about a server administrator associated to a Microsoft Entra principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @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 information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String objectId); + + /** + * Gets information about a server administrator associated to a Microsoft Entra principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @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 information about a server administrator associated to a Microsoft Entra principal on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, String objectId); + + /** + * Gets information about a server administrator associated to a Microsoft Entra principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @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 information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, + String objectId, Context context); + + /** + * Gets information about a server administrator associated to a Microsoft Entra principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @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 information about a server administrator associated to a Microsoft Entra principal. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AdministratorMicrosoftEntraInner get(String resourceGroupName, String serverName, String objectId); + /** * Creates a new server administrator associated to a Microsoft Entra principal. * @@ -34,8 +96,7 @@ public interface AdministratorsMicrosoftEntrasClient { * @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 administrator associated to a Microsoft Entra principal along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, @@ -52,7 +113,7 @@ Mono>> createOrUpdateWithResponseAsync(String resource * @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 administrator associated to a Microsoft Entra principal. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, AdministratorMicrosoftEntraInner> beginCreateOrUpdateAsync( @@ -69,7 +130,7 @@ PollerFlux, AdministratorMicrosoftE * @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 administrator associated to a Microsoft Entra principal. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AdministratorMicrosoftEntraInner> beginCreateOrUpdate( @@ -87,7 +148,7 @@ SyncPoller, AdministratorMicrosoftE * @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 administrator associated to a Microsoft Entra principal. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AdministratorMicrosoftEntraInner> beginCreateOrUpdate( @@ -105,7 +166,7 @@ SyncPoller, AdministratorMicrosoftE * @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 administrator associated to a Microsoft Entra principal on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createOrUpdateAsync(String resourceGroupName, String serverName, @@ -122,7 +183,7 @@ Mono createOrUpdateAsync(String resourceGroupN * @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 administrator associated to a Microsoft Entra principal. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AdministratorMicrosoftEntraInner createOrUpdate(String resourceGroupName, String serverName, String objectId, @@ -140,7 +201,7 @@ AdministratorMicrosoftEntraInner createOrUpdate(String resourceGroupName, String * @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 administrator associated to a Microsoft Entra principal. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AdministratorMicrosoftEntraInner createOrUpdate(String resourceGroupName, String serverName, String objectId, @@ -246,68 +307,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String objectId, Context context); - /** - * Gets information about a server administrator associated to a Microsoft Entra principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param objectId Object identifier of the Microsoft Entra principal. - * @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 information about a server administrator associated to a Microsoft Entra principal along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String objectId); - - /** - * Gets information about a server administrator associated to a Microsoft Entra principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param objectId Object identifier of the Microsoft Entra principal. - * @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 information about a server administrator associated to a Microsoft Entra principal on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String objectId); - - /** - * Gets information about a server administrator associated to a Microsoft Entra principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param objectId Object identifier of the Microsoft Entra principal. - * @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 information about a server administrator associated to a Microsoft Entra principal along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - String objectId, Context context); - - /** - * Gets information about a server administrator associated to a Microsoft Entra principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param objectId Object identifier of the Microsoft Entra principal. - * @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 information about a server administrator associated to a Microsoft Entra principal. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AdministratorMicrosoftEntraInner get(String resourceGroupName, String serverName, String objectId); - /** * List all server administrators associated to a Microsoft Entra principal. * diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdvancedThreatProtectionSettingsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdvancedThreatProtectionSettingsClient.java index 8c013f634b95..3780eb8f50a7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdvancedThreatProtectionSettingsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdvancedThreatProtectionSettingsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -19,48 +19,51 @@ */ public interface AdvancedThreatProtectionSettingsClient { /** - * Lists state of advanced threat protection settings for a server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. * @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 list of advanced threat protection settings for a server as paginated response with {@link PagedFlux}. + * @return state of advanced threat protection settings for a server along with {@link Response} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, - String serverName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, + String serverName, ThreatProtectionName threatProtectionName); /** - * Lists state of advanced threat protection settings for a server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. * @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 list of advanced threat protection settings for a server as paginated response with - * {@link PagedIterable}. + * @return state of advanced threat protection settings for a server on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName); /** - * Lists state of advanced threat protection settings for a server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. * @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 list of advanced threat protection settings for a server as paginated response with - * {@link PagedIterable}. + * @return state of advanced threat protection settings for a server along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, Context context); /** * Gets state of advanced threat protection settings for a server. @@ -71,56 +74,53 @@ PagedIterable listByServer(String re * @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 state of advanced threat protection settings for a server along with {@link Response} on successful - * completion of {@link Mono}. + * @return state of advanced threat protection settings for a server. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, - String serverName, ThreatProtectionName threatProtectionName); + AdvancedThreatProtectionSettingsModelInner get(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName); /** - * Gets state of advanced threat protection settings for a server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName Name of the advanced threat protection settings. * @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 state of advanced threat protection settings for a server on successful completion of {@link Mono}. + * @return list of advanced threat protection settings for a server as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, + String serverName); /** - * Gets state of advanced threat protection settings for a server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName Name of the advanced threat protection settings. - * @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 state of advanced threat protection settings for a server along with {@link Response}. + * @return list of advanced threat protection settings for a server as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets state of advanced threat protection settings for a server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName Name of the advanced threat protection settings. + * @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 state of advanced threat protection settings for a server. + * @return list of advanced threat protection settings for a server as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - AdvancedThreatProtectionSettingsModelInner get(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsAutomaticAndOnDemandsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsAutomaticAndOnDemandsClient.java index c69d909ae6f7..5c7ce6d0d4d2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsAutomaticAndOnDemandsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsAutomaticAndOnDemandsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -22,6 +22,66 @@ * An instance of this class provides access to all the operations defined in BackupsAutomaticAndOnDemandsClient. */ public interface BackupsAutomaticAndOnDemandsClient { + /** + * Gets information of an on demand backup, given its name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName 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 information of an on demand backup, given its name along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String backupName); + + /** + * Gets information of an on demand backup, given its name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName 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 information of an on demand backup, given its name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, String backupName); + + /** + * Gets information of an on demand backup, given its name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName 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 information of an on demand backup, given its name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context); + + /** + * Gets information of an on demand backup, given its name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName 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 information of an on demand backup, given its name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupAutomaticAndOnDemandInner get(String resourceGroupName, String serverName, String backupName); + /** * Creates an on demand backup of a server. * @@ -31,7 +91,7 @@ public interface BackupsAutomaticAndOnDemandsClient { * @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 properties of a backup along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createWithResponseAsync(String resourceGroupName, String serverName, @@ -46,7 +106,7 @@ Mono>> createWithResponseAsync(String resourceGroupNam * @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 properties of a backup. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, BackupAutomaticAndOnDemandInner> @@ -61,7 +121,7 @@ Mono>> createWithResponseAsync(String resourceGroupNam * @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 properties of a backup. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BackupAutomaticAndOnDemandInner> @@ -77,7 +137,7 @@ Mono>> createWithResponseAsync(String resourceGroupNam * @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 properties of a backup. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BackupAutomaticAndOnDemandInner> @@ -92,7 +152,7 @@ Mono>> createWithResponseAsync(String resourceGroupNam * @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 properties of a backup on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createAsync(String resourceGroupName, String serverName, String backupName); @@ -106,7 +166,7 @@ Mono>> createWithResponseAsync(String resourceGroupNam * @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 properties of a backup. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) BackupAutomaticAndOnDemandInner create(String resourceGroupName, String serverName, String backupName); @@ -121,7 +181,7 @@ Mono>> createWithResponseAsync(String resourceGroupNam * @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 properties of a backup. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) BackupAutomaticAndOnDemandInner create(String resourceGroupName, String serverName, String backupName, @@ -227,66 +287,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String backupName, Context context); - /** - * Gets information of an on demand backup, given its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param backupName 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 information of an on demand backup, given its name along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String backupName); - - /** - * Gets information of an on demand backup, given its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param backupName 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 information of an on demand backup, given its name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String backupName); - - /** - * Gets information of an on demand backup, given its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param backupName 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 information of an on demand backup, given its name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - String backupName, Context context); - - /** - * Gets information of an on demand backup, given its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param backupName 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 information of an on demand backup, given its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupAutomaticAndOnDemandInner get(String resourceGroupName, String serverName, String backupName); - /** * Lists all available backups of a server. * diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsLongTermRetentionsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsLongTermRetentionsClient.java index 833054e90b88..5d5f41cbfaae 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsLongTermRetentionsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsLongTermRetentionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByLocationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByLocationsClient.java index 26556c4a4f4d..7400ae9c2e94 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByLocationsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByLocationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByServersClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByServersClient.java index 41f25319c501..e9fd75363f88 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByServersClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByServersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapturedLogsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapturedLogsClient.java index 9409af6f811d..86568a690828 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapturedLogsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapturedLogsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java index 23b24be2082e..f2dc3cb886d2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -23,48 +23,6 @@ * An instance of this class provides access to all the operations defined in ConfigurationsClient. */ public interface ConfigurationsClient { - /** - * Lists all configurations (also known as server parameters) of a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 list of configurations (also known as server parameters) as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); - - /** - * Lists all configurations (also known as server parameters) of a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 list of configurations (also known as server parameters) as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); - - /** - * Lists all configurations (also known as server parameters) of a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 list of configurations (also known as server parameters) as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); - /** * Gets information about a specific configuration (also known as server parameter) of a server. * @@ -128,7 +86,8 @@ Response getWithResponse(String resourceGroupName, String se ConfigurationInner get(String resourceGroupName, String serverName, String configurationName); /** - * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -138,15 +97,15 @@ Response getWithResponse(String resourceGroupName, String se * @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 configuration (also known as server parameter) along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + Mono>> putWithResponseAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -156,14 +115,15 @@ Mono>> updateWithResponseAsync(String resourceGroupNam * @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 configuration (also known as server parameter). + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ConfigurationInner> beginUpdateAsync(String resourceGroupName, + PollerFlux, ConfigurationInner> beginPutAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -173,14 +133,15 @@ PollerFlux, ConfigurationInner> beginUpdateAsync( * @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 configuration (also known as server parameter). + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName, - String serverName, String configurationName, ConfigurationForUpdate parameters); + SyncPoller, ConfigurationInner> beginPut(String resourceGroupName, String serverName, + String configurationName, ConfigurationForUpdate parameters); /** - * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -191,14 +152,15 @@ SyncPoller, ConfigurationInner> beginUpdate(Strin * @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 configuration (also known as server parameter). + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName, - String serverName, String configurationName, ConfigurationForUpdate parameters, Context context); + SyncPoller, ConfigurationInner> beginPut(String resourceGroupName, String serverName, + String configurationName, ConfigurationForUpdate parameters, Context context); /** - * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -208,14 +170,15 @@ SyncPoller, ConfigurationInner> beginUpdate(Strin * @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 configuration (also known as server parameter) on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync(String resourceGroupName, String serverName, String configurationName, + Mono putAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -225,14 +188,15 @@ Mono updateAsync(String resourceGroupName, String serverName * @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 configuration (also known as server parameter). + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConfigurationInner update(String resourceGroupName, String serverName, String configurationName, + ConfigurationInner put(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -243,15 +207,14 @@ ConfigurationInner update(String resourceGroupName, String serverName, String co * @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 configuration (also known as server parameter). + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConfigurationInner update(String resourceGroupName, String serverName, String configurationName, + ConfigurationInner put(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters, Context context); /** - * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server - * parameter) of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -261,16 +224,14 @@ ConfigurationInner update(String resourceGroupName, String serverName, String co * @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 configuration (also known as server parameter) along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono>> putWithResponseAsync(String resourceGroupName, String serverName, + Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server - * parameter) of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -280,15 +241,14 @@ Mono>> putWithResponseAsync(String resourceGroupName, * @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 configuration (also known as server parameter). + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, ConfigurationInner> beginPutAsync(String resourceGroupName, + PollerFlux, ConfigurationInner> beginUpdateAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server - * parameter) of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -298,15 +258,14 @@ PollerFlux, ConfigurationInner> beginPutAsync(Str * @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 configuration (also known as server parameter). + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConfigurationInner> beginPut(String resourceGroupName, String serverName, - String configurationName, ConfigurationForUpdate parameters); + SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName, + String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server - * parameter) of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -317,15 +276,14 @@ SyncPoller, ConfigurationInner> beginPut(String r * @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 configuration (also known as server parameter). + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConfigurationInner> beginPut(String resourceGroupName, String serverName, - String configurationName, ConfigurationForUpdate parameters, Context context); + SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName, + String serverName, String configurationName, ConfigurationForUpdate parameters, Context context); /** - * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server - * parameter) of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -335,15 +293,14 @@ SyncPoller, ConfigurationInner> beginPut(String r * @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 configuration (also known as server parameter) on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono putAsync(String resourceGroupName, String serverName, String configurationName, + Mono updateAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server - * parameter) of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -353,15 +310,14 @@ Mono putAsync(String resourceGroupName, String serverName, S * @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 configuration (also known as server parameter). + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConfigurationInner put(String resourceGroupName, String serverName, String configurationName, + ConfigurationInner update(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters); /** - * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server - * parameter) of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -372,9 +328,51 @@ ConfigurationInner put(String resourceGroupName, String serverName, String confi * @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 configuration (also known as server parameter). + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConfigurationInner put(String resourceGroupName, String serverName, String configurationName, + ConfigurationInner update(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters, Context context); + + /** + * Lists all configurations (also known as server parameters) of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of configurations (also known as server parameters) as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); + + /** + * Lists all configurations (also known as server parameters) of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); + + /** + * Lists all configurations (also known as server parameters) of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java index d990c89cfd57..8c1375b76d90 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -22,6 +22,70 @@ * An instance of this class provides access to all the operations defined in DatabasesClient. */ public interface DatabasesClient { + /** + * Gets information about an existing database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @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 information about an existing database along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName); + + /** + * Gets information about an existing database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @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 information about an existing database on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, String databaseName); + + /** + * Gets information about an existing database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @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 information about an existing database along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + Context context); + + /** + * Gets information about an existing database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @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 information about an existing database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DatabaseInner get(String resourceGroupName, String serverName, String databaseName); + /** * Creates a new database. * @@ -33,7 +97,7 @@ public interface DatabasesClient { * @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 represents a database along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createWithResponseAsync(String resourceGroupName, String serverName, @@ -50,7 +114,7 @@ Mono>> createWithResponseAsync(String resourceGroupNam * @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 represents a database. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, DatabaseInner> beginCreateAsync(String resourceGroupName, String serverName, @@ -67,7 +131,7 @@ PollerFlux, DatabaseInner> beginCreateAsync(String res * @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 represents a database. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatabaseInner> beginCreate(String resourceGroupName, String serverName, @@ -85,7 +149,7 @@ SyncPoller, DatabaseInner> beginCreate(String resource * @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 represents a database. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatabaseInner> beginCreate(String resourceGroupName, String serverName, @@ -102,7 +166,7 @@ SyncPoller, DatabaseInner> beginCreate(String resource * @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 represents a database on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createAsync(String resourceGroupName, String serverName, String databaseName, @@ -119,7 +183,7 @@ Mono createAsync(String resourceGroupName, String serverName, Str * @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 represents a database. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) DatabaseInner create(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); @@ -136,7 +200,7 @@ Mono createAsync(String resourceGroupName, String serverName, Str * @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 represents a database. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) DatabaseInner create(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, @@ -250,70 +314,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String databaseName, Context context); - /** - * Gets information about an existing database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the - * list of all existing databases in a server. - * @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 information about an existing database along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName); - - /** - * Gets information about an existing database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the - * list of all existing databases in a server. - * @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 information about an existing database on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String databaseName); - - /** - * Gets information about an existing database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the - * list of all existing databases in a server. - * @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 information about an existing database along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - Context context); - - /** - * Gets information about an existing database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the - * list of all existing databases in a server. - * @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 information about an existing database. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatabaseInner get(String resourceGroupName, String serverName, String databaseName); - /** * Lists all databases in a server. * diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java index a8058aa894bc..7f047d855cca 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -22,6 +22,66 @@ * An instance of this class provides access to all the operations defined in FirewallRulesClient. */ public interface FirewallRulesClient { + /** + * Gets information about a firewall rule in a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param firewallRuleName Name of the firewall rule. + * @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 information about a firewall rule in a server along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName); + + /** + * Gets information about a firewall rule in a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param firewallRuleName Name of the firewall rule. + * @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 information about a firewall rule in a server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, String firewallRuleName); + + /** + * Gets information about a firewall rule in a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param firewallRuleName Name of the firewall rule. + * @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 information about a firewall rule in a server along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, String firewallRuleName, + Context context); + + /** + * Gets information about a firewall rule in a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param firewallRuleName Name of the firewall rule. + * @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 information about a firewall rule in a server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName); + /** * Creates a new firewall rule or updates an existing firewall rule. * @@ -32,7 +92,7 @@ public interface FirewallRulesClient { * @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 firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, @@ -48,7 +108,7 @@ Mono>> createOrUpdateWithResponseAsync(String resource * @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 firewall rule. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, FirewallRuleInner> beginCreateOrUpdateAsync(String resourceGroupName, @@ -64,7 +124,7 @@ PollerFlux, FirewallRuleInner> beginCreateOrUpdate * @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 firewall rule. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName, @@ -81,7 +141,7 @@ SyncPoller, FirewallRuleInner> beginCreateOrUpdate * @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 firewall rule. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName, @@ -97,7 +157,7 @@ SyncPoller, FirewallRuleInner> beginCreateOrUpdate * @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 firewall rule on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createOrUpdateAsync(String resourceGroupName, String serverName, String firewallRuleName, @@ -113,7 +173,7 @@ Mono createOrUpdateAsync(String resourceGroupName, String ser * @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 firewall rule. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, @@ -130,7 +190,7 @@ FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, St * @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 firewall rule. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, @@ -238,66 +298,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String firewallRuleName, Context context); - /** - * Gets information about a firewall rule in a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param firewallRuleName Name of the firewall rule. - * @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 information about a firewall rule in a server along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String firewallRuleName); - - /** - * Gets information about a firewall rule in a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param firewallRuleName Name of the firewall rule. - * @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 information about a firewall rule in a server on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String firewallRuleName); - - /** - * Gets information about a firewall rule in a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param firewallRuleName Name of the firewall rule. - * @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 information about a firewall rule in a server along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String firewallRuleName, - Context context); - - /** - * Gets information about a firewall rule in a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param firewallRuleName Name of the firewall rule. - * @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 information about a firewall rule in a server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName); - /** * Lists information about all firewall rules in a server. * diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/MigrationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/MigrationsClient.java index 86ccc9298f10..6999658f16f7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/MigrationsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/MigrationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -21,127 +21,127 @@ */ public interface MigrationsClient { /** - * Creates a new migration. + * Gets information about a migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param migrationName Name of migration. - * @param parameters Parameters required for creating a migration. * @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 properties of a migration along with {@link Response} on successful completion of {@link Mono}. + * @return information about a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createWithResponseAsync(String resourceGroupName, String serverName, - String migrationName, MigrationInner parameters); + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String migrationName); /** - * Creates a new migration. + * Gets information about a migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param migrationName Name of migration. - * @param parameters Parameters required for creating a migration. * @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 properties of a migration on successful completion of {@link Mono}. + * @return information about a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync(String resourceGroupName, String serverName, String migrationName, - MigrationInner parameters); + Mono getAsync(String resourceGroupName, String serverName, String migrationName); /** - * Creates a new migration. + * Gets information about a migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param migrationName Name of migration. - * @param parameters Parameters required for creating a migration. * @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 properties of a migration along with {@link Response}. + * @return information about a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse(String resourceGroupName, String serverName, String migrationName, - MigrationInner parameters, Context context); + Response getWithResponse(String resourceGroupName, String serverName, String migrationName, + Context context); /** - * Creates a new migration. + * Gets information about a migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param migrationName Name of migration. - * @param parameters Parameters required for creating a migration. * @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 properties of a migration. + * @return information about a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - MigrationInner create(String resourceGroupName, String serverName, String migrationName, MigrationInner parameters); + MigrationInner get(String resourceGroupName, String serverName, String migrationName); /** - * Gets information about a migration. + * Creates a new migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @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 information about a migration along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String migrationName); + Mono> createWithResponseAsync(String resourceGroupName, String serverName, + String migrationName, MigrationInner parameters); /** - * Gets information about a migration. + * Creates a new migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @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 information about a migration on successful completion of {@link Mono}. + * @return properties of a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String migrationName); + Mono createAsync(String resourceGroupName, String serverName, String migrationName, + MigrationInner parameters); /** - * Gets information about a migration. + * Creates a new migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @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 information about a migration along with {@link Response}. + * @return properties of a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String migrationName, - Context context); + Response createWithResponse(String resourceGroupName, String serverName, String migrationName, + MigrationInner parameters, Context context); /** - * Gets information about a migration. + * Creates a new migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @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 information about a migration. + * @return properties of a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - MigrationInner get(String resourceGroupName, String serverName, String migrationName); + MigrationInner create(String resourceGroupName, String serverName, String migrationName, MigrationInner parameters); /** * Updates an existing migration. The request body can contain one to many of the mutable properties present in the diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/NameAvailabilitiesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/NameAvailabilitiesClient.java index f1aa16bb08c7..1a38d58227af 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/NameAvailabilitiesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/NameAvailabilitiesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -20,8 +20,7 @@ public interface NameAvailabilitiesClient { * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base * name of a new pair of virtual endpoints. * - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -34,8 +33,7 @@ public interface NameAvailabilitiesClient { * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base * name of a new pair of virtual endpoints. * - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -48,8 +46,7 @@ public interface NameAvailabilitiesClient { * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base * name of a new pair of virtual endpoints. * - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -64,8 +61,7 @@ Response checkGloballyWithResponse(CheckNameAvailabi * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base * name of a new pair of virtual endpoints. * - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -78,8 +74,7 @@ Response checkGloballyWithResponse(CheckNameAvailabi * Check the availability of name for resource. * * @param locationName The name of the location. - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -93,8 +88,7 @@ Mono> checkWithLocationWithResponseAsync(St * Check the availability of name for resource. * * @param locationName The name of the location. - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -108,8 +102,7 @@ Mono checkWithLocationAsync(String locationName, * Check the availability of name for resource. * * @param locationName The name of the location. - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -124,8 +117,7 @@ Response checkWithLocationWithResponse(String locati * Check the availability of name for resource. * * @param locationName The name of the location. - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/OperationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/OperationsClient.java index ed8e41df6e60..6fb9bdc43492 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/OperationsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -20,7 +20,7 @@ public interface OperationsClient { * * @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 list of resource provider operations as paginated response with {@link PagedFlux}. + * @return paged collection of Operation items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux listAsync(); @@ -30,7 +30,7 @@ public interface OperationsClient { * * @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 list of resource provider operations as paginated response with {@link PagedIterable}. + * @return paged collection of Operation items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -42,7 +42,7 @@ public interface OperationsClient { * @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 list of resource provider operations as paginated response with {@link PagedIterable}. + * @return paged collection of Operation items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); 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/PostgreSqlManagementClient.java index 1d8db32b24eb..528930839c1e 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/PostgreSqlManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -12,26 +12,26 @@ */ public interface PostgreSqlManagementClient { /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -47,158 +47,158 @@ public interface PostgreSqlManagementClient { Duration getDefaultPollInterval(); /** - * Gets the AdministratorsMicrosoftEntrasClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the AdministratorsMicrosoftEntrasClient object. + * @return the OperationsClient object. */ - AdministratorsMicrosoftEntrasClient getAdministratorsMicrosoftEntras(); + OperationsClient getOperations(); /** - * Gets the AdvancedThreatProtectionSettingsClient object to access its operations. + * Gets the MigrationsClient object to access its operations. * - * @return the AdvancedThreatProtectionSettingsClient object. + * @return the MigrationsClient object. */ - AdvancedThreatProtectionSettingsClient getAdvancedThreatProtectionSettings(); + MigrationsClient getMigrations(); /** - * Gets the ServerThreatProtectionSettingsClient object to access its operations. + * Gets the ServersClient object to access its operations. * - * @return the ServerThreatProtectionSettingsClient object. + * @return the ServersClient object. */ - ServerThreatProtectionSettingsClient getServerThreatProtectionSettings(); + ServersClient getServers(); /** - * Gets the BackupsAutomaticAndOnDemandsClient object to access its operations. + * Gets the ConfigurationsClient object to access its operations. * - * @return the BackupsAutomaticAndOnDemandsClient object. + * @return the ConfigurationsClient object. */ - BackupsAutomaticAndOnDemandsClient getBackupsAutomaticAndOnDemands(); + ConfigurationsClient getConfigurations(); /** - * Gets the CapabilitiesByLocationsClient object to access its operations. + * Gets the DatabasesClient object to access its operations. * - * @return the CapabilitiesByLocationsClient object. + * @return the DatabasesClient object. */ - CapabilitiesByLocationsClient getCapabilitiesByLocations(); + DatabasesClient getDatabases(); /** - * Gets the CapabilitiesByServersClient object to access its operations. + * Gets the FirewallRulesClient object to access its operations. * - * @return the CapabilitiesByServersClient object. + * @return the FirewallRulesClient object. */ - CapabilitiesByServersClient getCapabilitiesByServers(); + FirewallRulesClient getFirewallRules(); /** - * Gets the CapturedLogsClient object to access its operations. + * Gets the PrivateEndpointConnectionsClient object to access its operations. * - * @return the CapturedLogsClient object. + * @return the PrivateEndpointConnectionsClient object. */ - CapturedLogsClient getCapturedLogs(); + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); /** - * Gets the ConfigurationsClient object to access its operations. + * Gets the PrivateLinkResourcesClient object to access its operations. * - * @return the ConfigurationsClient object. + * @return the PrivateLinkResourcesClient object. */ - ConfigurationsClient getConfigurations(); + PrivateLinkResourcesClient getPrivateLinkResources(); /** - * Gets the DatabasesClient object to access its operations. + * Gets the VirtualEndpointsClient object to access its operations. * - * @return the DatabasesClient object. + * @return the VirtualEndpointsClient object. */ - DatabasesClient getDatabases(); + VirtualEndpointsClient getVirtualEndpoints(); /** - * Gets the FirewallRulesClient object to access its operations. + * Gets the AdministratorsMicrosoftEntrasClient object to access its operations. * - * @return the FirewallRulesClient object. + * @return the AdministratorsMicrosoftEntrasClient object. */ - FirewallRulesClient getFirewallRules(); + AdministratorsMicrosoftEntrasClient getAdministratorsMicrosoftEntras(); /** - * Gets the BackupsLongTermRetentionsClient object to access its operations. + * Gets the CapabilitiesByServersClient object to access its operations. * - * @return the BackupsLongTermRetentionsClient object. + * @return the CapabilitiesByServersClient object. */ - BackupsLongTermRetentionsClient getBackupsLongTermRetentions(); + CapabilitiesByServersClient getCapabilitiesByServers(); /** - * Gets the MigrationsClient object to access its operations. + * Gets the CapturedLogsClient object to access its operations. * - * @return the MigrationsClient object. + * @return the CapturedLogsClient object. */ - MigrationsClient getMigrations(); + CapturedLogsClient getCapturedLogs(); /** - * Gets the NameAvailabilitiesClient object to access its operations. + * Gets the BackupsLongTermRetentionsClient object to access its operations. * - * @return the NameAvailabilitiesClient object. + * @return the BackupsLongTermRetentionsClient object. */ - NameAvailabilitiesClient getNameAvailabilities(); + BackupsLongTermRetentionsClient getBackupsLongTermRetentions(); /** - * Gets the OperationsClient object to access its operations. + * Gets the ReplicasClient object to access its operations. * - * @return the OperationsClient object. + * @return the ReplicasClient object. */ - OperationsClient getOperations(); + ReplicasClient getReplicas(); /** - * Gets the PrivateDnsZoneSuffixesClient object to access its operations. + * Gets the AdvancedThreatProtectionSettingsClient object to access its operations. * - * @return the PrivateDnsZoneSuffixesClient object. + * @return the AdvancedThreatProtectionSettingsClient object. */ - PrivateDnsZoneSuffixesClient getPrivateDnsZoneSuffixes(); + AdvancedThreatProtectionSettingsClient getAdvancedThreatProtectionSettings(); /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. + * Gets the ServerThreatProtectionSettingsClient object to access its operations. * - * @return the PrivateEndpointConnectionsClient object. + * @return the ServerThreatProtectionSettingsClient object. */ - PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + ServerThreatProtectionSettingsClient getServerThreatProtectionSettings(); /** - * Gets the PrivateLinkResourcesClient object to access its operations. + * Gets the BackupsAutomaticAndOnDemandsClient object to access its operations. * - * @return the PrivateLinkResourcesClient object. + * @return the BackupsAutomaticAndOnDemandsClient object. */ - PrivateLinkResourcesClient getPrivateLinkResources(); + BackupsAutomaticAndOnDemandsClient getBackupsAutomaticAndOnDemands(); /** - * Gets the QuotaUsagesClient object to access its operations. + * Gets the TuningOptionsOperationsClient object to access its operations. * - * @return the QuotaUsagesClient object. + * @return the TuningOptionsOperationsClient object. */ - QuotaUsagesClient getQuotaUsages(); + TuningOptionsOperationsClient getTuningOptionsOperations(); /** - * Gets the ReplicasClient object to access its operations. + * Gets the CapabilitiesByLocationsClient object to access its operations. * - * @return the ReplicasClient object. + * @return the CapabilitiesByLocationsClient object. */ - ReplicasClient getReplicas(); + CapabilitiesByLocationsClient getCapabilitiesByLocations(); /** - * Gets the ServersClient object to access its operations. + * Gets the NameAvailabilitiesClient object to access its operations. * - * @return the ServersClient object. + * @return the NameAvailabilitiesClient object. */ - ServersClient getServers(); + NameAvailabilitiesClient getNameAvailabilities(); /** - * Gets the TuningOptionsOperationsClient object to access its operations. + * Gets the PrivateDnsZoneSuffixesClient object to access its operations. * - * @return the TuningOptionsOperationsClient object. + * @return the PrivateDnsZoneSuffixesClient object. */ - TuningOptionsOperationsClient getTuningOptionsOperations(); + PrivateDnsZoneSuffixesClient getPrivateDnsZoneSuffixes(); /** - * Gets the VirtualEndpointsClient object to access its operations. + * Gets the QuotaUsagesClient object to access its operations. * - * @return the VirtualEndpointsClient object. + * @return the QuotaUsagesClient object. */ - VirtualEndpointsClient getVirtualEndpoints(); + QuotaUsagesClient getQuotaUsages(); /** * Gets the VirtualNetworkSubnetUsagesClient object to access its operations. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateDnsZoneSuffixesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateDnsZoneSuffixesClient.java index 361e6ae6beaa..e56fb218f171 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateDnsZoneSuffixesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateDnsZoneSuffixesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java index c2813a96317d..e56bde7ecad0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -27,7 +27,8 @@ public interface PrivateEndpointConnectionsClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -42,7 +43,8 @@ Mono> getWithResponseAsync(String resou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -57,7 +59,8 @@ Mono getAsync(String resourceGroupName, String s * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -73,7 +76,8 @@ Response getWithResponse(String resourceGroupNam * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -88,13 +92,13 @@ PrivateEndpointConnectionInner get(String resourceGroupName, String serverName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 private endpoint connection resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, @@ -105,12 +109,13 @@ Mono>> updateWithResponseAsync(String resourceGroupNam * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 the private endpoint connection resource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( @@ -122,12 +127,13 @@ PollerFlux, PrivateEndpointConnection * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 the private endpoint connection resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginUpdate( @@ -139,13 +145,14 @@ SyncPoller, PrivateEndpointConnection * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 the private endpoint connection resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginUpdate( @@ -157,12 +164,13 @@ SyncPoller, PrivateEndpointConnection * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 private endpoint connection resource on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono updateAsync(String resourceGroupName, String serverName, @@ -173,12 +181,13 @@ Mono updateAsync(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 private endpoint connection resource. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, @@ -189,13 +198,14 @@ PrivateEndpointConnectionInner update(String resourceGroupName, String serverNam * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 private endpoint connection resource. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, @@ -206,7 +216,8 @@ PrivateEndpointConnectionInner update(String resourceGroupName, String serverNam * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -221,7 +232,8 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -236,7 +248,8 @@ PollerFlux, Void> beginDeleteAsync(String resourceGroupName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -251,7 +264,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -267,7 +281,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -281,7 +296,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -294,7 +310,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateLinkResourcesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateLinkResourcesClient.java index dc241be16393..604f1d76ab04 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateLinkResourcesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateLinkResourcesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -18,44 +18,50 @@ */ public interface PrivateLinkResourcesClient { /** - * Gets the private link resources for PostgreSQL server. + * Gets a private link resource for PostgreSQL server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param groupName The name of the private link resource. * @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 private link resources for PostgreSQL server as paginated response with {@link PagedFlux}. + * @return a private link resource for PostgreSQL server along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String groupName); /** - * Gets the private link resources for PostgreSQL server. + * Gets a private link resource for PostgreSQL server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param groupName The name of the private link resource. * @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 private link resources for PostgreSQL server as paginated response with {@link PagedIterable}. + * @return a private link resource for PostgreSQL server on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, String groupName); /** - * Gets the private link resources for PostgreSQL server. + * Gets a private link resource for PostgreSQL server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param groupName The name of the private link resource. * @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 private link resources for PostgreSQL server as paginated response with {@link PagedIterable}. + * @return a private link resource for PostgreSQL server along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, String groupName, + Context context); /** * Gets a private link resource for PostgreSQL server. @@ -66,54 +72,48 @@ public interface PrivateLinkResourcesClient { * @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 private link resource for PostgreSQL server along with {@link Response} on successful completion of - * {@link Mono}. + * @return a private link resource for PostgreSQL server. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String groupName); + PrivateLinkResourceInner get(String resourceGroupName, String serverName, String groupName); /** - * Gets a private link resource for PostgreSQL server. + * Gets the private link resources for PostgreSQL server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param groupName The name of the private link resource. * @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 private link resource for PostgreSQL server on successful completion of {@link Mono}. + * @return the private link resources for PostgreSQL server as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String groupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * Gets a private link resource for PostgreSQL server. + * Gets the private link resources for PostgreSQL server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param groupName The name of the private link resource. - * @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 a private link resource for PostgreSQL server along with {@link Response}. + * @return the private link resources for PostgreSQL server as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, String groupName, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets a private link resource for PostgreSQL server. + * Gets the private link resources for PostgreSQL server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param groupName The name of the private link resource. + * @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 a private link resource for PostgreSQL server. + * @return the private link resources for PostgreSQL server as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceInner get(String resourceGroupName, String serverName, String groupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } 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 index 59ed9de674a3..466d0b1aecda 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ReplicasClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ReplicasClient.java index abcdb60f96f0..9444e97ec855 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ReplicasClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ReplicasClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerThreatProtectionSettingsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerThreatProtectionSettingsClient.java index 6aef7aace93c..2907b17cd40c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerThreatProtectionSettingsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerThreatProtectionSettingsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -31,8 +31,7 @@ public interface ServerThreatProtectionSettingsClient { * @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 advanced threat protection settings of the server along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, @@ -48,7 +47,7 @@ Mono>> createOrUpdateWithResponseAsync(String resource * @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 advanced threat protection settings of the server. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, AdvancedThreatProtectionSettingsModelInner> @@ -65,7 +64,7 @@ Mono>> createOrUpdateWithResponseAsync(String resource * @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 advanced threat protection settings of the server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AdvancedThreatProtectionSettingsModelInner> @@ -83,7 +82,7 @@ Mono>> createOrUpdateWithResponseAsync(String resource * @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 advanced threat protection settings of the server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AdvancedThreatProtectionSettingsModelInner> @@ -100,7 +99,7 @@ Mono>> createOrUpdateWithResponseAsync(String resource * @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 advanced threat protection settings of the server on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createOrUpdateAsync(String resourceGroupName, String serverName, @@ -116,7 +115,7 @@ Mono createOrUpdateAsync(String reso * @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 advanced threat protection settings of the server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AdvancedThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, @@ -133,7 +132,7 @@ AdvancedThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupNa * @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 advanced threat protection settings of the server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AdvancedThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java index 98cddb79c017..780a5d362f74 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -13,6 +13,7 @@ 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.MigrateNetworkStatusInner; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForPatch; @@ -24,6 +25,60 @@ * An instance of this class provides access to all the operations defined in ServersClient. */ public interface ServersClient { + /** + * Gets information about an existing server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 information about an existing server along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String serverName); + + /** + * Gets information about an existing server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 information about an existing server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getByResourceGroupAsync(String resourceGroupName, String serverName); + + /** + * Gets information about an existing server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 information about an existing server along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context); + + /** + * Gets information about an existing server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 information about an existing server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ServerInner getByResourceGroup(String resourceGroupName, String serverName); + /** * Creates a new server. * @@ -33,7 +88,7 @@ public interface ServersClient { * @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 properties of a server along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, @@ -48,7 +103,7 @@ Mono>> createOrUpdateWithResponseAsync(String resource * @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 properties of a server. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ServerInner> beginCreateOrUpdateAsync(String resourceGroupName, @@ -63,7 +118,7 @@ PollerFlux, ServerInner> beginCreateOrUpdateAsync(String * @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 properties of a server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, String serverName, @@ -79,7 +134,7 @@ SyncPoller, ServerInner> beginCreateOrUpdate(String reso * @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 properties of a server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, String serverName, @@ -94,7 +149,7 @@ SyncPoller, ServerInner> beginCreateOrUpdate(String reso * @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 properties of a server on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createOrUpdateAsync(String resourceGroupName, String serverName, ServerInner parameters); @@ -108,7 +163,7 @@ SyncPoller, ServerInner> beginCreateOrUpdate(String reso * @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 properties of a server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters); @@ -123,7 +178,7 @@ SyncPoller, ServerInner> beginCreateOrUpdate(String reso * @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 properties of a server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters, Context context); @@ -138,7 +193,7 @@ SyncPoller, ServerInner> beginCreateOrUpdate(String reso * @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 properties of a server along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, @@ -154,7 +209,7 @@ Mono>> updateWithResponseAsync(String resourceGroupNam * @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 properties of a server. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, ServerInner> beginUpdateAsync(String resourceGroupName, String serverName, @@ -170,7 +225,7 @@ PollerFlux, ServerInner> beginUpdateAsync(String resourc * @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 properties of a server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, @@ -187,7 +242,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou * @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 properties of a server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, @@ -203,7 +258,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou * @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 properties of a server on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono updateAsync(String resourceGroupName, String serverName, ServerForPatch parameters); @@ -218,7 +273,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou * @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 properties of a server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ServerInner update(String resourceGroupName, String serverName, ServerForPatch parameters); @@ -234,7 +289,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou * @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 properties of a server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) ServerInner update(String resourceGroupName, String serverName, ServerForPatch parameters, Context context); @@ -330,60 +385,6 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, Context context); - /** - * Gets information about an existing server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 information about an existing server along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String serverName); - - /** - * Gets information about an existing server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 information about an existing server on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getByResourceGroupAsync(String resourceGroupName, String serverName); - - /** - * Gets information about an existing server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 information about an existing server along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context); - - /** - * Gets information about an existing server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 information about an existing server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServerInner getByResourceGroup(String resourceGroupName, String serverName); - /** * Lists all servers in a resource group. * @@ -759,4 +760,115 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void stop(String resourceGroupName, String serverName, Context context); + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 status of a network migration operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> migrateNetworkModeWithResponseAsync(String resourceGroupName, String serverName); + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 the status of a network migration operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, MigrateNetworkStatusInner> + beginMigrateNetworkModeAsync(String resourceGroupName, String serverName); + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 the status of a network migration operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MigrateNetworkStatusInner> + beginMigrateNetworkMode(String resourceGroupName, String serverName); + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 the status of a network migration operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MigrateNetworkStatusInner> + beginMigrateNetworkMode(String resourceGroupName, String serverName, Context context); + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 status of a network migration operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono migrateNetworkModeAsync(String resourceGroupName, String serverName); + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 status of a network migration operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MigrateNetworkStatusInner migrateNetworkMode(String resourceGroupName, String serverName); + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 status of a network migration operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MigrateNetworkStatusInner migrateNetworkMode(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsOperationsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsOperationsClient.java index c714d3282f2d..382c53d400b8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsOperationsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -81,50 +81,44 @@ Response getWithResponse(String resourceGroupName, String se TuningOptionsInner get(String resourceGroupName, String serverName, TuningOptionParameterEnum tuningOption); /** - * Lists available object recommendations. + * Lists the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. * @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 list of available object recommendations as paginated response with {@link PagedFlux}. + * @return list of server tuning options as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listRecommendationsAsync(String resourceGroupName, String serverName, - TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType); + PagedFlux listByServerAsync(String resourceGroupName, String serverName); /** - * Lists available object recommendations. + * Lists the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. * @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 list of available object recommendations as paginated response with {@link PagedFlux}. + * @return list of server tuning options as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listRecommendationsAsync(String resourceGroupName, String serverName, - TuningOptionParameterEnum tuningOption); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Lists available object recommendations. + * Lists the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. + * @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 list of available object recommendations as paginated response with {@link PagedIterable}. + * @return list of server tuning options as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRecommendations(String resourceGroupName, String serverName, - TuningOptionParameterEnum tuningOption); + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** * Lists available object recommendations. @@ -133,53 +127,59 @@ PagedIterable listRecommendations(String resourceGrou * @param serverName The name of the server. * @param tuningOption The name of the tuning option. * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. - * @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 list of available object recommendations as paginated response with {@link PagedIterable}. + * @return list of available object recommendations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRecommendations(String resourceGroupName, String serverName, - TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType, Context context); + PagedFlux listRecommendationsAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType); /** - * Lists the tuning options of a server. + * Lists available object recommendations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. * @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 list of server tuning options as paginated response with {@link PagedFlux}. + * @return list of available object recommendations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByServerAsync(String resourceGroupName, String serverName); + PagedFlux listRecommendationsAsync(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption); /** - * Lists the tuning options of a server. + * Lists available object recommendations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. * @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 list of server tuning options as paginated response with {@link PagedIterable}. + * @return list of available object recommendations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption); /** - * Lists the tuning options of a server. + * Lists available object recommendations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. * @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 list of server tuning options as paginated response with {@link PagedIterable}. + * @return list of available object recommendations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualEndpointsClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualEndpointsClient.java index 26f31f8654a1..35d7320ac3aa 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualEndpointsClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualEndpointsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -23,6 +23,66 @@ * An instance of this class provides access to all the operations defined in VirtualEndpointsClient. */ public interface VirtualEndpointsClient { + /** + * Gets information about a pair of virtual endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @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 information about a pair of virtual endpoints along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String virtualEndpointName); + + /** + * Gets information about a pair of virtual endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @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 information about a pair of virtual endpoints on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String serverName, String virtualEndpointName); + + /** + * Gets information about a pair of virtual endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @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 information about a pair of virtual endpoints along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String serverName, + String virtualEndpointName, Context context); + + /** + * Gets information about a pair of virtual endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @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 information about a pair of virtual endpoints. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualEndpointInner get(String resourceGroupName, String serverName, String virtualEndpointName); + /** * Creates a pair of virtual endpoints for a server. * @@ -33,8 +93,7 @@ public interface VirtualEndpointsClient { * @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 pair of virtual endpoints for a server along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> createWithResponseAsync(String resourceGroupName, String serverName, @@ -50,7 +109,7 @@ Mono>> createWithResponseAsync(String resourceGroupNam * @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 pair of virtual endpoints for a server. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, VirtualEndpointInner> beginCreateAsync(String resourceGroupName, @@ -66,7 +125,7 @@ PollerFlux, VirtualEndpointInner> beginCreateAs * @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 pair of virtual endpoints for a server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualEndpointInner> beginCreate(String resourceGroupName, @@ -83,7 +142,7 @@ SyncPoller, VirtualEndpointInner> beginCreate(S * @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 pair of virtual endpoints for a server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualEndpointInner> beginCreate(String resourceGroupName, @@ -99,7 +158,7 @@ SyncPoller, VirtualEndpointInner> beginCreate(S * @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 pair of virtual endpoints for a server on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono createAsync(String resourceGroupName, String serverName, String virtualEndpointName, @@ -115,7 +174,7 @@ Mono createAsync(String resourceGroupName, String serverNa * @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 pair of virtual endpoints for a server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) VirtualEndpointInner create(String resourceGroupName, String serverName, String virtualEndpointName, @@ -132,7 +191,7 @@ VirtualEndpointInner create(String resourceGroupName, String serverName, String * @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 pair of virtual endpoints for a server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) VirtualEndpointInner create(String resourceGroupName, String serverName, String virtualEndpointName, @@ -148,8 +207,7 @@ VirtualEndpointInner create(String resourceGroupName, String serverName, String * @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 pair of virtual endpoints for a server along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, @@ -165,7 +223,7 @@ Mono>> updateWithResponseAsync(String resourceGroupNam * @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 pair of virtual endpoints for a server. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux, VirtualEndpointInner> beginUpdateAsync(String resourceGroupName, @@ -181,7 +239,7 @@ PollerFlux, VirtualEndpointInner> beginUpdateAs * @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 pair of virtual endpoints for a server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualEndpointInner> beginUpdate(String resourceGroupName, @@ -198,7 +256,7 @@ SyncPoller, VirtualEndpointInner> beginUpdate(S * @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 pair of virtual endpoints for a server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualEndpointInner> beginUpdate(String resourceGroupName, @@ -214,7 +272,7 @@ SyncPoller, VirtualEndpointInner> beginUpdate(S * @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 pair of virtual endpoints for a server on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) Mono updateAsync(String resourceGroupName, String serverName, String virtualEndpointName, @@ -230,7 +288,7 @@ Mono updateAsync(String resourceGroupName, String serverNa * @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 pair of virtual endpoints for a server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) VirtualEndpointInner update(String resourceGroupName, String serverName, String virtualEndpointName, @@ -247,7 +305,7 @@ VirtualEndpointInner update(String resourceGroupName, String serverName, String * @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 pair of virtual endpoints for a server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) VirtualEndpointInner update(String resourceGroupName, String serverName, String virtualEndpointName, @@ -355,66 +413,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String serverName, String virtualEndpointName, Context context); - /** - * Gets information about a pair of virtual endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param virtualEndpointName Base name of the virtual endpoints. - * @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 information about a pair of virtual endpoints along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String virtualEndpointName); - - /** - * Gets information about a pair of virtual endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param virtualEndpointName Base name of the virtual endpoints. - * @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 information about a pair of virtual endpoints on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync(String resourceGroupName, String serverName, String virtualEndpointName); - - /** - * Gets information about a pair of virtual endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param virtualEndpointName Base name of the virtual endpoints. - * @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 information about a pair of virtual endpoints along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String serverName, - String virtualEndpointName, Context context); - - /** - * Gets information about a pair of virtual endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param virtualEndpointName Base name of the virtual endpoints. - * @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 information about a pair of virtual endpoints. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VirtualEndpointInner get(String resourceGroupName, String serverName, String virtualEndpointName); - /** * Lists pair of virtual endpoints associated to a server. * diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java index 668b0f49e094..ffd92b9152da 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent; @@ -20,7 +20,7 @@ public interface VirtualNetworkSubnetUsagesClient { * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. - * @param parameters The required parameters for creating or updating a server. + * @param parameters The request body. * @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. @@ -34,7 +34,7 @@ Mono> listWithResponseAsync(String * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. - * @param parameters The required parameters for creating or updating a server. + * @param parameters The request body. * @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. @@ -48,7 +48,7 @@ Mono listAsync(String locationName, * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. - * @param parameters The required parameters for creating or updating a server. + * @param parameters The request body. * @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. @@ -63,7 +63,7 @@ Response listWithResponse(String locationNa * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. - * @param parameters The required parameters for creating or updating a server. + * @param parameters The request body. * @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. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraInner.java index bcb0d456cf18..6b33289e17e5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; 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; @@ -17,12 +16,12 @@ /** * Server administrator associated to a Microsoft Entra principal. */ -@Fluent +@Immutable public final class AdministratorMicrosoftEntraInner extends ProxyResource { /* * Properties of a server administrator associated to a Microsoft Entra principal. */ - private AdministratorMicrosoftEntraProperties innerProperties = new AdministratorMicrosoftEntraProperties(); + private AdministratorMicrosoftEntraProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -47,7 +46,7 @@ public final class AdministratorMicrosoftEntraInner extends ProxyResource { /** * Creates an instance of AdministratorMicrosoftEntraInner class. */ - public AdministratorMicrosoftEntraInner() { + private AdministratorMicrosoftEntraInner() { } /** @@ -108,21 +107,6 @@ public PrincipalType principalType() { return this.innerProperties() == null ? null : this.innerProperties().principalType(); } - /** - * Set the principalType property: Type of Microsoft Entra principal to which the server administrator is - * associated. - * - * @param principalType the principalType value to set. - * @return the AdministratorMicrosoftEntraInner object itself. - */ - public AdministratorMicrosoftEntraInner withPrincipalType(PrincipalType principalType) { - if (this.innerProperties() == null) { - this.innerProperties = new AdministratorMicrosoftEntraProperties(); - } - this.innerProperties().withPrincipalType(principalType); - return this; - } - /** * Get the principalName property: Name of the Microsoft Entra principal. * @@ -132,20 +116,6 @@ public String principalName() { return this.innerProperties() == null ? null : this.innerProperties().principalName(); } - /** - * Set the principalName property: Name of the Microsoft Entra principal. - * - * @param principalName the principalName value to set. - * @return the AdministratorMicrosoftEntraInner object itself. - */ - public AdministratorMicrosoftEntraInner withPrincipalName(String principalName) { - if (this.innerProperties() == null) { - this.innerProperties = new AdministratorMicrosoftEntraProperties(); - } - this.innerProperties().withPrincipalName(principalName); - return this; - } - /** * Get the objectId property: Object identifier of the Microsoft Entra principal. * @@ -155,20 +125,6 @@ public String objectId() { return this.innerProperties() == null ? null : this.innerProperties().objectId(); } - /** - * Set the objectId property: Object identifier of the Microsoft Entra principal. - * - * @param objectId the objectId value to set. - * @return the AdministratorMicrosoftEntraInner object itself. - */ - public AdministratorMicrosoftEntraInner withObjectId(String objectId) { - if (this.innerProperties() == null) { - this.innerProperties = new AdministratorMicrosoftEntraProperties(); - } - this.innerProperties().withObjectId(objectId); - return this; - } - /** * Get the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * @@ -178,37 +134,6 @@ public String tenantId() { return this.innerProperties() == null ? null : this.innerProperties().tenantId(); } - /** - * Set the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. - * - * @param tenantId the tenantId value to set. - * @return the AdministratorMicrosoftEntraInner object itself. - */ - public AdministratorMicrosoftEntraInner withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new AdministratorMicrosoftEntraProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model AdministratorMicrosoftEntraInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AdministratorMicrosoftEntraInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraProperties.java index dde7c8d7e3f1..cd1013d614a5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Properties of a server administrator associated to a Microsoft Entra principal. */ -@Fluent +@Immutable public final class AdministratorMicrosoftEntraProperties implements JsonSerializable { /* @@ -41,7 +41,7 @@ public final class AdministratorMicrosoftEntraProperties /** * Creates an instance of AdministratorMicrosoftEntraProperties class. */ - public AdministratorMicrosoftEntraProperties() { + private AdministratorMicrosoftEntraProperties() { } /** @@ -54,18 +54,6 @@ public PrincipalType principalType() { return this.principalType; } - /** - * Set the principalType property: Type of Microsoft Entra principal to which the server administrator is - * associated. - * - * @param principalType the principalType value to set. - * @return the AdministratorMicrosoftEntraProperties object itself. - */ - public AdministratorMicrosoftEntraProperties withPrincipalType(PrincipalType principalType) { - this.principalType = principalType; - return this; - } - /** * Get the principalName property: Name of the Microsoft Entra principal. * @@ -75,17 +63,6 @@ public String principalName() { return this.principalName; } - /** - * Set the principalName property: Name of the Microsoft Entra principal. - * - * @param principalName the principalName value to set. - * @return the AdministratorMicrosoftEntraProperties object itself. - */ - public AdministratorMicrosoftEntraProperties withPrincipalName(String principalName) { - this.principalName = principalName; - return this; - } - /** * Get the objectId property: Object identifier of the Microsoft Entra principal. * @@ -95,17 +72,6 @@ public String objectId() { return this.objectId; } - /** - * Set the objectId property: Object identifier of the Microsoft Entra principal. - * - * @param objectId the objectId value to set. - * @return the AdministratorMicrosoftEntraProperties object itself. - */ - public AdministratorMicrosoftEntraProperties withObjectId(String objectId) { - this.objectId = objectId; - return this; - } - /** * Get the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. * @@ -115,25 +81,6 @@ public String tenantId() { return this.tenantId; } - /** - * Set the tenantId property: Identifier of the tenant in which the Microsoft Entra principal exists. - * - * @param tenantId the tenantId value to set. - * @return the AdministratorMicrosoftEntraProperties object itself. - */ - public AdministratorMicrosoftEntraProperties withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraPropertiesForAdd.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraPropertiesForAdd.java index b3d07d0961d7..9b9959bb2d03 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraPropertiesForAdd.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraPropertiesForAdd.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; @@ -101,14 +101,6 @@ public AdministratorMicrosoftEntraPropertiesForAdd withTenantId(String tenantId) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsModelInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsModelInner.java index af5f78e234d0..0a20c57f3e2d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsModelInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsModelInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; @@ -132,17 +132,6 @@ public OffsetDateTime creationTime() { return this.innerProperties() == null ? null : this.innerProperties().creationTime(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsProperties.java index 29152e888bab..eba468e8bacc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsProperties.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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; @@ -69,21 +68,6 @@ public OffsetDateTime creationTime() { return this.creationTime; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property state in model AdvancedThreatProtectionSettingsProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AdvancedThreatProtectionSettingsProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandInner.java index 6c96f2cf0abd..2f2ca89d9c86 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -17,7 +17,7 @@ /** * Properties of a backup. */ -@Fluent +@Immutable public final class BackupAutomaticAndOnDemandInner extends ProxyResource { /* * Properties of a backup. @@ -47,7 +47,7 @@ public final class BackupAutomaticAndOnDemandInner extends ProxyResource { /** * Creates an instance of BackupAutomaticAndOnDemandInner class. */ - public BackupAutomaticAndOnDemandInner() { + private BackupAutomaticAndOnDemandInner() { } /** @@ -107,20 +107,6 @@ public BackupType backupType() { return this.innerProperties() == null ? null : this.innerProperties().backupType(); } - /** - * Set the backupType property: Type of backup. - * - * @param backupType the backupType value to set. - * @return the BackupAutomaticAndOnDemandInner object itself. - */ - public BackupAutomaticAndOnDemandInner withBackupType(BackupType backupType) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupAutomaticAndOnDemandProperties(); - } - this.innerProperties().withBackupType(backupType); - return this; - } - /** * Get the completedTime property: Time(ISO8601 format) at which the backup was completed. * @@ -130,20 +116,6 @@ public OffsetDateTime completedTime() { return this.innerProperties() == null ? null : this.innerProperties().completedTime(); } - /** - * Set the completedTime property: Time(ISO8601 format) at which the backup was completed. - * - * @param completedTime the completedTime value to set. - * @return the BackupAutomaticAndOnDemandInner object itself. - */ - public BackupAutomaticAndOnDemandInner withCompletedTime(OffsetDateTime completedTime) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupAutomaticAndOnDemandProperties(); - } - this.innerProperties().withCompletedTime(completedTime); - return this; - } - /** * Get the source property: Source of the backup. * @@ -153,31 +125,6 @@ public String source() { return this.innerProperties() == null ? null : this.innerProperties().source(); } - /** - * Set the source property: Source of the backup. - * - * @param source the source value to set. - * @return the BackupAutomaticAndOnDemandInner object itself. - */ - public BackupAutomaticAndOnDemandInner withSource(String source) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupAutomaticAndOnDemandProperties(); - } - this.innerProperties().withSource(source); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandProperties.java index b561fc68c263..c33ec0e50018 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -18,7 +18,7 @@ /** * Properties of a backup. */ -@Fluent +@Immutable public final class BackupAutomaticAndOnDemandProperties implements JsonSerializable { /* @@ -39,7 +39,7 @@ public final class BackupAutomaticAndOnDemandProperties /** * Creates an instance of BackupAutomaticAndOnDemandProperties class. */ - public BackupAutomaticAndOnDemandProperties() { + private BackupAutomaticAndOnDemandProperties() { } /** @@ -51,17 +51,6 @@ public BackupType backupType() { return this.backupType; } - /** - * Set the backupType property: Type of backup. - * - * @param backupType the backupType value to set. - * @return the BackupAutomaticAndOnDemandProperties object itself. - */ - public BackupAutomaticAndOnDemandProperties withBackupType(BackupType backupType) { - this.backupType = backupType; - return this; - } - /** * Get the completedTime property: Time(ISO8601 format) at which the backup was completed. * @@ -71,17 +60,6 @@ public OffsetDateTime completedTime() { return this.completedTime; } - /** - * Set the completedTime property: Time(ISO8601 format) at which the backup was completed. - * - * @param completedTime the completedTime value to set. - * @return the BackupAutomaticAndOnDemandProperties object itself. - */ - public BackupAutomaticAndOnDemandProperties withCompletedTime(OffsetDateTime completedTime) { - this.completedTime = completedTime; - return this; - } - /** * Get the source property: Source of the backup. * @@ -91,25 +69,6 @@ public String source() { return this.source; } - /** - * Set the source property: Source of the backup. - * - * @param source the source value to set. - * @return the BackupAutomaticAndOnDemandProperties object itself. - */ - public BackupAutomaticAndOnDemandProperties withSource(String source) { - this.source = source; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionOperationInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionOperationInner.java index 4f94e69ffe54..5747bcc98a00 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionOperationInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionOperationInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -17,7 +17,7 @@ /** * Response for the LTR backup Operation API call. */ -@Fluent +@Immutable public final class BackupsLongTermRetentionOperationInner extends ProxyResource { /* * Long Term Retention Backup Operation Resource Properties @@ -47,7 +47,7 @@ public final class BackupsLongTermRetentionOperationInner extends ProxyResource /** * Creates an instance of BackupsLongTermRetentionOperationInner class. */ - public BackupsLongTermRetentionOperationInner() { + private BackupsLongTermRetentionOperationInner() { } /** @@ -107,20 +107,6 @@ public Long datasourceSizeInBytes() { return this.innerProperties() == null ? null : this.innerProperties().datasourceSizeInBytes(); } - /** - * Set the datasourceSizeInBytes property: Size of datasource in bytes. - * - * @param datasourceSizeInBytes the datasourceSizeInBytes value to set. - * @return the BackupsLongTermRetentionOperationInner object itself. - */ - public BackupsLongTermRetentionOperationInner withDatasourceSizeInBytes(Long datasourceSizeInBytes) { - if (this.innerProperties() == null) { - this.innerProperties = new LtrBackupOperationResponseProperties(); - } - this.innerProperties().withDatasourceSizeInBytes(datasourceSizeInBytes); - return this; - } - /** * Get the dataTransferredInBytes property: Data transferred in bytes. * @@ -130,20 +116,6 @@ public Long dataTransferredInBytes() { return this.innerProperties() == null ? null : this.innerProperties().dataTransferredInBytes(); } - /** - * Set the dataTransferredInBytes property: Data transferred in bytes. - * - * @param dataTransferredInBytes the dataTransferredInBytes value to set. - * @return the BackupsLongTermRetentionOperationInner object itself. - */ - public BackupsLongTermRetentionOperationInner withDataTransferredInBytes(Long dataTransferredInBytes) { - if (this.innerProperties() == null) { - this.innerProperties = new LtrBackupOperationResponseProperties(); - } - this.innerProperties().withDataTransferredInBytes(dataTransferredInBytes); - return this; - } - /** * Get the backupName property: Name of Backup operation. * @@ -153,20 +125,6 @@ public String backupName() { return this.innerProperties() == null ? null : this.innerProperties().backupName(); } - /** - * Set the backupName property: Name of Backup operation. - * - * @param backupName the backupName value to set. - * @return the BackupsLongTermRetentionOperationInner object itself. - */ - public BackupsLongTermRetentionOperationInner withBackupName(String backupName) { - if (this.innerProperties() == null) { - this.innerProperties = new LtrBackupOperationResponseProperties(); - } - this.innerProperties().withBackupName(backupName); - return this; - } - /** * Get the backupMetadata property: 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. @@ -177,21 +135,6 @@ public String backupMetadata() { return this.innerProperties() == null ? null : this.innerProperties().backupMetadata(); } - /** - * Set the backupMetadata property: 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. - * - * @param backupMetadata the backupMetadata value to set. - * @return the BackupsLongTermRetentionOperationInner object itself. - */ - public BackupsLongTermRetentionOperationInner withBackupMetadata(String backupMetadata) { - if (this.innerProperties() == null) { - this.innerProperties = new LtrBackupOperationResponseProperties(); - } - this.innerProperties().withBackupMetadata(backupMetadata); - return this; - } - /** * Get the status property: Service-set extensible enum indicating the status of operation. * @@ -201,20 +144,6 @@ public ExecutionStatus status() { return this.innerProperties() == null ? null : this.innerProperties().status(); } - /** - * Set the status property: Service-set extensible enum indicating the status of operation. - * - * @param status the status value to set. - * @return the BackupsLongTermRetentionOperationInner object itself. - */ - public BackupsLongTermRetentionOperationInner withStatus(ExecutionStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new LtrBackupOperationResponseProperties(); - } - this.innerProperties().withStatus(status); - return this; - } - /** * Get the startTime property: Start time of the operation. * @@ -224,20 +153,6 @@ public OffsetDateTime startTime() { return this.innerProperties() == null ? null : this.innerProperties().startTime(); } - /** - * Set the startTime property: Start time of the operation. - * - * @param startTime the startTime value to set. - * @return the BackupsLongTermRetentionOperationInner object itself. - */ - public BackupsLongTermRetentionOperationInner withStartTime(OffsetDateTime startTime) { - if (this.innerProperties() == null) { - this.innerProperties = new LtrBackupOperationResponseProperties(); - } - this.innerProperties().withStartTime(startTime); - return this; - } - /** * Get the endTime property: End time of the operation. * @@ -247,20 +162,6 @@ public OffsetDateTime endTime() { return this.innerProperties() == null ? null : this.innerProperties().endTime(); } - /** - * Set the endTime property: End time of the operation. - * - * @param endTime the endTime value to set. - * @return the BackupsLongTermRetentionOperationInner object itself. - */ - public BackupsLongTermRetentionOperationInner withEndTime(OffsetDateTime endTime) { - if (this.innerProperties() == null) { - this.innerProperties = new LtrBackupOperationResponseProperties(); - } - this.innerProperties().withEndTime(endTime); - return this; - } - /** * Get the percentComplete property: PercentageCompleted. * @@ -270,20 +171,6 @@ public Double percentComplete() { return this.innerProperties() == null ? null : this.innerProperties().percentComplete(); } - /** - * Set the percentComplete property: PercentageCompleted. - * - * @param percentComplete the percentComplete value to set. - * @return the BackupsLongTermRetentionOperationInner object itself. - */ - public BackupsLongTermRetentionOperationInner withPercentComplete(Double percentComplete) { - if (this.innerProperties() == null) { - this.innerProperties = new LtrBackupOperationResponseProperties(); - } - this.innerProperties().withPercentComplete(percentComplete); - return this; - } - /** * Get the errorCode property: The error code. * @@ -302,17 +189,6 @@ public String errorMessage() { return this.innerProperties() == null ? null : this.innerProperties().errorMessage(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseInner.java index 32d4bb4b95ef..3c28a2a46e85 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * Response for the LTR backup API call. */ -@Fluent +@Immutable public final class BackupsLongTermRetentionResponseInner implements JsonSerializable { /* @@ -27,7 +27,7 @@ public final class BackupsLongTermRetentionResponseInner /** * Creates an instance of BackupsLongTermRetentionResponseInner class. */ - public BackupsLongTermRetentionResponseInner() { + private BackupsLongTermRetentionResponseInner() { } /** @@ -48,20 +48,6 @@ public Long datasourceSizeInBytes() { return this.innerProperties() == null ? null : this.innerProperties().datasourceSizeInBytes(); } - /** - * Set the datasourceSizeInBytes property: Size of datasource in bytes. - * - * @param datasourceSizeInBytes the datasourceSizeInBytes value to set. - * @return the BackupsLongTermRetentionResponseInner object itself. - */ - public BackupsLongTermRetentionResponseInner withDatasourceSizeInBytes(Long datasourceSizeInBytes) { - if (this.innerProperties() == null) { - this.innerProperties = new LtrBackupOperationResponseProperties(); - } - this.innerProperties().withDatasourceSizeInBytes(datasourceSizeInBytes); - return this; - } - /** * Get the dataTransferredInBytes property: Data transferred in bytes. * @@ -71,20 +57,6 @@ public Long dataTransferredInBytes() { return this.innerProperties() == null ? null : this.innerProperties().dataTransferredInBytes(); } - /** - * Set the dataTransferredInBytes property: Data transferred in bytes. - * - * @param dataTransferredInBytes the dataTransferredInBytes value to set. - * @return the BackupsLongTermRetentionResponseInner object itself. - */ - public BackupsLongTermRetentionResponseInner withDataTransferredInBytes(Long dataTransferredInBytes) { - if (this.innerProperties() == null) { - this.innerProperties = new LtrBackupOperationResponseProperties(); - } - this.innerProperties().withDataTransferredInBytes(dataTransferredInBytes); - return this; - } - /** * Get the backupName property: Name of Backup operation. * @@ -94,20 +66,6 @@ public String backupName() { return this.innerProperties() == null ? null : this.innerProperties().backupName(); } - /** - * Set the backupName property: Name of Backup operation. - * - * @param backupName the backupName value to set. - * @return the BackupsLongTermRetentionResponseInner object itself. - */ - public BackupsLongTermRetentionResponseInner withBackupName(String backupName) { - if (this.innerProperties() == null) { - this.innerProperties = new LtrBackupOperationResponseProperties(); - } - this.innerProperties().withBackupName(backupName); - return this; - } - /** * Get the backupMetadata property: 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. @@ -118,21 +76,6 @@ public String backupMetadata() { return this.innerProperties() == null ? null : this.innerProperties().backupMetadata(); } - /** - * Set the backupMetadata property: 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. - * - * @param backupMetadata the backupMetadata value to set. - * @return the BackupsLongTermRetentionResponseInner object itself. - */ - public BackupsLongTermRetentionResponseInner withBackupMetadata(String backupMetadata) { - if (this.innerProperties() == null) { - this.innerProperties = new LtrBackupOperationResponseProperties(); - } - this.innerProperties().withBackupMetadata(backupMetadata); - return this; - } - /** * Get the status property: Service-set extensible enum indicating the status of operation. * @@ -142,20 +85,6 @@ public ExecutionStatus status() { return this.innerProperties() == null ? null : this.innerProperties().status(); } - /** - * Set the status property: Service-set extensible enum indicating the status of operation. - * - * @param status the status value to set. - * @return the BackupsLongTermRetentionResponseInner object itself. - */ - public BackupsLongTermRetentionResponseInner withStatus(ExecutionStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new LtrBackupOperationResponseProperties(); - } - this.innerProperties().withStatus(status); - return this; - } - /** * Get the startTime property: Start time of the operation. * @@ -165,20 +94,6 @@ public OffsetDateTime startTime() { return this.innerProperties() == null ? null : this.innerProperties().startTime(); } - /** - * Set the startTime property: Start time of the operation. - * - * @param startTime the startTime value to set. - * @return the BackupsLongTermRetentionResponseInner object itself. - */ - public BackupsLongTermRetentionResponseInner withStartTime(OffsetDateTime startTime) { - if (this.innerProperties() == null) { - this.innerProperties = new LtrBackupOperationResponseProperties(); - } - this.innerProperties().withStartTime(startTime); - return this; - } - /** * Get the endTime property: End time of the operation. * @@ -188,20 +103,6 @@ public OffsetDateTime endTime() { return this.innerProperties() == null ? null : this.innerProperties().endTime(); } - /** - * Set the endTime property: End time of the operation. - * - * @param endTime the endTime value to set. - * @return the BackupsLongTermRetentionResponseInner object itself. - */ - public BackupsLongTermRetentionResponseInner withEndTime(OffsetDateTime endTime) { - if (this.innerProperties() == null) { - this.innerProperties = new LtrBackupOperationResponseProperties(); - } - this.innerProperties().withEndTime(endTime); - return this; - } - /** * Get the percentComplete property: PercentageCompleted. * @@ -211,20 +112,6 @@ public Double percentComplete() { return this.innerProperties() == null ? null : this.innerProperties().percentComplete(); } - /** - * Set the percentComplete property: PercentageCompleted. - * - * @param percentComplete the percentComplete value to set. - * @return the BackupsLongTermRetentionResponseInner object itself. - */ - public BackupsLongTermRetentionResponseInner withPercentComplete(Double percentComplete) { - if (this.innerProperties() == null) { - this.innerProperties = new LtrBackupOperationResponseProperties(); - } - this.innerProperties().withPercentComplete(percentComplete); - return this; - } - /** * Get the errorCode property: The error code. * @@ -243,17 +130,6 @@ public String errorMessage() { return this.innerProperties() == null ? null : this.innerProperties().errorMessage(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseProperties.java index 07b7ac197ff5..c625e30e10ee 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Response for the pre-backup request. */ -@Fluent +@Immutable public final class BackupsLongTermRetentionResponseProperties implements JsonSerializable { /* @@ -26,7 +26,7 @@ public final class BackupsLongTermRetentionResponseProperties /** * Creates an instance of BackupsLongTermRetentionResponseProperties class. */ - public BackupsLongTermRetentionResponseProperties() { + private BackupsLongTermRetentionResponseProperties() { } /** @@ -39,26 +39,6 @@ public int numberOfContainers() { return this.numberOfContainers; } - /** - * Set the numberOfContainers property: Number of storage containers the plugin will use during backup. More than - * one containers may be used for size limitations, parallelism, or redundancy etc. - * - * @param numberOfContainers the numberOfContainers value to set. - * @return the BackupsLongTermRetentionResponseProperties object itself. - */ - public BackupsLongTermRetentionResponseProperties withNumberOfContainers(int numberOfContainers) { - this.numberOfContainers = numberOfContainers; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapabilityInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapabilityInner.java index 150a4fed23bc..68c39c764223 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapabilityInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapabilityInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -27,7 +27,7 @@ /** * Capability for the Azure Database for PostgreSQL flexible server. */ -@Fluent +@Immutable public final class CapabilityInner extends CapabilityBase { /* * Name of flexible servers capabilities. @@ -119,7 +119,7 @@ public final class CapabilityInner extends CapabilityBase { /** * Creates an instance of CapabilityInner class. */ - public CapabilityInner() { + private CapabilityInner() { } /** @@ -131,17 +131,6 @@ public String name() { return this.name; } - /** - * Set the name property: Name of flexible servers capabilities. - * - * @param name the name value to set. - * @return the CapabilityInner object itself. - */ - public CapabilityInner withName(String name) { - this.name = name; - return this; - } - /** * Get the supportedServerEditions property: List of supported compute tiers. * @@ -281,27 +270,6 @@ public CapabilityStatus status() { return this.status; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (supportedServerEditions() != null) { - supportedServerEditions().forEach(e -> e.validate()); - } - if (supportedServerVersions() != null) { - supportedServerVersions().forEach(e -> e.validate()); - } - if (supportedFeatures() != null) { - supportedFeatures().forEach(e -> e.validate()); - } - if (supportedFastProvisioningEditions() != null) { - supportedFastProvisioningEditions().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogInner.java index 3937ff2cf034..a9e6c31eab9a 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * Log file. */ -@Fluent +@Immutable public final class CapturedLogInner extends ProxyResource { /* * Properties of a log file. @@ -46,7 +46,7 @@ public final class CapturedLogInner extends ProxyResource { /** * Creates an instance of CapturedLogInner class. */ - public CapturedLogInner() { + private CapturedLogInner() { } /** @@ -106,20 +106,6 @@ public OffsetDateTime createdTime() { return this.innerProperties() == null ? null : this.innerProperties().createdTime(); } - /** - * Set the createdTime property: Creation timestamp of the log file. - * - * @param createdTime the createdTime value to set. - * @return the CapturedLogInner object itself. - */ - public CapturedLogInner withCreatedTime(OffsetDateTime createdTime) { - if (this.innerProperties() == null) { - this.innerProperties = new CapturedLogProperties(); - } - this.innerProperties().withCreatedTime(createdTime); - return this; - } - /** * Get the lastModifiedTime property: Last modified timestamp of the log file. * @@ -129,20 +115,6 @@ public OffsetDateTime lastModifiedTime() { return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTime(); } - /** - * Set the lastModifiedTime property: Last modified timestamp of the log file. - * - * @param lastModifiedTime the lastModifiedTime value to set. - * @return the CapturedLogInner object itself. - */ - public CapturedLogInner withLastModifiedTime(OffsetDateTime lastModifiedTime) { - if (this.innerProperties() == null) { - this.innerProperties = new CapturedLogProperties(); - } - this.innerProperties().withLastModifiedTime(lastModifiedTime); - return this; - } - /** * Get the sizeInKb property: Size (in KB) of the log file. * @@ -152,20 +124,6 @@ public Long sizeInKb() { return this.innerProperties() == null ? null : this.innerProperties().sizeInKb(); } - /** - * Set the sizeInKb property: Size (in KB) of the log file. - * - * @param sizeInKb the sizeInKb value to set. - * @return the CapturedLogInner object itself. - */ - public CapturedLogInner withSizeInKb(Long sizeInKb) { - if (this.innerProperties() == null) { - this.innerProperties = new CapturedLogProperties(); - } - this.innerProperties().withSizeInKb(sizeInKb); - return this; - } - /** * Get the type property: Type of log file. Can be 'ServerLogs' or 'UpgradeLogs'. * @@ -175,20 +133,6 @@ public String typePropertiesType() { return this.innerProperties() == null ? null : this.innerProperties().type(); } - /** - * Set the type property: Type of log file. Can be 'ServerLogs' or 'UpgradeLogs'. - * - * @param type the type value to set. - * @return the CapturedLogInner object itself. - */ - public CapturedLogInner withTypePropertiesType(String type) { - if (this.innerProperties() == null) { - this.innerProperties = new CapturedLogProperties(); - } - this.innerProperties().withType(type); - return this; - } - /** * Get the url property: URL to download the log file from. * @@ -198,31 +142,6 @@ public String url() { return this.innerProperties() == null ? null : this.innerProperties().url(); } - /** - * Set the url property: URL to download the log file from. - * - * @param url the url value to set. - * @return the CapturedLogInner object itself. - */ - public CapturedLogInner withUrl(String url) { - if (this.innerProperties() == null) { - this.innerProperties = new CapturedLogProperties(); - } - this.innerProperties().withUrl(url); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogProperties.java index 68ddc394e666..ee11633bee10 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * Properties of a log file. */ -@Fluent +@Immutable public final class CapturedLogProperties implements JsonSerializable { /* * Creation timestamp of the log file. @@ -47,7 +47,7 @@ public final class CapturedLogProperties implements JsonSerializable { /* @@ -76,7 +75,7 @@ public final class LtrBackupOperationResponseProperties /** * Creates an instance of LtrBackupOperationResponseProperties class. */ - public LtrBackupOperationResponseProperties() { + private LtrBackupOperationResponseProperties() { } /** @@ -88,17 +87,6 @@ public Long datasourceSizeInBytes() { return this.datasourceSizeInBytes; } - /** - * Set the datasourceSizeInBytes property: Size of datasource in bytes. - * - * @param datasourceSizeInBytes the datasourceSizeInBytes value to set. - * @return the LtrBackupOperationResponseProperties object itself. - */ - public LtrBackupOperationResponseProperties withDatasourceSizeInBytes(Long datasourceSizeInBytes) { - this.datasourceSizeInBytes = datasourceSizeInBytes; - return this; - } - /** * Get the dataTransferredInBytes property: Data transferred in bytes. * @@ -108,17 +96,6 @@ public Long dataTransferredInBytes() { return this.dataTransferredInBytes; } - /** - * Set the dataTransferredInBytes property: Data transferred in bytes. - * - * @param dataTransferredInBytes the dataTransferredInBytes value to set. - * @return the LtrBackupOperationResponseProperties object itself. - */ - public LtrBackupOperationResponseProperties withDataTransferredInBytes(Long dataTransferredInBytes) { - this.dataTransferredInBytes = dataTransferredInBytes; - return this; - } - /** * Get the backupName property: Name of Backup operation. * @@ -128,17 +105,6 @@ public String backupName() { return this.backupName; } - /** - * Set the backupName property: Name of Backup operation. - * - * @param backupName the backupName value to set. - * @return the LtrBackupOperationResponseProperties object itself. - */ - public LtrBackupOperationResponseProperties withBackupName(String backupName) { - this.backupName = backupName; - return this; - } - /** * Get the backupMetadata property: 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. @@ -149,18 +115,6 @@ public String backupMetadata() { return this.backupMetadata; } - /** - * Set the backupMetadata property: 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. - * - * @param backupMetadata the backupMetadata value to set. - * @return the LtrBackupOperationResponseProperties object itself. - */ - public LtrBackupOperationResponseProperties withBackupMetadata(String backupMetadata) { - this.backupMetadata = backupMetadata; - return this; - } - /** * Get the status property: Service-set extensible enum indicating the status of operation. * @@ -170,17 +124,6 @@ public ExecutionStatus status() { return this.status; } - /** - * Set the status property: Service-set extensible enum indicating the status of operation. - * - * @param status the status value to set. - * @return the LtrBackupOperationResponseProperties object itself. - */ - public LtrBackupOperationResponseProperties withStatus(ExecutionStatus status) { - this.status = status; - return this; - } - /** * Get the startTime property: Start time of the operation. * @@ -190,17 +133,6 @@ public OffsetDateTime startTime() { return this.startTime; } - /** - * Set the startTime property: Start time of the operation. - * - * @param startTime the startTime value to set. - * @return the LtrBackupOperationResponseProperties object itself. - */ - public LtrBackupOperationResponseProperties withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - /** * Get the endTime property: End time of the operation. * @@ -210,17 +142,6 @@ public OffsetDateTime endTime() { return this.endTime; } - /** - * Set the endTime property: End time of the operation. - * - * @param endTime the endTime value to set. - * @return the LtrBackupOperationResponseProperties object itself. - */ - public LtrBackupOperationResponseProperties withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - /** * Get the percentComplete property: PercentageCompleted. * @@ -230,17 +151,6 @@ public Double percentComplete() { return this.percentComplete; } - /** - * Set the percentComplete property: PercentageCompleted. - * - * @param percentComplete the percentComplete value to set. - * @return the LtrBackupOperationResponseProperties object itself. - */ - public LtrBackupOperationResponseProperties withPercentComplete(Double percentComplete) { - this.percentComplete = percentComplete; - return this; - } - /** * Get the errorCode property: The error code. * @@ -259,26 +169,6 @@ public String errorMessage() { return this.errorMessage; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (status() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property status in model LtrBackupOperationResponseProperties")); - } - if (startTime() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property startTime in model LtrBackupOperationResponseProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(LtrBackupOperationResponseProperties.class); - /** * {@inheritDoc} */ 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 e91943531cfb..461e1f49d73f 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,18 +14,17 @@ /** * Response for the LTR pre-backup API call. */ -@Fluent +@Immutable public final class LtrPreBackupResponseInner implements JsonSerializable { /* * Additional Properties for the pre backup response */ - private BackupsLongTermRetentionResponseProperties innerProperties - = new BackupsLongTermRetentionResponseProperties(); + private BackupsLongTermRetentionResponseProperties innerProperties; /** * Creates an instance of LtrPreBackupResponseInner class. */ - public LtrPreBackupResponseInner() { + private LtrPreBackupResponseInner() { } /** @@ -48,38 +46,6 @@ public int numberOfContainers() { return this.innerProperties() == null ? 0 : this.innerProperties().numberOfContainers(); } - /** - * Set the numberOfContainers property: Number of storage containers the plugin will use during backup. More than - * one containers may be used for size limitations, parallelism, or redundancy etc. - * - * @param numberOfContainers the numberOfContainers value to set. - * @return the LtrPreBackupResponseInner object itself. - */ - public LtrPreBackupResponseInner withNumberOfContainers(int numberOfContainers) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupsLongTermRetentionResponseProperties(); - } - this.innerProperties().withNumberOfContainers(numberOfContainers); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property innerProperties in model LtrPreBackupResponseInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(LtrPreBackupResponseInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrateNetworkStatusInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrateNetworkStatusInner.java new file mode 100644 index 000000000000..b07192a3db6d --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrateNetworkStatusInner.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +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.NetworkMigrationState; +import java.io.IOException; + +/** + * The status of a network migration operation. + */ +@Immutable +public final class MigrateNetworkStatusInner implements JsonSerializable { + /* + * The ID of the subscription. + */ + private String subscriptionId; + + /* + * The name of the resource group. + */ + private String resourceGroupName; + + /* + * The name of the server. + */ + private String serverName; + + /* + * The state of the network migration operation. + */ + private NetworkMigrationState state; + + /** + * Creates an instance of MigrateNetworkStatusInner class. + */ + private MigrateNetworkStatusInner() { + } + + /** + * Get the subscriptionId property: The ID of the subscription. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Get the resourceGroupName property: The name of the resource group. + * + * @return the resourceGroupName value. + */ + public String resourceGroupName() { + return this.resourceGroupName; + } + + /** + * Get the serverName property: The name of the server. + * + * @return the serverName value. + */ + public String serverName() { + return this.serverName; + } + + /** + * Get the state property: The state of the network migration operation. + * + * @return the state value. + */ + public NetworkMigrationState state() { + return this.state; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("subscriptionId", this.subscriptionId); + jsonWriter.writeStringField("resourceGroupName", this.resourceGroupName); + jsonWriter.writeStringField("serverName", this.serverName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MigrateNetworkStatusInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MigrateNetworkStatusInner 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 MigrateNetworkStatusInner. + */ + public static MigrateNetworkStatusInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MigrateNetworkStatusInner deserializedMigrateNetworkStatusInner = new MigrateNetworkStatusInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("subscriptionId".equals(fieldName)) { + deserializedMigrateNetworkStatusInner.subscriptionId = reader.getString(); + } else if ("resourceGroupName".equals(fieldName)) { + deserializedMigrateNetworkStatusInner.resourceGroupName = reader.getString(); + } else if ("serverName".equals(fieldName)) { + deserializedMigrateNetworkStatusInner.serverName = reader.getString(); + } else if ("state".equals(fieldName)) { + deserializedMigrateNetworkStatusInner.state = NetworkMigrationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedMigrateNetworkStatusInner; + }); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationInner.java index 89b54cae524b..831c99d09f36 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; @@ -668,17 +668,6 @@ public MigrationInner withDbsToCancelMigrationOn(List dbsToCancelMigrati return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityInner.java index dc056ff9a338..7a3c0b879029 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityInner.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; 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; @@ -116,26 +115,6 @@ public String message() { return this.message; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property name in model MigrationNameAvailabilityInner")); - } - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property type in model MigrationNameAvailabilityInner")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MigrationNameAvailabilityInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationProperties.java index e8ac145fd536..972ebe0daaa2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; @@ -653,26 +653,6 @@ public MigrationProperties withDbsToCancelMigrationOn(List dbsToCancelMi return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (currentStatus() != null) { - currentStatus().validate(); - } - if (sourceDbServerMetadata() != null) { - sourceDbServerMetadata().validate(); - } - if (targetDbServerMetadata() != null) { - targetDbServerMetadata().validate(); - } - if (secretParameters() != null) { - secretParameters().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationPropertiesForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationPropertiesForPatch.java index d007027b3586..a855697c434d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationPropertiesForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationPropertiesForPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; @@ -441,17 +441,6 @@ public MigrationPropertiesForPatch withMigrationMode(MigrationMode migrationMode return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (secretParameters() != null) { - secretParameters().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityModelInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityModelInner.java index 28e549e74dc0..c65d0adad78f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityModelInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityModelInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -15,7 +15,7 @@ /** * Availability of a name. */ -@Fluent +@Immutable public final class NameAvailabilityModelInner extends CheckNameAvailabilityResponse { /* * Name for which validity and availability was checked. @@ -28,10 +28,25 @@ public final class NameAvailabilityModelInner extends CheckNameAvailabilityRespo */ private String type; + /* + * Detailed reason why the given name is not available. + */ + private String message; + + /* + * The reason why the given name is not available. + */ + private CheckNameAvailabilityReason reason; + + /* + * Indicates if the resource name is available. + */ + private Boolean nameAvailable; + /** * Creates an instance of NameAvailabilityModelInner class. */ - public NameAvailabilityModelInner() { + private NameAvailabilityModelInner() { } /** @@ -54,39 +69,33 @@ public String type() { } /** - * {@inheritDoc} - */ - @Override - public NameAvailabilityModelInner withNameAvailable(Boolean nameAvailable) { - super.withNameAvailable(nameAvailable); - return this; - } - - /** - * {@inheritDoc} + * Get the message property: Detailed reason why the given name is not available. + * + * @return the message value. */ @Override - public NameAvailabilityModelInner withReason(CheckNameAvailabilityReason reason) { - super.withReason(reason); - return this; + public String message() { + return this.message; } /** - * {@inheritDoc} + * Get the reason property: The reason why the given name is not available. + * + * @return the reason value. */ @Override - public NameAvailabilityModelInner withMessage(String message) { - super.withMessage(message); - return this; + public CheckNameAvailabilityReason reason() { + return this.reason; } /** - * Validates the instance. + * Get the nameAvailable property: Indicates if the resource name is available. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nameAvailable value. */ @Override - public void validate() { + public Boolean nameAvailable() { + return this.nameAvailable; } /** @@ -117,13 +126,12 @@ public static NameAvailabilityModelInner fromJson(JsonReader jsonReader) throws reader.nextToken(); if ("nameAvailable".equals(fieldName)) { - deserializedNameAvailabilityModelInner - .withNameAvailable(reader.getNullable(JsonReader::getBoolean)); + deserializedNameAvailabilityModelInner.nameAvailable = reader.getNullable(JsonReader::getBoolean); } else if ("reason".equals(fieldName)) { - deserializedNameAvailabilityModelInner - .withReason(CheckNameAvailabilityReason.fromString(reader.getString())); + deserializedNameAvailabilityModelInner.reason + = CheckNameAvailabilityReason.fromString(reader.getString()); } else if ("message".equals(fieldName)) { - deserializedNameAvailabilityModelInner.withMessage(reader.getString()); + deserializedNameAvailabilityModelInner.message = reader.getString(); } else if ("name".equals(fieldName)) { deserializedNameAvailabilityModelInner.name = reader.getString(); } else if ("type".equals(fieldName)) { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationInner.java index 4e5d34938ce7..416f94154ece 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -22,7 +22,7 @@ /** * Object recommendation properties. */ -@Fluent +@Immutable public final class ObjectRecommendationInner extends ProxyResource { /* * Always empty. @@ -57,7 +57,7 @@ public final class ObjectRecommendationInner extends ProxyResource { /** * Creates an instance of ObjectRecommendationInner class. */ - public ObjectRecommendationInner() { + private ObjectRecommendationInner() { } /** @@ -69,17 +69,6 @@ public String kind() { return this.kind; } - /** - * Set the kind property: Always empty. - * - * @param kind the kind value to set. - * @return the ObjectRecommendationInner object itself. - */ - public ObjectRecommendationInner withKind(String kind) { - this.kind = kind; - return this; - } - /** * Get the innerProperties property: Properties of an object recommendation. * @@ -228,17 +217,6 @@ public ObjectRecommendationDetails details() { return this.innerProperties() == null ? null : this.innerProperties().details(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationProperties.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationProperties.java index 44b677e06031..663902f3c1b9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationProperties.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -23,7 +23,7 @@ /** * Object recommendation properties. */ -@Fluent +@Immutable public final class ObjectRecommendationProperties implements JsonSerializable { /* * Creation time (UTC) of this recommendation. @@ -84,7 +84,7 @@ public final class ObjectRecommendationProperties implements JsonSerializable improvedQueryIds() { return this.improvedQueryIds; } - /** - * Set the improvedQueryIds property: List of identifiers for all queries identified as targets for improvement if - * the recommendation is applied. The list is only populated for CREATE INDEX recommendations. - * - * @param improvedQueryIds the improvedQueryIds value to set. - * @return the ObjectRecommendationProperties object itself. - */ - public ObjectRecommendationProperties withImprovedQueryIds(List improvedQueryIds) { - this.improvedQueryIds = improvedQueryIds; - return this; - } - /** * Get the recommendationReason property: Reason for this recommendation. * @@ -178,17 +133,6 @@ public String recommendationReason() { return this.recommendationReason; } - /** - * Set the recommendationReason property: Reason for this recommendation. - * - * @param recommendationReason the recommendationReason value to set. - * @return the ObjectRecommendationProperties object itself. - */ - public ObjectRecommendationProperties withRecommendationReason(String recommendationReason) { - this.recommendationReason = recommendationReason; - return this; - } - /** * Get the currentState property: Current state. * @@ -198,17 +142,6 @@ public String currentState() { return this.currentState; } - /** - * Set the currentState property: Current state. - * - * @param currentState the currentState value to set. - * @return the ObjectRecommendationProperties object itself. - */ - public ObjectRecommendationProperties withCurrentState(String currentState) { - this.currentState = currentState; - return this; - } - /** * Get the recommendationType property: Type for this recommendation. * @@ -218,17 +151,6 @@ public RecommendationTypeEnum recommendationType() { return this.recommendationType; } - /** - * Set the recommendationType property: Type for this recommendation. - * - * @param recommendationType the recommendationType value to set. - * @return the ObjectRecommendationProperties object itself. - */ - public ObjectRecommendationProperties withRecommendationType(RecommendationTypeEnum recommendationType) { - this.recommendationType = recommendationType; - return this; - } - /** * Get the implementationDetails property: Implementation details for the recommended action. * @@ -238,18 +160,6 @@ public ObjectRecommendationPropertiesImplementationDetails implementationDetails return this.implementationDetails; } - /** - * Set the implementationDetails property: Implementation details for the recommended action. - * - * @param implementationDetails the implementationDetails value to set. - * @return the ObjectRecommendationProperties object itself. - */ - public ObjectRecommendationProperties - withImplementationDetails(ObjectRecommendationPropertiesImplementationDetails implementationDetails) { - this.implementationDetails = implementationDetails; - return this; - } - /** * Get the analyzedWorkload property: Workload information for the recommended action. * @@ -259,18 +169,6 @@ public ObjectRecommendationPropertiesAnalyzedWorkload analyzedWorkload() { return this.analyzedWorkload; } - /** - * Set the analyzedWorkload property: Workload information for the recommended action. - * - * @param analyzedWorkload the analyzedWorkload value to set. - * @return the ObjectRecommendationProperties object itself. - */ - public ObjectRecommendationProperties - withAnalyzedWorkload(ObjectRecommendationPropertiesAnalyzedWorkload analyzedWorkload) { - this.analyzedWorkload = analyzedWorkload; - return this; - } - /** * Get the estimatedImpact property: Estimated impact of this recommended action. * @@ -289,26 +187,6 @@ public ObjectRecommendationDetails details() { return this.details; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (implementationDetails() != null) { - implementationDetails().validate(); - } - if (analyzedWorkload() != null) { - analyzedWorkload().validate(); - } - if (estimatedImpact() != null) { - estimatedImpact().forEach(e -> e.validate()); - } - if (details() != null) { - details().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationInner.java index 9dc4d6666ee2..933b5c1fa0db 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,7 +17,7 @@ /** * REST API operation definition. */ -@Fluent +@Immutable public final class OperationInner implements JsonSerializable { /* * Name of the operation being performed on this particular object. @@ -47,7 +47,7 @@ public final class OperationInner implements JsonSerializable { /** * Creates an instance of OperationInner class. */ - public OperationInner() { + private OperationInner() { } /** @@ -77,17 +77,6 @@ public Boolean isDataAction() { return this.isDataAction; } - /** - * Set the isDataAction property: Indicates if the operation is a data action. - * - * @param isDataAction the isDataAction value to set. - * @return the OperationInner object itself. - */ - public OperationInner withIsDataAction(Boolean isDataAction) { - this.isDataAction = isDataAction; - return this; - } - /** * Get the origin property: Intended executor of the operation. * @@ -106,17 +95,6 @@ public Map properties() { return this.properties; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } - /** * {@inheritDoc} */ 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 552be83a6fb4..6c4c665c12b9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; @@ -167,17 +167,6 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 6eec6c882044..557572ba0392 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; 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; @@ -109,26 +108,6 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { return this.provisioningState; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property privateLinkServiceConnectionState in model PrivateEndpointConnectionProperties")); - } else { - privateLinkServiceConnectionState().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); - /** * {@inheritDoc} */ 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 6d7d16f405db..ba54e64c1aef 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * A private link resource. */ -@Fluent +@Immutable public final class PrivateLinkResourceInner extends ProxyResource { /* * Resource properties. @@ -46,7 +46,7 @@ public final class PrivateLinkResourceInner extends ProxyResource { /** * Creates an instance of PrivateLinkResourceInner class. */ - public PrivateLinkResourceInner() { + private PrivateLinkResourceInner() { } /** @@ -124,31 +124,6 @@ public List requiredZoneNames() { return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); } - /** - * Set the requiredZoneNames property: The private link resource private link DNS zone name. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResourceInner object itself. - */ - public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateLinkResourceProperties(); - } - this.innerProperties().withRequiredZoneNames(requiredZoneNames); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 034019a0998d..82293438b3a6 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Properties of a private link resource. */ -@Fluent +@Immutable public final class PrivateLinkResourceProperties implements JsonSerializable { /* * The private link resource group id. @@ -35,7 +35,7 @@ public final class PrivateLinkResourceProperties implements JsonSerializable requiredZoneNames() { return this.requiredZoneNames; } - /** - * Set the requiredZoneNames property: The private link resource private link DNS zone name. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResourceProperties object itself. - */ - public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) { - this.requiredZoneNames = requiredZoneNames; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index 01b158981902..33b341fa11e2 100644 --- 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Quota usage for servers. */ -@Fluent +@Immutable public final class QuotaUsageInner implements JsonSerializable { /* * Name of quota usage for servers @@ -45,7 +45,7 @@ public final class QuotaUsageInner implements JsonSerializable /** * Creates an instance of QuotaUsageInner class. */ - public QuotaUsageInner() { + private QuotaUsageInner() { } /** @@ -57,17 +57,6 @@ public NameProperty name() { return this.name; } - /** - * Set the name property: Name of quota usage for 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. * @@ -77,17 +66,6 @@ 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. * @@ -97,17 +75,6 @@ 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. * @@ -117,17 +84,6 @@ 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. * @@ -137,28 +93,6 @@ 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(); - } - } - /** * {@inheritDoc} */ 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 701e2c5b2eac..50d7e43d9ea5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; @@ -35,6 +35,11 @@ */ @Fluent public final class ServerInner extends Resource { + /* + * Properties of a server. + */ + private ServerProperties innerProperties; + /* * Compute tier and size of a server. */ @@ -45,11 +50,6 @@ public final class ServerInner extends Resource { */ private UserAssignedIdentity identity; - /* - * Properties of a server. - */ - private ServerProperties innerProperties; - /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @@ -76,6 +76,15 @@ public final class ServerInner extends Resource { public ServerInner() { } + /** + * Get the innerProperties property: Properties of a server. + * + * @return the innerProperties value. + */ + private ServerProperties innerProperties() { + return this.innerProperties; + } + /** * Get the sku property: Compute tier and size of a server. * @@ -116,15 +125,6 @@ public ServerInner withIdentity(UserAssignedIdentity identity) { return this; } - /** - * Get the innerProperties property: Properties of a server. - * - * @return the innerProperties value. - */ - private ServerProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -639,23 +639,6 @@ public ServerInner withCluster(Cluster cluster) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -664,9 +647,9 @@ 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); jsonWriter.writeJsonField("sku", this.sku); jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } @@ -697,12 +680,12 @@ public static ServerInner fromJson(JsonReader jsonReader) throws IOException { } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedServerInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedServerInner.innerProperties = ServerProperties.fromJson(reader); } 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 { 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 0bef5b2a3f7d..54ca2887dc97 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; @@ -563,44 +563,6 @@ public ServerProperties withCluster(Cluster cluster) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storage() != null) { - storage().validate(); - } - if (authConfig() != null) { - authConfig().validate(); - } - if (dataEncryption() != null) { - dataEncryption().validate(); - } - if (backup() != null) { - backup().validate(); - } - if (network() != null) { - network().validate(); - } - if (highAvailability() != null) { - highAvailability().validate(); - } - if (maintenanceWindow() != null) { - maintenanceWindow().validate(); - } - if (replica() != null) { - replica().validate(); - } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - if (cluster() != null) { - cluster().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForPatch.java index 16860e56eaa6..7d0a560228a9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; @@ -127,21 +127,6 @@ public String administratorLogin() { return this.administratorLogin; } - /** - * Set the administratorLogin property: Name of the login designated as the first password based administrator - * assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based - * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. - * If you disable password based authentication on a server which had it enabled, this password based role isn't - * deleted. - * - * @param administratorLogin the administratorLogin value to set. - * @return the ServerPropertiesForPatch object itself. - */ - public ServerPropertiesForPatch withAdministratorLogin(String administratorLogin) { - this.administratorLogin = administratorLogin; - return this; - } - /** * Get the administratorLoginPassword property: Password assigned to the administrator login. As long as password * authentication is enabled, this password can be changed at any time. @@ -428,48 +413,12 @@ public ServerPropertiesForPatch withCluster(Cluster cluster) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storage() != null) { - storage().validate(); - } - if (backup() != null) { - backup().validate(); - } - if (highAvailability() != null) { - highAvailability().validate(); - } - if (maintenanceWindow() != null) { - maintenanceWindow().validate(); - } - if (authConfig() != null) { - authConfig().validate(); - } - if (dataEncryption() != null) { - dataEncryption().validate(); - } - if (replica() != null) { - replica().validate(); - } - if (network() != null) { - network().validate(); - } - if (cluster() != null) { - cluster().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); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsInner.java index f893a71d410d..613677f30302 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; @@ -40,7 +40,7 @@ public final class TuningOptionsInner extends ProxyResource { /** * Creates an instance of TuningOptionsInner class. */ - public TuningOptionsInner() { + private TuningOptionsInner() { } /** @@ -82,14 +82,6 @@ public String id() { return this.id; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointInner.java index 073bec2147ab..ed3e20db7b17 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointInner.java @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; 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.VirtualEndpointResourceForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; import java.io.IOException; import java.util.List; @@ -18,32 +18,31 @@ * Pair of virtual endpoints for a server. */ @Fluent -public final class VirtualEndpointInner extends VirtualEndpointResourceForPatch { +public final class VirtualEndpointInner extends ProxyResource { /* - * Fully qualified resource ID for the resource. E.g. - * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + * Properties of the pair of virtual endpoints. */ - private String id; + private VirtualEndpointResourceProperties innerProperties; /* - * The name of the resource + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private String name; + private SystemData systemData; /* - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * The type of the resource. */ private String type; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * The name of the resource. */ - private SystemData systemData; + private String name; /* - * Properties of the pair of virtual endpoints. + * Fully qualified resource Id for the resource. */ - private VirtualEndpointResourceProperties innerProperties; + private String id; /** * Creates an instance of VirtualEndpointInner class. @@ -52,50 +51,51 @@ public VirtualEndpointInner() { } /** - * Get the id property: Fully qualified resource ID for the resource. E.g. - * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + * Get the innerProperties property: Properties of the pair of virtual endpoints. * - * @return the id value. + * @return the innerProperties value. */ - public String id() { - return this.id; + private VirtualEndpointResourceProperties innerProperties() { + return this.innerProperties; } /** - * Get the name property: The name of the resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the name value. + * @return the systemData value. */ - public String name() { - return this.name; + public SystemData systemData() { + return this.systemData; } /** - * Get the type property: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - * "Microsoft.Storage/storageAccounts". + * Get the type property: The type of the resource. * * @return the type value. */ + @Override public String type() { return this.type; } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the name property: The name of the resource. * - * @return the systemData value. + * @return the name value. */ - public SystemData systemData() { - return this.systemData; + @Override + public String name() { + return this.name; } /** - * Get the innerProperties property: Properties of the pair of virtual endpoints. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the innerProperties value. + * @return the id value. */ - private VirtualEndpointResourceProperties innerProperties() { - return this.innerProperties; + @Override + public String id() { + return this.id; } /** @@ -153,25 +153,13 @@ public List virtualEndpoints() { return this.innerProperties() == null ? null : this.innerProperties().virtualEndpoints(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", innerProperties()); + jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } @@ -181,6 +169,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of VirtualEndpointInner 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 VirtualEndpointInner. */ public static VirtualEndpointInner fromJson(JsonReader jsonReader) throws IOException { @@ -190,15 +179,15 @@ public static VirtualEndpointInner fromJson(JsonReader jsonReader) throws IOExce String fieldName = reader.getFieldName(); reader.nextToken(); - if ("properties".equals(fieldName)) { - deserializedVirtualEndpointInner.innerProperties - = VirtualEndpointResourceProperties.fromJson(reader); - } else if ("id".equals(fieldName)) { + if ("id".equals(fieldName)) { deserializedVirtualEndpointInner.id = reader.getString(); } else if ("name".equals(fieldName)) { deserializedVirtualEndpointInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedVirtualEndpointInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedVirtualEndpointInner.innerProperties + = VirtualEndpointResourceProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedVirtualEndpointInner.systemData = SystemData.fromJson(reader); } else { 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 81db8514fae6..ac2de121dc51 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; @@ -88,14 +88,6 @@ public List virtualEndpoints() { return this.virtualEndpoints; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageModelInner.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageModelInner.java index 27a4225b8f8f..c2e8a456197b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageModelInner.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageModelInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.fluent.models; @@ -37,7 +37,7 @@ public final class VirtualNetworkSubnetUsageModelInner /** * Creates an instance of VirtualNetworkSubnetUsageModelInner class. */ - public VirtualNetworkSubnetUsageModelInner() { + private VirtualNetworkSubnetUsageModelInner() { } /** @@ -67,17 +67,6 @@ public String subscriptionId() { return this.subscriptionId; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (delegatedSubnetsUsage() != null) { - delegatedSubnetsUsage().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 6e2e9736124e..2e5fddfb2769 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 @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for PostgreSqlManagementClient. + * Package containing the inner data models for PostgreSql. * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure * PostgreSQL resources including servers, databases, firewall rules, network configuration, 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 441c2b6e546f..507be5b5b021 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 @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for PostgreSqlManagementClient. + * Package containing the service clients for PostgreSql. * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure * PostgreSQL resources including servers, databases, firewall rules, network configuration, 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/AdministratorMicrosoftEntraImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorMicrosoftEntraImpl.java index 9002b1279e22..db1d6ddd47af 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorMicrosoftEntraImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorMicrosoftEntraImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -93,7 +93,6 @@ public AdministratorMicrosoftEntra create(Context context) { AdministratorMicrosoftEntraImpl(String name, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerObject = new AdministratorMicrosoftEntraInner(); this.serviceManager = serviceManager; this.objectId = name; this.createParameters = new AdministratorMicrosoftEntraAdd(); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasClientImpl.java index a1a044dc5454..e43e4e6cd189 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -30,13 +30,12 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.AdministratorMicrosoftEntraList; import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraAdd; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -70,72 +69,70 @@ public final class AdministratorsMicrosoftEntrasClientImpl implements Administra * The interface defining all the services for PostgreSqlManagementClientAdministratorsMicrosoftEntras to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientAdministratorsMicrosoftEntras") public interface AdministratorsMicrosoftEntrasService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("objectId") String objectId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AdministratorMicrosoftEntraAdd parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("objectId") String objectId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("objectId") String objectId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AdministratorMicrosoftEntraAdd parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("objectId") String objectId, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") - @ExpectedResponses({ 202, 204 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("objectId") String objectId, @HeaderParam("Accept") String accept, Context context); + @PathParam("objectId") String objectId, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") AdministratorMicrosoftEntraAdd parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") - @ExpectedResponses({ 202, 204 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("objectId") String objectId, @HeaderParam("Accept") String accept, Context context); + @PathParam("objectId") String objectId, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") AdministratorMicrosoftEntraAdd parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("objectId") String objectId, @HeaderParam("Accept") String accept, Context context); + @PathParam("objectId") String objectId, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("objectId") String objectId, @HeaderParam("Accept") String accept, Context context); + @PathParam("objectId") String objectId, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -144,7 +141,7 @@ Mono> listByServer(@HostParam("$host") @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -154,7 +151,7 @@ Response listByServerSync(@HostParam("$host") S @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -162,10 +159,88 @@ Mono> listByServerNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets information about a server administrator associated to a Microsoft Entra principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @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 information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String objectId) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, objectId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about a server administrator associated to a Microsoft Entra principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @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 information about a server administrator associated to a Microsoft Entra principal on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, + String objectId) { + return getWithResponseAsync(resourceGroupName, serverName, objectId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about a server administrator associated to a Microsoft Entra principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @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 information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + String objectId, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, objectId, accept, context); + } + + /** + * Gets information about a server administrator associated to a Microsoft Entra principal. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param objectId Object identifier of the Microsoft Entra principal. + * @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 information about a server administrator associated to a Microsoft Entra principal. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AdministratorMicrosoftEntraInner get(String resourceGroupName, String serverName, String objectId) { + return getWithResponse(resourceGroupName, serverName, objectId, Context.NONE).getValue(); + } + /** * Creates a new server administrator associated to a Microsoft Entra principal. * @@ -177,39 +252,16 @@ Response listByServerNextSync( * @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 administrator associated to a Microsoft Entra principal along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, String objectId, AdministratorMicrosoftEntraAdd parameters) { - 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 (objectId == null) { - return Mono.error(new IllegalArgumentException("Parameter objectId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, serverName, objectId, this.client.getApiVersion(), parameters, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, objectId, contentType, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -224,42 +276,15 @@ public Mono>> createOrUpdateWithResponseAsync(String r * @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 administrator associated to a Microsoft Entra principal along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, String objectId, AdministratorMicrosoftEntraAdd parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (objectId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter objectId is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - serverName, objectId, this.client.getApiVersion(), parameters, accept, Context.NONE); + final String contentType = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, objectId, contentType, parameters, + Context.NONE); } /** @@ -274,42 +299,14 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @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 administrator associated to a Microsoft Entra principal along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, String objectId, AdministratorMicrosoftEntraAdd parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (objectId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter objectId is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - serverName, objectId, this.client.getApiVersion(), parameters, accept, context); + final String contentType = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, objectId, contentType, parameters, context); } /** @@ -323,7 +320,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @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 administrator associated to a Microsoft Entra principal. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, AdministratorMicrosoftEntraInner> @@ -347,7 +344,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @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 administrator associated to a Microsoft Entra principal. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AdministratorMicrosoftEntraInner> @@ -370,7 +367,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @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 administrator associated to a Microsoft Entra principal. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AdministratorMicrosoftEntraInner> @@ -393,7 +390,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @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 administrator associated to a Microsoft Entra principal on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync(String resourceGroupName, String serverName, @@ -413,7 +410,7 @@ public Mono createOrUpdateAsync(String resourc * @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 administrator associated to a Microsoft Entra principal. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AdministratorMicrosoftEntraInner createOrUpdate(String resourceGroupName, String serverName, String objectId, @@ -433,7 +430,7 @@ public AdministratorMicrosoftEntraInner createOrUpdate(String resourceGroupName, * @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 administrator associated to a Microsoft Entra principal. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AdministratorMicrosoftEntraInner createOrUpdate(String resourceGroupName, String serverName, String objectId, @@ -455,28 +452,9 @@ public AdministratorMicrosoftEntraInner createOrUpdate(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, String objectId) { - 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 (objectId == null) { - return Mono.error(new IllegalArgumentException("Parameter objectId 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, objectId, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, serverName, objectId, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -493,31 +471,8 @@ public Mono>> deleteWithResponseAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String serverName, String objectId) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (objectId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter objectId is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, objectId, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, serverName, objectId, Context.NONE); } /** @@ -535,31 +490,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String serverName, String objectId, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (objectId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter objectId is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, objectId, accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, objectId, context); } /** @@ -666,124 +598,6 @@ public void delete(String resourceGroupName, String serverName, String objectId, beginDelete(resourceGroupName, serverName, objectId, context).getFinalResult(); } - /** - * Gets information about a server administrator associated to a Microsoft Entra principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param objectId Object identifier of the Microsoft Entra principal. - * @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 information about a server administrator associated to a Microsoft Entra principal along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, String objectId) { - 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 (objectId == null) { - return Mono.error(new IllegalArgumentException("Parameter objectId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, objectId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets information about a server administrator associated to a Microsoft Entra principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param objectId Object identifier of the Microsoft Entra principal. - * @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 information about a server administrator associated to a Microsoft Entra principal on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - String objectId) { - return getWithResponseAsync(resourceGroupName, serverName, objectId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets information about a server administrator associated to a Microsoft Entra principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param objectId Object identifier of the Microsoft Entra principal. - * @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 information about a server administrator associated to a Microsoft Entra principal along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String objectId, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (objectId == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter objectId is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, objectId, accept, context); - } - - /** - * Gets information about a server administrator associated to a Microsoft Entra principal. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param objectId Object identifier of the Microsoft Entra principal. - * @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 information about a server administrator associated to a Microsoft Entra principal. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AdministratorMicrosoftEntraInner get(String resourceGroupName, String serverName, String objectId) { - return getWithResponse(resourceGroupName, serverName, objectId, Context.NONE).getValue(); - } - /** * List all server administrators associated to a Microsoft Entra principal. * @@ -798,21 +612,6 @@ public AdministratorMicrosoftEntraInner get(String resourceGroupName, String ser @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), @@ -852,24 +651,6 @@ public PagedFlux listByServerAsync(String reso @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -892,24 +673,6 @@ private PagedResponse listByServerSinglePage(S @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -966,13 +729,6 @@ public PagedIterable listByServer(String resou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(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.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -992,15 +748,6 @@ private Mono> listByServerNextSi */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1021,21 +768,10 @@ private PagedResponse listByServerNextSinglePa @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(AdministratorsMicrosoftEntrasClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasImpl.java index ad0480a8602a..c94b1da023de 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -27,14 +27,6 @@ public AdministratorsMicrosoftEntrasImpl(AdministratorsMicrosoftEntrasClient inn this.serviceManager = serviceManager; } - public void delete(String resourceGroupName, String serverName, String objectId) { - this.serviceClient().delete(resourceGroupName, serverName, objectId); - } - - public void delete(String resourceGroupName, String serverName, String objectId, Context context) { - this.serviceClient().delete(resourceGroupName, serverName, objectId, context); - } - public Response getWithResponse(String resourceGroupName, String serverName, String objectId, Context context) { Response inner @@ -56,6 +48,14 @@ public AdministratorMicrosoftEntra get(String resourceGroupName, String serverNa } } + public void delete(String resourceGroupName, String serverName, String objectId) { + this.serviceClient().delete(resourceGroupName, serverName, objectId); + } + + public void delete(String resourceGroupName, String serverName, String objectId, Context context) { + this.serviceClient().delete(resourceGroupName, serverName, objectId, context); + } + public PagedIterable listByServer(String resourceGroupName, String serverName) { PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java index 4a369110d748..e8031b081d87 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -25,10 +25,9 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.AdvancedThreatProtectionSettingsList; import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; import reactor.core.publisher.Mono; @@ -61,45 +60,45 @@ public final class AdvancedThreatProtectionSettingsClientImpl implements Advance * The interface defining all the services for PostgreSqlManagementClientAdvancedThreatProtectionSettings to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientAdvancedThreatProtectionSettings") public interface AdvancedThreatProtectionSettingsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -107,7 +106,7 @@ Response getSync(@HostParam("$host") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -115,10 +114,87 @@ Mono> listByServerNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets state of advanced threat protection settings for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @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 state of advanced threat protection settings for a server along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, ThreatProtectionName threatProtectionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, threatProtectionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets state of advanced threat protection settings for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @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 state of advanced threat protection settings for a server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName) { + return getWithResponseAsync(resourceGroupName, serverName, threatProtectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets state of advanced threat protection settings for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @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 state of advanced threat protection settings for a server along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String serverName, ThreatProtectionName threatProtectionName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, threatProtectionName, accept, context); + } + + /** + * Gets state of advanced threat protection settings for a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @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 state of advanced threat protection settings for a server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AdvancedThreatProtectionSettingsModelInner get(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName) { + return getWithResponse(resourceGroupName, serverName, threatProtectionName, Context.NONE).getValue(); + } + /** * Lists state of advanced threat protection settings for a server. * @@ -133,21 +209,6 @@ Response listByServerNextSync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), @@ -188,24 +249,6 @@ public PagedFlux listByServerAsync(S @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -228,24 +271,6 @@ private PagedResponse listByServerSi @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -291,124 +316,6 @@ public PagedIterable listByServer(St nextLink -> listByServerNextSinglePage(nextLink, context)); } - /** - * Gets state of advanced threat protection settings for a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName Name of the advanced threat protection settings. - * @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 state of advanced threat protection settings for a server along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, - String serverName, ThreatProtectionName threatProtectionName) { - 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 (threatProtectionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter threatProtectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, threatProtectionName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets state of advanced threat protection settings for a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName Name of the advanced threat protection settings. - * @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 state of advanced threat protection settings for a server on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName) { - return getWithResponseAsync(resourceGroupName, serverName, threatProtectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets state of advanced threat protection settings for a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName Name of the advanced threat protection settings. - * @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 state of advanced threat protection settings for a server along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String serverName, ThreatProtectionName threatProtectionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (threatProtectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter threatProtectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, threatProtectionName, accept, context); - } - - /** - * Gets state of advanced threat protection settings for a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param threatProtectionName Name of the advanced threat protection settings. - * @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 state of advanced threat protection settings for a server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AdvancedThreatProtectionSettingsModelInner get(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName) { - return getWithResponse(resourceGroupName, serverName, threatProtectionName, Context.NONE).getValue(); - } - /** * Get the next page of items. * @@ -422,13 +329,6 @@ public AdvancedThreatProtectionSettingsModelInner get(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(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.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -449,15 +349,6 @@ public AdvancedThreatProtectionSettingsModelInner get(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -478,21 +369,10 @@ private PagedResponse listByServerNe @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(AdvancedThreatProtectionSettingsClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java index 174ac265df78..dba20ff9a407 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -28,22 +28,6 @@ public AdvancedThreatProtectionSettingsImpl(AdvancedThreatProtectionSettingsClie this.serviceManager = serviceManager; } - public PagedIterable listByServer(String resourceGroupName, - String serverName) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new AdvancedThreatProtectionSettingsModelImpl(inner1, this.manager())); - } - - public PagedIterable listByServer(String resourceGroupName, - String serverName, Context context) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new AdvancedThreatProtectionSettingsModelImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, Context context) { Response inner @@ -67,6 +51,22 @@ public AdvancedThreatProtectionSettingsModel get(String resourceGroupName, Strin } } + public PagedIterable listByServer(String resourceGroupName, + String serverName) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AdvancedThreatProtectionSettingsModelImpl(inner1, this.manager())); + } + + public PagedIterable listByServer(String resourceGroupName, + String serverName, Context context) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AdvancedThreatProtectionSettingsModelImpl(inner1, this.manager())); + } + private AdvancedThreatProtectionSettingsClient serviceClient() { return this.innerClient; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsModelImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsModelImpl.java index 9813c7ab40bd..aaaf4914073e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsModelImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsModelImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupAutomaticAndOnDemandImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupAutomaticAndOnDemandImpl.java index 4371cfeaffb3..15b6ef6e41c3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupAutomaticAndOnDemandImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupAutomaticAndOnDemandImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsClientImpl.java index caedea6a7443..e646574811a5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -29,12 +29,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemandList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.BackupAutomaticAndOnDemandList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -68,68 +67,68 @@ public final class BackupsAutomaticAndOnDemandsClientImpl implements BackupsAuto * The interface defining all the services for PostgreSqlManagementClientBackupsAutomaticAndOnDemands to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientBackupsAutomaticAndOnDemands") public interface BackupsAutomaticAndOnDemandsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") 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" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") 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 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") 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); + @PathParam("backupName") String backupName, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") - @ExpectedResponses({ 202, 204 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response createSync(@HostParam("endpoint") 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); + @PathParam("backupName") String backupName, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") 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); + @PathParam("backupName") String backupName, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups/{backupName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") 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); + @PathParam("backupName") String backupName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -138,7 +137,7 @@ Mono> listByServer(@HostParam("$host") @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/backups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -148,7 +147,7 @@ Response listByServerSync(@HostParam("$host") St @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -156,10 +155,86 @@ Mono> listByServerNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets information of an on demand backup, given its name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName 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 information of an on demand backup, given its name along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String serverName, String backupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information of an on demand backup, given its name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName 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 information of an on demand backup, given its name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, + String backupName) { + return getWithResponseAsync(resourceGroupName, serverName, backupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information of an on demand backup, given its name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName 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 information of an on demand backup, given its name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, backupName, accept, context); + } + + /** + * Gets information of an on demand backup, given its name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param backupName 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 information of an on demand backup, given its name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupAutomaticAndOnDemandInner get(String resourceGroupName, String serverName, String backupName) { + return getWithResponse(resourceGroupName, serverName, backupName, Context.NONE).getValue(); + } + /** * Creates an on demand backup of a server. * @@ -169,33 +244,14 @@ Response listByServerNextSync( * @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 properties of a backup along with {@link Response} on successful completion of {@link Mono}. + * @return the {@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)) + this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -208,35 +264,12 @@ public Mono>> createWithResponseAsync(String resourceG * @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 properties of a backup along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, String backupName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (backupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - final String accept = "application/json"; return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, Context.NONE); } /** @@ -249,36 +282,13 @@ private Response createWithResponse(String resourceGroupName, String * @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 properties of a backup along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, String backupName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (backupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - final String accept = "application/json"; return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, context); } /** @@ -290,7 +300,7 @@ private Response createWithResponse(String resourceGroupName, String * @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 properties of a backup. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, BackupAutomaticAndOnDemandInner> @@ -310,7 +320,7 @@ private Response createWithResponse(String resourceGroupName, String * @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 properties of a backup. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BackupAutomaticAndOnDemandInner> @@ -330,7 +340,7 @@ private Response createWithResponse(String resourceGroupName, String * @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 properties of a backup. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BackupAutomaticAndOnDemandInner> @@ -349,7 +359,7 @@ private Response createWithResponse(String resourceGroupName, String * @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 properties of a backup on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createAsync(String resourceGroupName, String serverName, @@ -367,7 +377,7 @@ public Mono createAsync(String resourceGroupNam * @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 properties of a backup. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public BackupAutomaticAndOnDemandInner create(String resourceGroupName, String serverName, String backupName) { @@ -384,7 +394,7 @@ public BackupAutomaticAndOnDemandInner create(String resourceGroupName, String s * @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 properties of a backup. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public BackupAutomaticAndOnDemandInner create(String resourceGroupName, String serverName, String backupName, @@ -406,28 +416,9 @@ public BackupAutomaticAndOnDemandInner create(String resourceGroupName, String s @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)) + this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -444,31 +435,8 @@ public Mono>> deleteWithResponseAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String serverName, String backupName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (backupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, Context.NONE); } /** @@ -486,31 +454,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String serverName, String backupName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (backupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, context); } /** @@ -617,122 +562,6 @@ public void delete(String resourceGroupName, String serverName, String backupNam beginDelete(resourceGroupName, serverName, backupName, context).getFinalResult(); } - /** - * Gets information of an on demand backup, given its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param backupName 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 information of an on demand backup, given its name along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(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.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets information of an on demand backup, given its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param backupName 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 information of an on demand backup, given its name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - String backupName) { - return getWithResponseAsync(resourceGroupName, serverName, backupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets information of an on demand backup, given its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param backupName 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 information of an on demand backup, given its name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String backupName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (backupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, backupName, accept, context); - } - - /** - * Gets information of an on demand backup, given its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param backupName 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 information of an on demand backup, given its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupAutomaticAndOnDemandInner get(String resourceGroupName, String serverName, String backupName) { - return getWithResponse(resourceGroupName, serverName, backupName, Context.NONE).getValue(); - } - /** * Lists all available backups of a server. * @@ -746,21 +575,6 @@ public BackupAutomaticAndOnDemandInner get(String resourceGroupName, String serv @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), @@ -799,24 +613,6 @@ public PagedFlux listByServerAsync(String resou @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -839,24 +635,6 @@ private PagedResponse listByServerSinglePage(St @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -910,13 +688,6 @@ public PagedIterable listByServer(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(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.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -936,15 +707,6 @@ private Mono> listByServerNextSin */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -965,21 +727,10 @@ private PagedResponse listByServerNextSinglePag @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(BackupsAutomaticAndOnDemandsClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsImpl.java index f9b38ae12f73..fb597a63c93c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -27,6 +27,27 @@ public BackupsAutomaticAndOnDemandsImpl(BackupsAutomaticAndOnDemandsClient inner this.serviceManager = serviceManager; } + public Response getWithResponse(String resourceGroupName, String serverName, + String backupName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, serverName, backupName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BackupAutomaticAndOnDemandImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BackupAutomaticAndOnDemand get(String resourceGroupName, String serverName, String backupName) { + BackupAutomaticAndOnDemandInner inner = this.serviceClient().get(resourceGroupName, serverName, backupName); + if (inner != null) { + return new BackupAutomaticAndOnDemandImpl(inner, this.manager()); + } else { + return null; + } + } + public BackupAutomaticAndOnDemand create(String resourceGroupName, String serverName, String backupName) { BackupAutomaticAndOnDemandInner inner = this.serviceClient().create(resourceGroupName, serverName, backupName); if (inner != null) { @@ -55,27 +76,6 @@ public void delete(String resourceGroupName, String serverName, String backupNam this.serviceClient().delete(resourceGroupName, serverName, backupName, context); } - public Response getWithResponse(String resourceGroupName, String serverName, - String backupName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, serverName, backupName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BackupAutomaticAndOnDemandImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BackupAutomaticAndOnDemand get(String resourceGroupName, String serverName, String backupName) { - BackupAutomaticAndOnDemandInner inner = this.serviceClient().get(resourceGroupName, serverName, backupName); - if (inner != null) { - return new BackupAutomaticAndOnDemandImpl(inner, this.manager()); - } else { - return null; - } - } - public PagedIterable listByServer(String resourceGroupName, String serverName) { PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionOperationImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionOperationImpl.java index 20ef8392797f..1faa6e4baa89 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionOperationImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionOperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionResponseImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionResponseImpl.java index 758fa7f59f9c..326d9d0d11f4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionResponseImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsClientImpl.java index 68f41477848b..fb83176776d4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -29,17 +29,16 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseInner; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.LtrServerBackupOperationList; import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionRequest; import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionsCheckPrerequisitesResponse; import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest; -import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrServerBackupOperationList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -73,55 +72,52 @@ public final class BackupsLongTermRetentionsClientImpl implements BackupsLongTer * The interface defining all the services for PostgreSqlManagementClientBackupsLongTermRetentions to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientBackupsLongTermRetentions") public interface BackupsLongTermRetentionsService { - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrPreBackup") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono checkPrerequisites( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") LtrPreBackupRequest parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") LtrPreBackupRequest parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrPreBackup") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - BackupsLongTermRetentionsCheckPrerequisitesResponse checkPrerequisitesSync(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + BackupsLongTermRetentionsCheckPrerequisitesResponse checkPrerequisitesSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") LtrPreBackupRequest parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") LtrPreBackupRequest parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/startLtrBackup") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start(@HostParam("$host") String endpoint, + Mono>> start(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") BackupsLongTermRetentionRequest parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BackupsLongTermRetentionRequest parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/startLtrBackup") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response startSync(@HostParam("$host") String endpoint, + Response startSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") BackupsLongTermRetentionRequest parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BackupsLongTermRetentionRequest parameters, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations/{backupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") 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); @@ -130,7 +126,7 @@ Mono> get(@HostParam("$host") S @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations/{backupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") 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); @@ -139,7 +135,7 @@ Response getSync(@HostParam("$host") Str @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -148,7 +144,7 @@ Mono> listByServer(@HostParam("$host") St @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/ltrBackupOperations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -158,7 +154,7 @@ Response listByServerSync(@HostParam("$host") Stri @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -166,7 +162,7 @@ Mono> listByServerNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -184,30 +180,12 @@ Response listByServerNextSync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono checkPrerequisitesWithResponseAsync( String resourceGroupName, String serverName, LtrPreBackupRequest parameters) { - 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.checkPrerequisites(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, accept, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -244,33 +222,10 @@ public Mono checkPrerequisitesAsync(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) public BackupsLongTermRetentionsCheckPrerequisitesResponse checkPrerequisitesWithResponse(String resourceGroupName, String serverName, LtrPreBackupRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.checkPrerequisitesSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, accept, parameters, context); } /** @@ -305,30 +260,10 @@ public LtrPreBackupResponseInner checkPrerequisites(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> startWithResponseAsync(String resourceGroupName, String serverName, BackupsLongTermRetentionRequest parameters) { - 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) + return FluxUtil.withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -346,33 +281,11 @@ public Mono>> startWithResponseAsync(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) private Response startWithResponse(String resourceGroupName, String serverName, BackupsLongTermRetentionRequest parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, accept, parameters, + Context.NONE); } /** @@ -390,33 +303,10 @@ private Response startWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response startWithResponse(String resourceGroupName, String serverName, BackupsLongTermRetentionRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, accept, parameters, context); } /** @@ -549,24 +439,6 @@ public BackupsLongTermRetentionResponseInner start(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(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.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -607,28 +479,6 @@ public Mono getAsync(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String serverName, String backupName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (backupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, backupName, accept, context); @@ -664,21 +514,6 @@ public BackupsLongTermRetentionOperationInner get(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), @@ -718,24 +553,6 @@ public PagedFlux listByServerAsync(Strin @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -758,24 +575,6 @@ private PagedResponse listByServerSingle @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -834,13 +633,6 @@ public PagedIterable listByServer(String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(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.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -860,15 +652,6 @@ public PagedIterable listByServer(String */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -889,21 +672,10 @@ private PagedResponse listByServerNextSi @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(BackupsLongTermRetentionsClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsImpl.java index fd27af9d207d..4b0c36e6d4e2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsClientImpl.java index 6b5f3f1a4270..fa000453dd4b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -25,10 +25,9 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByLocationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.CapabilityList; import reactor.core.publisher.Mono; /** @@ -60,14 +59,14 @@ public final class CapabilitiesByLocationsClientImpl implements CapabilitiesByLo * The interface defining all the services for PostgreSqlManagementClientCapabilitiesByLocations to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientCapabilitiesByLocations") public interface CapabilitiesByLocationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/capabilities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); @@ -75,7 +74,7 @@ Mono> list(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/capabilities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); @@ -84,14 +83,14 @@ Response listSync(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -106,17 +105,6 @@ Response listNextSync(@PathParam(value = "nextLink", encoded = t */ @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(), @@ -153,20 +141,6 @@ public PagedFlux listAsync(String locationName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String locationName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (locationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, accept, Context.NONE); @@ -187,20 +161,6 @@ private PagedResponse listSinglePage(String locationName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String locationName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (locationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, accept, context); @@ -252,13 +212,6 @@ public PagedIterable list(String locationName, Context context) */ @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(), @@ -278,15 +231,6 @@ private Mono> listNextSinglePageAsync(String next */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -306,20 +250,9 @@ private PagedResponse listNextSinglePage(String nextLink) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(CapabilitiesByLocationsClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsImpl.java index 3df41838a13e..f56ea5e88718 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersClientImpl.java index 0e5181f21366..6a8d01823e3e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -25,10 +25,9 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByServersClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.CapabilityList; import reactor.core.publisher.Mono; /** @@ -60,14 +59,14 @@ public final class CapabilitiesByServersClientImpl implements CapabilitiesByServ * The interface defining all the services for PostgreSqlManagementClientCapabilitiesByServers to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientCapabilitiesByServers") public interface CapabilitiesByServersService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/capabilities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -76,7 +75,7 @@ Mono> list(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/capabilities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -86,14 +85,14 @@ Response listSync(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -109,21 +108,6 @@ Response listNextSync(@PathParam(value = "nextLink", encoded = t */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String serverName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -163,24 +147,6 @@ public PagedFlux listAsync(String resourceGroupName, String ser */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); @@ -203,24 +169,6 @@ private PagedResponse listSinglePage(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); @@ -275,13 +223,6 @@ public PagedIterable list(String resourceGroupName, String serv */ @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(), @@ -301,15 +242,6 @@ private Mono> listNextSinglePageAsync(String next */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -329,20 +261,9 @@ private PagedResponse listNextSinglePage(String nextLink) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(CapabilitiesByServersClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersImpl.java index b01d2eabfe05..b0aba2999a33 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilityImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilityImpl.java index 055625dff382..baccc7cfefe2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilityImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilityImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogImpl.java index a4eb8e823b27..52941bee65ec 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsClientImpl.java index 54399c7c3e64..ff1d4964fa94 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -25,10 +25,9 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapturedLogsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CapturedLogList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.CapturedLogList; import reactor.core.publisher.Mono; /** @@ -60,14 +59,14 @@ public final class CapturedLogsClientImpl implements CapturedLogsClient { * The interface defining all the services for PostgreSqlManagementClientCapturedLogs to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientCapturedLogs") public interface CapturedLogsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/logFiles") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -76,7 +75,7 @@ Mono> listByServer(@HostParam("$host") String endpoint @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/logFiles") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -86,14 +85,14 @@ Response listByServerSync(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -109,21 +108,6 @@ Response listByServerNextSync(@PathParam(value = "nextLink", en @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), @@ -161,24 +145,6 @@ public PagedFlux listByServerAsync(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); @@ -200,24 +166,6 @@ private PagedResponse listByServerSinglePage(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); @@ -269,13 +217,6 @@ public PagedIterable listByServer(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(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.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -295,15 +236,6 @@ private Mono> listByServerNextSinglePageAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -323,21 +255,10 @@ private PagedResponse listByServerNextSinglePage(String nextLi */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(CapturedLogsClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsImpl.java index 70236c20287d..64c79ee9ef23 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; 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 7ca67bf684e8..9685cec37ae1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -120,7 +120,6 @@ public Configuration create(Context context) { ConfigurationImpl(String name, com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { - this.innerObject = new ConfigurationInner(); this.serviceManager = serviceManager; this.configurationName = name; this.createParameters = new ConfigurationForUpdate(); 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 54b4a8797c90..3f5d9011dabf 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -30,13 +30,12 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationInner; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.ConfigurationList; import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationForUpdate; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -70,97 +69,93 @@ public final class ConfigurationsClientImpl implements ConfigurationsClient { * The interface defining all the services for PostgreSqlManagementClientConfigurations to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientConfigurations") public interface ConfigurationsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono>> put(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("configurationName") String configurationName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ConfigurationForUpdate parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response putSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("configurationName") String configurationName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ConfigurationForUpdate parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("configurationName") String configurationName, - @BodyParam("application/json") ConfigurationForUpdate parameters, @HeaderParam("Accept") String accept, - Context context); + @PathParam("configurationName") String configurationName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ConfigurationForUpdate parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("configurationName") String configurationName, - @BodyParam("application/json") ConfigurationForUpdate parameters, @HeaderParam("Accept") String accept, - Context context); + @PathParam("configurationName") String configurationName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ConfigurationForUpdate parameters, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> put(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("configurationName") String configurationName, - @BodyParam("application/json") ConfigurationForUpdate parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations/{configurationName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/configurations") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response putSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Response listByServerSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("configurationName") String configurationName, - @BodyParam("application/json") ConfigurationForUpdate parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -168,175 +163,7 @@ Mono> listByServerNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all configurations (also known as server parameters) of a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 list of configurations (also known as server parameters) along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, 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())); - } - - /** - * Lists all configurations (also known as server parameters) of a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 list of configurations (also known as server parameters) as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePageAsync(nextLink)); - } - - /** - * Lists all configurations (also known as server parameters) of a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 list of configurations (also known as server parameters) along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists all configurations (also known as server parameters) of a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 list of configurations (also known as server parameters) along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists all configurations (also known as server parameters) of a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 list of configurations (also known as server parameters) as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePage(nextLink)); - } - - /** - * Lists all configurations (also known as server parameters) of a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 list of configurations (also known as server parameters) as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePage(nextLink, context)); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -354,25 +181,6 @@ public PagedIterable listByServer(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String resourceGroupName, String serverName, String configurationName) { - 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 (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -414,28 +222,6 @@ public Mono getAsync(String resourceGroupName, String server @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String serverName, String configurationName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (configurationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, configurationName, accept, context); @@ -458,7 +244,8 @@ public ConfigurationInner get(String resourceGroupName, String serverName, Strin } /** - * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -468,46 +255,22 @@ public ConfigurationInner get(String resourceGroupName, String serverName, Strin * @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 configuration (also known as server parameter) along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, + public Mono>> putWithResponseAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters) { - 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 (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, configurationName, parameters, accept, - context)) + .withContext(context -> service.put(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, configurationName, contentType, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -517,47 +280,19 @@ public Mono>> updateWithResponseAsync(String resourceG * @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 configuration (also known as server parameter) along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String serverName, - String configurationName, ConfigurationForUpdate parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (configurationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, configurationName, parameters, accept, - Context.NONE); + private Response putWithResponse(String resourceGroupName, String serverName, String configurationName, + ConfigurationForUpdate parameters) { + final String contentType = "application/json"; + return service.putSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, configurationName, contentType, parameters, Context.NONE); } /** - * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -568,47 +303,19 @@ private Response updateWithResponse(String resourceGroupName, String * @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 configuration (also known as server parameter) along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response updateWithResponse(String resourceGroupName, String serverName, - String configurationName, ConfigurationForUpdate parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (configurationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, configurationName, parameters, accept, - context); + private Response putWithResponse(String resourceGroupName, String serverName, String configurationName, + ConfigurationForUpdate parameters, Context context) { + final String contentType = "application/json"; + return service.putSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, configurationName, contentType, parameters, context); } /** - * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -618,19 +325,20 @@ private Response updateWithResponse(String resourceGroupName, String * @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 configuration (also known as server parameter). + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ConfigurationInner> beginUpdateAsync(String resourceGroupName, + public PollerFlux, ConfigurationInner> beginPutAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, serverName, configurationName, parameters); + = putWithResponseAsync(resourceGroupName, serverName, configurationName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ConfigurationInner.class, ConfigurationInner.class, this.client.getContext()); } /** - * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -640,19 +348,19 @@ public PollerFlux, ConfigurationInner> beginUpdat * @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 configuration (also known as server parameter). + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName, + public SyncPoller, ConfigurationInner> beginPut(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters) { - Response response - = updateWithResponse(resourceGroupName, serverName, configurationName, parameters); + Response response = putWithResponse(resourceGroupName, serverName, configurationName, parameters); return this.client.getLroResult(response, ConfigurationInner.class, ConfigurationInner.class, Context.NONE); } /** - * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -663,19 +371,20 @@ public SyncPoller, ConfigurationInner> beginUpdat * @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 configuration (also known as server parameter). + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName, + public SyncPoller, ConfigurationInner> beginPut(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters, Context context) { Response response - = updateWithResponse(resourceGroupName, serverName, configurationName, parameters, context); + = putWithResponse(resourceGroupName, serverName, configurationName, parameters, context); return this.client.getLroResult(response, ConfigurationInner.class, ConfigurationInner.class, context); } /** - * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -685,17 +394,18 @@ public SyncPoller, ConfigurationInner> beginUpdat * @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 configuration (also known as server parameter) on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync(String resourceGroupName, String serverName, String configurationName, + public Mono putAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters) { - return beginUpdateAsync(resourceGroupName, serverName, configurationName, parameters).last() + return beginPutAsync(resourceGroupName, serverName, configurationName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -705,16 +415,17 @@ public Mono updateAsync(String resourceGroupName, String ser * @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 configuration (also known as server parameter). + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationInner update(String resourceGroupName, String serverName, String configurationName, + public ConfigurationInner put(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters) { - return beginUpdate(resourceGroupName, serverName, configurationName, parameters).getFinalResult(); + return beginPut(resourceGroupName, serverName, configurationName, parameters).getFinalResult(); } /** - * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. + * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server + * parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -725,17 +436,16 @@ public ConfigurationInner update(String resourceGroupName, String serverName, St * @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 configuration (also known as server parameter). + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationInner update(String resourceGroupName, String serverName, String configurationName, + public ConfigurationInner put(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters, Context context) { - return beginUpdate(resourceGroupName, serverName, configurationName, parameters, context).getFinalResult(); + return beginPut(resourceGroupName, serverName, configurationName, parameters, context).getFinalResult(); } /** - * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server - * parameter) of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -745,47 +455,21 @@ public ConfigurationInner update(String resourceGroupName, String serverName, St * @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 configuration (also known as server parameter) along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono>> putWithResponseAsync(String resourceGroupName, String serverName, + public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters) { - 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 (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.put(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, configurationName, parameters, accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, configurationName, contentType, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server - * parameter) of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -795,47 +479,19 @@ public Mono>> putWithResponseAsync(String resourceGrou * @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 configuration (also known as server parameter) along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response putWithResponse(String resourceGroupName, String serverName, String configurationName, - ConfigurationForUpdate parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (configurationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.putSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, configurationName, parameters, accept, Context.NONE); + private Response updateWithResponse(String resourceGroupName, String serverName, + String configurationName, ConfigurationForUpdate parameters) { + final String contentType = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, configurationName, contentType, parameters, + Context.NONE); } /** - * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server - * parameter) of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -846,47 +502,19 @@ private Response putWithResponse(String resourceGroupName, String se * @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 configuration (also known as server parameter) along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response putWithResponse(String resourceGroupName, String serverName, String configurationName, - ConfigurationForUpdate parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (configurationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return service.putSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, configurationName, parameters, accept, context); + private Response updateWithResponse(String resourceGroupName, String serverName, + String configurationName, ConfigurationForUpdate parameters, Context context) { + final String contentType = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, configurationName, contentType, parameters, + context); } /** - * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server - * parameter) of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -896,20 +524,19 @@ private Response putWithResponse(String resourceGroupName, String se * @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 configuration (also known as server parameter). + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux, ConfigurationInner> beginPutAsync(String resourceGroupName, + public PollerFlux, ConfigurationInner> beginUpdateAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters) { Mono>> mono - = putWithResponseAsync(resourceGroupName, serverName, configurationName, parameters); + = updateWithResponseAsync(resourceGroupName, serverName, configurationName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ConfigurationInner.class, ConfigurationInner.class, this.client.getContext()); } /** - * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server - * parameter) of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -919,19 +546,19 @@ public PollerFlux, ConfigurationInner> beginPutAs * @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 configuration (also known as server parameter). + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConfigurationInner> beginPut(String resourceGroupName, + public SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters) { - Response response = putWithResponse(resourceGroupName, serverName, configurationName, parameters); + Response response + = updateWithResponse(resourceGroupName, serverName, configurationName, parameters); return this.client.getLroResult(response, ConfigurationInner.class, ConfigurationInner.class, Context.NONE); } /** - * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server - * parameter) of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -942,20 +569,19 @@ public SyncPoller, ConfigurationInner> beginPut(S * @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 configuration (also known as server parameter). + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConfigurationInner> beginPut(String resourceGroupName, + public SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters, Context context) { Response response - = putWithResponse(resourceGroupName, serverName, configurationName, parameters, context); + = updateWithResponse(resourceGroupName, serverName, configurationName, parameters, context); return this.client.getLroResult(response, ConfigurationInner.class, ConfigurationInner.class, context); } /** - * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server - * parameter) of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -965,18 +591,17 @@ public SyncPoller, ConfigurationInner> beginPut(S * @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 configuration (also known as server parameter) on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono putAsync(String resourceGroupName, String serverName, String configurationName, + public Mono updateAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters) { - return beginPutAsync(resourceGroupName, serverName, configurationName, parameters).last() + return beginUpdateAsync(resourceGroupName, serverName, configurationName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server - * parameter) of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -986,17 +611,16 @@ public Mono putAsync(String resourceGroupName, String server * @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 configuration (also known as server parameter). + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationInner put(String resourceGroupName, String serverName, String configurationName, + public ConfigurationInner update(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters) { - return beginPut(resourceGroupName, serverName, configurationName, parameters).getFinalResult(); + return beginUpdate(resourceGroupName, serverName, configurationName, parameters).getFinalResult(); } /** - * Updates, using Put verb, the value assigned to a specific modifiable configuration (also known as server - * parameter) of a server. + * Updates the value assigned to a specific modifiable configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -1007,12 +631,129 @@ public ConfigurationInner put(String resourceGroupName, String serverName, Strin * @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 configuration (also known as server parameter). + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationInner put(String resourceGroupName, String serverName, String configurationName, + public ConfigurationInner update(String resourceGroupName, String serverName, String configurationName, ConfigurationForUpdate parameters, Context context) { - return beginPut(resourceGroupName, serverName, configurationName, parameters, context).getFinalResult(); + return beginUpdate(resourceGroupName, serverName, configurationName, parameters, context).getFinalResult(); + } + + /** + * Lists all configurations (also known as server parameters) of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of configurations (also known as server parameters) along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, 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())); + } + + /** + * Lists all configurations (also known as server parameters) of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of configurations (also known as server parameters) as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePageAsync(nextLink)); + } + + /** + * Lists all configurations (also known as server parameters) of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of configurations (also known as server parameters) along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { + final String accept = "application/json"; + Response res + = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all configurations (also known as server parameters) of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of configurations (also known as server parameters) along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, + Context context) { + final String accept = "application/json"; + Response res + = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all configurations (also known as server parameters) of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePage(nextLink)); + } + + /** + * Lists all configurations (also known as server parameters) of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePage(nextLink, context)); } /** @@ -1027,13 +768,6 @@ public ConfigurationInner put(String resourceGroupName, String serverName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(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.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1053,15 +787,6 @@ private Mono> listByServerNextSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1081,21 +806,10 @@ private PagedResponse listByServerNextSinglePage(String next */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(ConfigurationsClientImpl.class); } 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 3b4799cbdd76..736c34234a9e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -27,17 +27,6 @@ public ConfigurationsImpl(ConfigurationsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByServer(String resourceGroupName, String serverName) { - PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ConfigurationImpl(inner1, this.manager())); - } - - public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ConfigurationImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String serverName, String configurationName, Context context) { Response inner @@ -59,6 +48,17 @@ public Configuration get(String resourceGroupName, String serverName, String con } } + public PagedIterable listByServer(String resourceGroupName, String serverName) { + PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ConfigurationImpl(inner1, this.manager())); + } + + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ConfigurationImpl(inner1, this.manager())); + } + public Configuration getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { 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 a4dd44e2f7a4..f979544845e8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; 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 3985d46dfd6b..18e67aea2ac2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -30,12 +30,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.DatabaseInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.DatabaseList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.DatabaseList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -69,70 +68,70 @@ public final class DatabasesClientImpl implements DatabasesClient { * The interface defining all the services for PostgreSqlManagementClientDatabases to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientDatabases") public interface DatabasesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @BodyParam("application/json") DatabaseInner parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @BodyParam("application/json") DatabaseInner parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") - @ExpectedResponses({ 202, 204 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") DatabaseInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") - @ExpectedResponses({ 202, 204 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response createSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") DatabaseInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases/{databaseName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("databaseName") String databaseName, @HeaderParam("Accept") String accept, Context context); + @PathParam("databaseName") String databaseName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -141,7 +140,7 @@ Mono> listByServer(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -151,14 +150,93 @@ Response listByServerSync(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets information about an existing database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @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 information about an existing database along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String databaseName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about an existing database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @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 information about an existing database on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, String databaseName) { + return getWithResponseAsync(resourceGroupName, serverName, databaseName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about an existing database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @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 information about an existing database along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, databaseName, accept, context); + } + + /** + * Gets information about an existing database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the + * list of all existing databases in a server. + * @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 information about an existing database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseInner get(String resourceGroupName, String serverName, String databaseName) { + return getWithResponse(resourceGroupName, serverName, databaseName, Context.NONE).getValue(); } /** @@ -172,37 +250,16 @@ Response listByServerNextSync(@PathParam(value = "nextLink", encod * @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 represents a database along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, parameters, accept, context)) + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, contentType, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -217,42 +274,14 @@ public Mono>> createWithResponseAsync(String resourceG * @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 represents a database along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, parameters, accept, + this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, contentType, parameters, Context.NONE); } @@ -268,42 +297,15 @@ private Response createWithResponse(String resourceGroupName, String * @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 represents a database along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, parameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, contentType, parameters, + context); } /** @@ -317,7 +319,7 @@ private Response createWithResponse(String resourceGroupName, String * @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 represents a database. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, DatabaseInner> beginCreateAsync(String resourceGroupName, @@ -339,7 +341,7 @@ public PollerFlux, DatabaseInner> beginCreateAsync(Str * @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 represents a database. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatabaseInner> beginCreate(String resourceGroupName, String serverName, @@ -361,7 +363,7 @@ public SyncPoller, DatabaseInner> beginCreate(String r * @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 represents a database. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatabaseInner> beginCreate(String resourceGroupName, String serverName, @@ -383,7 +385,7 @@ public SyncPoller, DatabaseInner> beginCreate(String r * @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 represents a database on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createAsync(String resourceGroupName, String serverName, String databaseName, @@ -403,7 +405,7 @@ public Mono createAsync(String resourceGroupName, String serverNa * @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 represents a database. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public DatabaseInner create(String resourceGroupName, String serverName, String databaseName, @@ -423,7 +425,7 @@ public DatabaseInner create(String resourceGroupName, String serverName, String * @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 represents a database. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public DatabaseInner create(String resourceGroupName, String serverName, String databaseName, @@ -446,28 +448,9 @@ public DatabaseInner create(String resourceGroupName, String serverName, String @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, String databaseName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName 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, databaseName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -485,31 +468,8 @@ public Mono>> deleteWithResponseAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, Context.NONE); } /** @@ -528,31 +488,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String serverName, String databaseName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, context); } /** @@ -665,125 +602,6 @@ public void delete(String resourceGroupName, String serverName, String databaseN beginDelete(resourceGroupName, serverName, databaseName, context).getFinalResult(); } - /** - * Gets information about an existing database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the - * list of all existing databases in a server. - * @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 information about an existing database along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String databaseName) { - 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 (databaseName == null) { - return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, databaseName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets information about an existing database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the - * list of all existing databases in a server. - * @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 information about an existing database on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String databaseName) { - return getWithResponseAsync(resourceGroupName, serverName, databaseName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets information about an existing database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the - * list of all existing databases in a server. - * @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 information about an existing database along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (databaseName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter databaseName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, databaseName, accept, context); - } - - /** - * Gets information about an existing database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the - * list of all existing databases in a server. - * @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 information about an existing database. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatabaseInner get(String resourceGroupName, String serverName, String databaseName) { - return getWithResponse(resourceGroupName, serverName, databaseName, Context.NONE).getValue(); - } - /** * Lists all databases in a server. * @@ -798,21 +616,6 @@ public DatabaseInner get(String resourceGroupName, String serverName, String dat @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), @@ -850,24 +653,6 @@ public PagedFlux listByServerAsync(String resourceGroupName, Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); @@ -889,24 +674,6 @@ private PagedResponse listByServerSinglePage(String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); @@ -959,13 +726,6 @@ public PagedIterable listByServer(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(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.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -985,15 +745,6 @@ private Mono> listByServerNextSinglePageAsync(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1013,20 +764,9 @@ private PagedResponse listByServerNextSinglePage(String nextLink) */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(DatabasesClientImpl.class); } 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 e8f622f1b408..529c2062f75c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -27,14 +27,6 @@ public DatabasesImpl(DatabasesClient innerClient, this.serviceManager = serviceManager; } - public void delete(String resourceGroupName, String serverName, String databaseName) { - this.serviceClient().delete(resourceGroupName, serverName, databaseName); - } - - public void delete(String resourceGroupName, String serverName, String databaseName, Context context) { - this.serviceClient().delete(resourceGroupName, serverName, databaseName, context); - } - public Response getWithResponse(String resourceGroupName, String serverName, String databaseName, Context context) { Response inner @@ -56,6 +48,14 @@ public Database get(String resourceGroupName, String serverName, String database } } + public void delete(String resourceGroupName, String serverName, String databaseName) { + this.serviceClient().delete(resourceGroupName, serverName, databaseName); + } + + public void delete(String resourceGroupName, String serverName, String databaseName, Context context) { + this.serviceClient().delete(resourceGroupName, serverName, databaseName, context); + } + public PagedIterable listByServer(String resourceGroupName, String serverName) { PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); return ResourceManagerUtils.mapPage(inner, inner1 -> new DatabaseImpl(inner1, this.manager())); 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 79631545bd34..1209a011c1ec 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; 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 4c92fe1d5af7..79286d9d3b4e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -30,12 +30,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FirewallRuleList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.FirewallRuleList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -69,76 +68,72 @@ public final class FirewallRulesClientImpl implements FirewallRulesClient { * The interface defining all the services for PostgreSqlManagementClientFirewallRules to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientFirewallRules") public interface FirewallRulesService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, - @BodyParam("application/json") FirewallRuleInner parameters, @HeaderParam("Accept") String accept, + @PathParam("firewallRuleName") String firewallRuleName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, - @BodyParam("application/json") FirewallRuleInner parameters, @HeaderParam("Accept") String accept, + @PathParam("firewallRuleName") String firewallRuleName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({ 202, 204 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("firewallRuleName") String firewallRuleName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") FirewallRuleInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({ 202, 204 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("firewallRuleName") String firewallRuleName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") FirewallRuleInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("firewallRuleName") String firewallRuleName, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules/{firewallRuleName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("firewallRuleName") String firewallRuleName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("firewallRuleName") String firewallRuleName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -147,7 +142,7 @@ Mono> listByServer(@HostParam("$host") String endpoin @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/firewallRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -157,7 +152,7 @@ Response listByServerSync(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -165,7 +160,82 @@ Mono> listByServerNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets information about a firewall rule in a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param firewallRuleName Name of the firewall rule. + * @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 information about a firewall rule in a server along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String firewallRuleName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about a firewall rule in a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param firewallRuleName Name of the firewall rule. + * @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 information about a firewall rule in a server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, String firewallRuleName) { + return getWithResponseAsync(resourceGroupName, serverName, firewallRuleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about a firewall rule in a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param firewallRuleName Name of the firewall rule. + * @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 information about a firewall rule in a server along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + String firewallRuleName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, firewallRuleName, accept, context); + } + + /** + * Gets information about a firewall rule in a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param firewallRuleName Name of the firewall rule. + * @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 information about a firewall rule in a server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName) { + return getWithResponse(resourceGroupName, serverName, firewallRuleName, Context.NONE).getValue(); } /** @@ -178,40 +248,16 @@ Response listByServerNextSync(@PathParam(value = "nextLink", e * @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 firewall rule along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters) { - 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 (firewallRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, parameters, accept, - context)) + this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, contentType, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -225,42 +271,14 @@ public Mono>> createOrUpdateWithResponseAsync(String r * @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 firewall rule along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (firewallRuleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, parameters, accept, + this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, contentType, parameters, Context.NONE); } @@ -275,42 +293,14 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @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 firewall rule along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (firewallRuleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, parameters, accept, + this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, contentType, parameters, context); } @@ -324,7 +314,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @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 firewall rule. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, FirewallRuleInner> beginCreateOrUpdateAsync( @@ -345,7 +335,7 @@ public PollerFlux, FirewallRuleInner> beginCreateO * @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 firewall rule. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName, @@ -367,7 +357,7 @@ public SyncPoller, FirewallRuleInner> beginCreateO * @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 firewall rule. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FirewallRuleInner> beginCreateOrUpdate(String resourceGroupName, @@ -388,7 +378,7 @@ public SyncPoller, FirewallRuleInner> beginCreateO * @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 firewall rule on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync(String resourceGroupName, String serverName, @@ -407,7 +397,7 @@ public Mono createOrUpdateAsync(String resourceGroupName, Str * @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 firewall rule. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, @@ -426,7 +416,7 @@ public FirewallRuleInner createOrUpdate(String resourceGroupName, String serverN * @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 firewall rule. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public FirewallRuleInner createOrUpdate(String resourceGroupName, String serverName, String firewallRuleName, @@ -449,29 +439,9 @@ public FirewallRuleInner createOrUpdate(String resourceGroupName, String serverN @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, String firewallRuleName) { - 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 (firewallRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter firewallRuleName 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, firewallRuleName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -489,31 +459,8 @@ public Mono>> deleteWithResponseAsync(String resourceG @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String serverName, String firewallRuleName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (firewallRuleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, Context.NONE); } /** @@ -531,31 +478,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String serverName, String firewallRuleName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (firewallRuleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, context); } /** @@ -663,122 +587,6 @@ public void delete(String resourceGroupName, String serverName, String firewallR beginDelete(resourceGroupName, serverName, firewallRuleName, context).getFinalResult(); } - /** - * Gets information about a firewall rule in a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param firewallRuleName Name of the firewall rule. - * @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 information about a firewall rule in a server along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String firewallRuleName) { - 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 (firewallRuleName == null) { - return Mono - .error(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, firewallRuleName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets information about a firewall rule in a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param firewallRuleName Name of the firewall rule. - * @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 information about a firewall rule in a server on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String firewallRuleName) { - return getWithResponseAsync(resourceGroupName, serverName, firewallRuleName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets information about a firewall rule in a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param firewallRuleName Name of the firewall rule. - * @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 information about a firewall rule in a server along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String firewallRuleName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (firewallRuleName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter firewallRuleName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, firewallRuleName, accept, context); - } - - /** - * Gets information about a firewall rule in a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param firewallRuleName Name of the firewall rule. - * @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 information about a firewall rule in a server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName) { - return getWithResponse(resourceGroupName, serverName, firewallRuleName, Context.NONE).getValue(); - } - /** * Lists information about all firewall rules in a server. * @@ -792,21 +600,6 @@ public FirewallRuleInner get(String resourceGroupName, String serverName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), @@ -844,24 +637,6 @@ public PagedFlux listByServerAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -884,24 +659,6 @@ private PagedResponse listByServerSinglePage(String resourceG @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -954,13 +711,6 @@ public PagedIterable listByServer(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(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.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -980,15 +730,6 @@ private Mono> listByServerNextSinglePageAsync(S */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1008,21 +749,10 @@ private PagedResponse listByServerNextSinglePage(String nextL */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(FirewallRulesClientImpl.class); } 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 ef96a6108bfa..8d4480b013a9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -27,14 +27,6 @@ public FirewallRulesImpl(FirewallRulesClient innerClient, this.serviceManager = serviceManager; } - public void delete(String resourceGroupName, String serverName, String firewallRuleName) { - this.serviceClient().delete(resourceGroupName, serverName, firewallRuleName); - } - - public void delete(String resourceGroupName, String serverName, String firewallRuleName, Context context) { - this.serviceClient().delete(resourceGroupName, serverName, firewallRuleName, context); - } - public Response getWithResponse(String resourceGroupName, String serverName, String firewallRuleName, Context context) { Response inner @@ -56,6 +48,14 @@ public FirewallRule get(String resourceGroupName, String serverName, String fire } } + public void delete(String resourceGroupName, String serverName, String firewallRuleName) { + this.serviceClient().delete(resourceGroupName, serverName, firewallRuleName); + } + + public void delete(String resourceGroupName, String serverName, String firewallRuleName, Context context) { + this.serviceClient().delete(resourceGroupName, serverName, firewallRuleName, context); + } + public PagedIterable listByServer(String resourceGroupName, String serverName) { PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); return ResourceManagerUtils.mapPage(inner, inner1 -> new FirewallRuleImpl(inner1, this.manager())); 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 d879eded772c..691720d3ecf6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrateNetworkStatusImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrateNetworkStatusImpl.java new file mode 100644 index 000000000000..1c53244184d1 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrateNetworkStatusImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.implementation; + +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrateNetworkStatusInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateNetworkStatus; +import com.azure.resourcemanager.postgresqlflexibleserver.models.NetworkMigrationState; + +public final class MigrateNetworkStatusImpl implements MigrateNetworkStatus { + private MigrateNetworkStatusInner innerObject; + + private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; + + MigrateNetworkStatusImpl(MigrateNetworkStatusInner innerObject, + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String subscriptionId() { + return this.innerModel().subscriptionId(); + } + + public String resourceGroupName() { + return this.innerModel().resourceGroupName(); + } + + public String serverName() { + return this.innerModel().serverName(); + } + + public NetworkMigrationState state() { + return this.innerModel().state(); + } + + public MigrateNetworkStatusInner 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/MigrationImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationImpl.java index 361756eec790..6858187cb275 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityImpl.java index a3f743bbdc0b..07728e09cee7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; 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 98d37cf94b98..3aac73c3396f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -30,11 +30,10 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.MigrationList; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationListFilter; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResourceForPatch; import reactor.core.publisher.Mono; @@ -68,74 +67,72 @@ public final class MigrationsClientImpl implements MigrationsClient { * The interface defining all the services for PostgreSqlManagementClientMigrations to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientMigrations") public interface MigrationsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("migrationName") String migrationName, @BodyParam("application/json") MigrationInner parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("migrationName") String migrationName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("migrationName") String migrationName, @BodyParam("application/json") MigrationInner parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("migrationName") String migrationName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> create(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("migrationName") String migrationName, @HeaderParam("Accept") String accept, Context context); + @PathParam("migrationName") String migrationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") MigrationInner parameters, + Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response createSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("migrationName") String migrationName, @HeaderParam("Accept") String accept, Context context); + @PathParam("migrationName") String migrationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") MigrationInner parameters, + Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Mono> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("migrationName") String migrationName, - @BodyParam("application/json") MigrationResourceForPatch parameters, @HeaderParam("Accept") String accept, + @PathParam("migrationName") String migrationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") MigrationResourceForPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("migrationName") String migrationName, - @BodyParam("application/json") MigrationResourceForPatch parameters, @HeaderParam("Accept") String accept, + @PathParam("migrationName") String migrationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") MigrationResourceForPatch parameters, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> cancel(@HostParam("$host") String endpoint, + Mono> cancel(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("migrationName") String migrationName, @HeaderParam("Accept") String accept, Context context); @@ -144,7 +141,7 @@ Mono> cancel(@HostParam("$host") String endpoint, @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations/{migrationName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response cancelSync(@HostParam("$host") String endpoint, + Response cancelSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("migrationName") String migrationName, @HeaderParam("Accept") String accept, Context context); @@ -153,7 +150,7 @@ Response cancelSync(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByTargetServer(@HostParam("$host") String endpoint, + Mono> listByTargetServer(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @QueryParam("migrationListFilter") MigrationListFilter migrationListFilter, @@ -163,38 +160,36 @@ Mono> listByTargetServer(@HostParam("$host") String endp @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByTargetServerSync(@HostParam("$host") String endpoint, + Response listByTargetServerSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @QueryParam("migrationListFilter") MigrationListFilter migrationListFilter, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/checkMigrationNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability(@HostParam("$host") String endpoint, + Mono> checkNameAvailability(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") MigrationNameAvailabilityInner parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") MigrationNameAvailabilityInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/checkMigrationNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response checkNameAvailabilitySync(@HostParam("$host") String endpoint, + Response checkNameAvailabilitySync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") MigrationNameAvailabilityInner parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") MigrationNameAvailabilityInner parameters, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByTargetServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -202,252 +197,166 @@ Mono> listByTargetServerNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByTargetServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates a new migration. + * Gets information about a migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param migrationName Name of migration. - * @param parameters Parameters required for creating a migration. * @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 properties of a migration along with {@link Response} on successful completion of {@link Mono}. + * @return information about a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync(String resourceGroupName, String serverName, - String migrationName, MigrationInner parameters) { - 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 (migrationName == null) { - return Mono.error(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String migrationName) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, parameters, accept, context)) + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a new migration. + * Gets information about a migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param migrationName Name of migration. - * @param parameters Parameters required for creating a migration. * @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 properties of a migration on successful completion of {@link Mono}. + * @return information about a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync(String resourceGroupName, String serverName, String migrationName, - MigrationInner parameters) { - return createWithResponseAsync(resourceGroupName, serverName, migrationName, parameters) + public Mono getAsync(String resourceGroupName, String serverName, String migrationName) { + return getWithResponseAsync(resourceGroupName, serverName, migrationName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates a new migration. + * Gets information about a migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param migrationName Name of migration. - * @param parameters Parameters required for creating a migration. * @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 properties of a migration along with {@link Response}. + * @return information about a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(String resourceGroupName, String serverName, - String migrationName, MigrationInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (migrationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + public Response getWithResponse(String resourceGroupName, String serverName, String migrationName, + Context context) { final String accept = "application/json"; - return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, parameters, accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, migrationName, accept, context); } /** - * Creates a new migration. + * Gets information about a migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param migrationName Name of migration. - * @param parameters Parameters required for creating a migration. * @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 properties of a migration. + * @return information about a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationInner create(String resourceGroupName, String serverName, String migrationName, - MigrationInner parameters) { - return createWithResponse(resourceGroupName, serverName, migrationName, parameters, Context.NONE).getValue(); + public MigrationInner get(String resourceGroupName, String serverName, String migrationName) { + return getWithResponse(resourceGroupName, serverName, migrationName, Context.NONE).getValue(); } /** - * Gets information about a migration. + * Creates a new migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @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 information about a migration along with {@link Response} on successful completion of {@link Mono}. + * @return properties of a migration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String migrationName) { - 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 (migrationName == null) { - return Mono.error(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); - } + public Mono> createWithResponseAsync(String resourceGroupName, String serverName, + String migrationName, MigrationInner parameters) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets information about a migration. + * Creates a new migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @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 information about a migration on successful completion of {@link Mono}. + * @return properties of a migration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String migrationName) { - return getWithResponseAsync(resourceGroupName, serverName, migrationName) + public Mono createAsync(String resourceGroupName, String serverName, String migrationName, + MigrationInner parameters) { + return createWithResponseAsync(resourceGroupName, serverName, migrationName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets information about a migration. + * Creates a new migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @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 information about a migration along with {@link Response}. + * @return properties of a migration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, String migrationName, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (migrationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); - } + public Response createWithResponse(String resourceGroupName, String serverName, + String migrationName, MigrationInner parameters, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, migrationName, accept, context); + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, contentType, accept, + parameters, context); } /** - * Gets information about a migration. + * Creates a new migration. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param migrationName Name of migration. + * @param parameters Parameters required for creating a migration. * @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 information about a migration. + * @return properties of a migration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MigrationInner get(String resourceGroupName, String serverName, String migrationName) { - return getWithResponse(resourceGroupName, serverName, migrationName, Context.NONE).getValue(); + public MigrationInner create(String resourceGroupName, String serverName, String migrationName, + MigrationInner parameters) { + return createWithResponse(resourceGroupName, serverName, migrationName, parameters, Context.NONE).getValue(); } /** @@ -466,32 +375,12 @@ public MigrationInner get(String resourceGroupName, String serverName, String mi @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateWithResponseAsync(String resourceGroupName, String serverName, String migrationName, MigrationResourceForPatch parameters) { - 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 (migrationName == null) { - return Mono.error(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, parameters, accept, context)) + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -532,37 +421,11 @@ public Mono updateAsync(String resourceGroupName, String serverN @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse(String resourceGroupName, String serverName, String migrationName, MigrationResourceForPatch parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (migrationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, parameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, contentType, accept, + parameters, context); } /** @@ -598,24 +461,6 @@ public MigrationInner update(String resourceGroupName, String serverName, String @ServiceMethod(returns = ReturnType.SINGLE) public Mono> cancelWithResponseAsync(String resourceGroupName, String serverName, String migrationName) { - 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 (migrationName == null) { - return Mono.error(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), @@ -655,28 +500,6 @@ public Mono cancelAsync(String resourceGroupName, String serverN @ServiceMethod(returns = ReturnType.SINGLE) public Response cancelWithResponse(String resourceGroupName, String serverName, String migrationName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (migrationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter migrationName is required and cannot be null.")); - } final String accept = "application/json"; return service.cancelSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, migrationName, accept, context); @@ -713,21 +536,6 @@ public MigrationInner cancel(String resourceGroupName, String serverName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByTargetServerSinglePageAsync(String resourceGroupName, String serverName, MigrationListFilter migrationListFilter) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByTargetServer(this.client.getEndpoint(), this.client.getApiVersion(), @@ -790,24 +598,6 @@ public PagedFlux listByTargetServerAsync(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByTargetServerSinglePage(String resourceGroupName, String serverName, MigrationListFilter migrationListFilter) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByTargetServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, @@ -832,24 +622,6 @@ private PagedResponse listByTargetServerSinglePage(String resour @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByTargetServerSinglePage(String resourceGroupName, String serverName, MigrationListFilter migrationListFilter, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByTargetServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -913,31 +685,12 @@ public PagedIterable listByTargetServer(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) public Mono> checkNameAvailabilityWithResponseAsync( String resourceGroupName, String serverName, MigrationNameAvailabilityInner parameters) { - 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) + .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -978,33 +731,10 @@ public Mono checkNameAvailabilityAsync(String re @ServiceMethod(returns = ReturnType.SINGLE) public Response checkNameAvailabilityWithResponse(String resourceGroupName, String serverName, MigrationNameAvailabilityInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.checkNameAvailabilitySync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, accept, parameters, context); } /** @@ -1037,13 +767,6 @@ public MigrationNameAvailabilityInner checkNameAvailability(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByTargetServerNextSinglePageAsync(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( @@ -1064,15 +787,6 @@ private Mono> listByTargetServerNextSinglePageAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByTargetServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByTargetServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1092,21 +806,10 @@ private PagedResponse listByTargetServerNextSinglePage(String ne */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByTargetServerNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByTargetServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(MigrationsClientImpl.class); } 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 2949ce96596b..ab382236576b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesClientImpl.java index 55d6aabf7783..10dd73748f9c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesClientImpl.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; 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; @@ -22,7 +21,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest; @@ -57,54 +55,49 @@ public final class NameAvailabilitiesClientImpl implements NameAvailabilitiesCli * The interface defining all the services for PostgreSqlManagementClientNameAvailabilities to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientNameAvailabilities") public interface NameAvailabilitiesService { - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkGlobally(@HostParam("$host") String endpoint, + Mono> checkGlobally(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") CheckNameAvailabilityRequest parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckNameAvailabilityRequest parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response checkGloballySync(@HostParam("$host") String endpoint, + Response checkGloballySync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") CheckNameAvailabilityRequest parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckNameAvailabilityRequest parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkWithLocation(@HostParam("$host") String endpoint, + Mono> checkWithLocation(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @BodyParam("application/json") CheckNameAvailabilityRequest parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("locationName") String locationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckNameAvailabilityRequest parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response checkWithLocationSync(@HostParam("$host") String endpoint, + Response checkWithLocationSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @BodyParam("application/json") CheckNameAvailabilityRequest parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("locationName") String locationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckNameAvailabilityRequest parameters, Context context); } /** * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base * name of a new pair of virtual endpoints. * - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -113,23 +106,11 @@ Response checkWithLocationSync(@HostParam("$host") S @ServiceMethod(returns = ReturnType.SINGLE) public Mono> checkGloballyWithResponseAsync(CheckNameAvailabilityRequest parameters) { - 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.checkGlobally(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, context)) + this.client.getSubscriptionId(), contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -137,8 +118,7 @@ Response checkWithLocationSync(@HostParam("$host") S * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base * name of a new pair of virtual endpoints. * - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -153,8 +133,7 @@ public Mono checkGloballyAsync(CheckNameAvailability * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base * name of a new pair of virtual endpoints. * - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -164,33 +143,17 @@ public Mono checkGloballyAsync(CheckNameAvailability @ServiceMethod(returns = ReturnType.SINGLE) public Response checkGloballyWithResponse(CheckNameAvailabilityRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.checkGloballySync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, context); + this.client.getSubscriptionId(), contentType, accept, parameters, context); } /** * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base * name of a new pair of virtual endpoints. * - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -205,8 +168,7 @@ public NameAvailabilityModelInner checkGlobally(CheckNameAvailabilityRequest par * Check the availability of name for resource. * * @param locationName The name of the location. - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -215,26 +177,11 @@ public NameAvailabilityModelInner checkGlobally(CheckNameAvailabilityRequest par @ServiceMethod(returns = ReturnType.SINGLE) public Mono> checkWithLocationWithResponseAsync(String locationName, CheckNameAvailabilityRequest parameters) { - 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.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.checkWithLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, parameters, accept, context)) + this.client.getSubscriptionId(), locationName, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -242,8 +189,7 @@ public Mono> checkWithLocationWithResponseA * Check the availability of name for resource. * * @param locationName The name of the location. - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -260,8 +206,7 @@ public Mono checkWithLocationAsync(String locationNa * Check the availability of name for resource. * * @param locationName The name of the location. - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -271,37 +216,17 @@ public Mono checkWithLocationAsync(String locationNa @ServiceMethod(returns = ReturnType.SINGLE) public Response checkWithLocationWithResponse(String locationName, CheckNameAvailabilityRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (locationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.checkWithLocationSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, parameters, accept, context); + this.client.getSubscriptionId(), locationName, contentType, accept, parameters, context); } /** * Check the availability of name for resource. * * @param locationName The name of the location. - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -311,6 +236,4 @@ public Response checkWithLocationWithResponse(String public NameAvailabilityModelInner checkWithLocation(String locationName, CheckNameAvailabilityRequest parameters) { return checkWithLocationWithResponse(locationName, parameters, Context.NONE).getValue(); } - - private static final ClientLogger LOGGER = new ClientLogger(NameAvailabilitiesClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesImpl.java index d919ecebe8c4..d0f7680d29a0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityModelImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityModelImpl.java index 0d9e63df1f11..874f0d1ae8d3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityModelImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityModelImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ObjectRecommendationImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ObjectRecommendationImpl.java index 682345629727..323d6dce3bbf 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ObjectRecommendationImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ObjectRecommendationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationImpl.java index 35fb8ee9e6cb..9d2dd1580a99 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; 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 fdbc9e1814e2..1046edf21cb3 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -25,10 +25,9 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.OperationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.OperationInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OperationList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.OperationList; import reactor.core.publisher.Mono; /** @@ -60,21 +59,21 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for PostgreSqlManagementClientOperations to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.DBforPostgreSQL/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.DBforPostgreSQL/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -82,14 +81,14 @@ Response listSync(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -97,15 +96,11 @@ Response listNextSync(@PathParam(value = "nextLink", encoded = tr * * @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 list of resource provider operations along with {@link PagedResponse} on successful completion of + * @return paged collection of Operation items along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - 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( @@ -120,7 +115,7 @@ private Mono> listSinglePageAsync() { * * @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 list of resource provider operations as paginated response with {@link PagedFlux}. + * @return paged collection of Operation items as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync() { @@ -132,15 +127,10 @@ public PagedFlux listAsync() { * * @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 list of resource provider operations along with {@link PagedResponse}. + * @return paged collection of Operation items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage() { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); @@ -155,15 +145,10 @@ private PagedResponse listSinglePage() { * @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 list of resource provider operations along with {@link PagedResponse}. + * @return paged collection of Operation items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); @@ -176,7 +161,7 @@ private PagedResponse listSinglePage(Context context) { * * @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 list of resource provider operations as paginated response with {@link PagedIterable}. + * @return paged collection of Operation items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -190,7 +175,7 @@ public PagedIterable list() { * @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 list of resource provider operations as paginated response with {@link PagedIterable}. + * @return paged collection of Operation items as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -204,18 +189,11 @@ public PagedIterable list(Context context) { * @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 list of resource provider operations along with {@link PagedResponse} on successful completion of + * @return paged collection of Operation items 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(), @@ -230,19 +208,10 @@ private Mono> listNextSinglePageAsync(String nextL * @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 list of resource provider operations along with {@link PagedResponse}. + * @return paged collection of Operation items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -257,24 +226,13 @@ private PagedResponse listNextSinglePage(String nextLink) { * @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 list of resource provider operations along with {@link PagedResponse}. + * @return paged collection of Operation items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(OperationsClientImpl.class); } 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 fd1c7177f3a7..b27bbdc5e7e0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; 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/PostgreSqlManagementClientBuilder.java index 64d250e2957b..70569dc34674 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/PostgreSqlManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -20,34 +20,34 @@ @ServiceClientBuilder(serviceClients = { PostgreSqlManagementClientImpl.class }) public final class PostgreSqlManagementClientBuilder { /* - * The ID of the target subscription. The value must be an UUID. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the PostgreSqlManagementClientBuilder. */ - public PostgreSqlManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public PostgreSqlManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the PostgreSqlManagementClientBuilder. */ - public PostgreSqlManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public PostgreSqlManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -132,7 +132,7 @@ public PostgreSqlManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); PostgreSqlManagementClientImpl client = new PostgreSqlManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); 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/PostgreSqlManagementClientImpl.java index 7e358d1905d3..a096d6107840 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/PostgreSqlManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -65,26 +65,12 @@ @ServiceClient(builder = PostgreSqlManagementClientBuilder.class) public final class PostgreSqlManagementClientImpl implements PostgreSqlManagementClient { /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -93,12 +79,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -106,6 +92,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -149,311 +149,311 @@ public Duration getDefaultPollInterval() { } /** - * The AdministratorsMicrosoftEntrasClient object to access its operations. + * The OperationsClient object to access its operations. */ - private final AdministratorsMicrosoftEntrasClient administratorsMicrosoftEntras; + private final OperationsClient operations; /** - * Gets the AdministratorsMicrosoftEntrasClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the AdministratorsMicrosoftEntrasClient object. + * @return the OperationsClient object. */ - public AdministratorsMicrosoftEntrasClient getAdministratorsMicrosoftEntras() { - return this.administratorsMicrosoftEntras; + public OperationsClient getOperations() { + return this.operations; } /** - * The AdvancedThreatProtectionSettingsClient object to access its operations. + * The MigrationsClient object to access its operations. */ - private final AdvancedThreatProtectionSettingsClient advancedThreatProtectionSettings; + private final MigrationsClient migrations; /** - * Gets the AdvancedThreatProtectionSettingsClient object to access its operations. + * Gets the MigrationsClient object to access its operations. * - * @return the AdvancedThreatProtectionSettingsClient object. + * @return the MigrationsClient object. */ - public AdvancedThreatProtectionSettingsClient getAdvancedThreatProtectionSettings() { - return this.advancedThreatProtectionSettings; + public MigrationsClient getMigrations() { + return this.migrations; } /** - * The ServerThreatProtectionSettingsClient object to access its operations. + * The ServersClient object to access its operations. */ - private final ServerThreatProtectionSettingsClient serverThreatProtectionSettings; + private final ServersClient servers; /** - * Gets the ServerThreatProtectionSettingsClient object to access its operations. + * Gets the ServersClient object to access its operations. * - * @return the ServerThreatProtectionSettingsClient object. + * @return the ServersClient object. */ - public ServerThreatProtectionSettingsClient getServerThreatProtectionSettings() { - return this.serverThreatProtectionSettings; + public ServersClient getServers() { + return this.servers; } /** - * The BackupsAutomaticAndOnDemandsClient object to access its operations. + * The ConfigurationsClient object to access its operations. */ - private final BackupsAutomaticAndOnDemandsClient backupsAutomaticAndOnDemands; + private final ConfigurationsClient configurations; /** - * Gets the BackupsAutomaticAndOnDemandsClient object to access its operations. + * Gets the ConfigurationsClient object to access its operations. * - * @return the BackupsAutomaticAndOnDemandsClient object. + * @return the ConfigurationsClient object. */ - public BackupsAutomaticAndOnDemandsClient getBackupsAutomaticAndOnDemands() { - return this.backupsAutomaticAndOnDemands; + public ConfigurationsClient getConfigurations() { + return this.configurations; } /** - * The CapabilitiesByLocationsClient object to access its operations. + * The DatabasesClient object to access its operations. */ - private final CapabilitiesByLocationsClient capabilitiesByLocations; + private final DatabasesClient databases; /** - * Gets the CapabilitiesByLocationsClient object to access its operations. + * Gets the DatabasesClient object to access its operations. * - * @return the CapabilitiesByLocationsClient object. + * @return the DatabasesClient object. */ - public CapabilitiesByLocationsClient getCapabilitiesByLocations() { - return this.capabilitiesByLocations; + public DatabasesClient getDatabases() { + return this.databases; } /** - * The CapabilitiesByServersClient object to access its operations. + * The FirewallRulesClient object to access its operations. */ - private final CapabilitiesByServersClient capabilitiesByServers; + private final FirewallRulesClient firewallRules; /** - * Gets the CapabilitiesByServersClient object to access its operations. + * Gets the FirewallRulesClient object to access its operations. * - * @return the CapabilitiesByServersClient object. + * @return the FirewallRulesClient object. */ - public CapabilitiesByServersClient getCapabilitiesByServers() { - return this.capabilitiesByServers; + public FirewallRulesClient getFirewallRules() { + return this.firewallRules; } /** - * The CapturedLogsClient object to access its operations. + * The PrivateEndpointConnectionsClient object to access its operations. */ - private final CapturedLogsClient capturedLogs; + private final PrivateEndpointConnectionsClient privateEndpointConnections; /** - * Gets the CapturedLogsClient object to access its operations. + * Gets the PrivateEndpointConnectionsClient object to access its operations. * - * @return the CapturedLogsClient object. + * @return the PrivateEndpointConnectionsClient object. */ - public CapturedLogsClient getCapturedLogs() { - return this.capturedLogs; + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; } /** - * The ConfigurationsClient object to access its operations. + * The PrivateLinkResourcesClient object to access its operations. */ - private final ConfigurationsClient configurations; + private final PrivateLinkResourcesClient privateLinkResources; /** - * Gets the ConfigurationsClient object to access its operations. + * Gets the PrivateLinkResourcesClient object to access its operations. * - * @return the ConfigurationsClient object. + * @return the PrivateLinkResourcesClient object. */ - public ConfigurationsClient getConfigurations() { - return this.configurations; + public PrivateLinkResourcesClient getPrivateLinkResources() { + return this.privateLinkResources; } /** - * The DatabasesClient object to access its operations. + * The VirtualEndpointsClient object to access its operations. */ - private final DatabasesClient databases; + private final VirtualEndpointsClient virtualEndpoints; /** - * Gets the DatabasesClient object to access its operations. + * Gets the VirtualEndpointsClient object to access its operations. * - * @return the DatabasesClient object. + * @return the VirtualEndpointsClient object. */ - public DatabasesClient getDatabases() { - return this.databases; + public VirtualEndpointsClient getVirtualEndpoints() { + return this.virtualEndpoints; } /** - * The FirewallRulesClient object to access its operations. + * The AdministratorsMicrosoftEntrasClient object to access its operations. */ - private final FirewallRulesClient firewallRules; + private final AdministratorsMicrosoftEntrasClient administratorsMicrosoftEntras; /** - * Gets the FirewallRulesClient object to access its operations. + * Gets the AdministratorsMicrosoftEntrasClient object to access its operations. * - * @return the FirewallRulesClient object. + * @return the AdministratorsMicrosoftEntrasClient object. */ - public FirewallRulesClient getFirewallRules() { - return this.firewallRules; + public AdministratorsMicrosoftEntrasClient getAdministratorsMicrosoftEntras() { + return this.administratorsMicrosoftEntras; } /** - * The BackupsLongTermRetentionsClient object to access its operations. + * The CapabilitiesByServersClient object to access its operations. */ - private final BackupsLongTermRetentionsClient backupsLongTermRetentions; + private final CapabilitiesByServersClient capabilitiesByServers; /** - * Gets the BackupsLongTermRetentionsClient object to access its operations. + * Gets the CapabilitiesByServersClient object to access its operations. * - * @return the BackupsLongTermRetentionsClient object. + * @return the CapabilitiesByServersClient object. */ - public BackupsLongTermRetentionsClient getBackupsLongTermRetentions() { - return this.backupsLongTermRetentions; + public CapabilitiesByServersClient getCapabilitiesByServers() { + return this.capabilitiesByServers; } /** - * The MigrationsClient object to access its operations. + * The CapturedLogsClient object to access its operations. */ - private final MigrationsClient migrations; + private final CapturedLogsClient capturedLogs; /** - * Gets the MigrationsClient object to access its operations. + * Gets the CapturedLogsClient object to access its operations. * - * @return the MigrationsClient object. + * @return the CapturedLogsClient object. */ - public MigrationsClient getMigrations() { - return this.migrations; + public CapturedLogsClient getCapturedLogs() { + return this.capturedLogs; } /** - * The NameAvailabilitiesClient object to access its operations. + * The BackupsLongTermRetentionsClient object to access its operations. */ - private final NameAvailabilitiesClient nameAvailabilities; + private final BackupsLongTermRetentionsClient backupsLongTermRetentions; /** - * Gets the NameAvailabilitiesClient object to access its operations. + * Gets the BackupsLongTermRetentionsClient object to access its operations. * - * @return the NameAvailabilitiesClient object. + * @return the BackupsLongTermRetentionsClient object. */ - public NameAvailabilitiesClient getNameAvailabilities() { - return this.nameAvailabilities; + public BackupsLongTermRetentionsClient getBackupsLongTermRetentions() { + return this.backupsLongTermRetentions; } /** - * The OperationsClient object to access its operations. + * The ReplicasClient object to access its operations. */ - private final OperationsClient operations; + private final ReplicasClient replicas; /** - * Gets the OperationsClient object to access its operations. + * Gets the ReplicasClient object to access its operations. * - * @return the OperationsClient object. + * @return the ReplicasClient object. */ - public OperationsClient getOperations() { - return this.operations; + public ReplicasClient getReplicas() { + return this.replicas; } /** - * The PrivateDnsZoneSuffixesClient object to access its operations. + * The AdvancedThreatProtectionSettingsClient object to access its operations. */ - private final PrivateDnsZoneSuffixesClient privateDnsZoneSuffixes; + private final AdvancedThreatProtectionSettingsClient advancedThreatProtectionSettings; /** - * Gets the PrivateDnsZoneSuffixesClient object to access its operations. + * Gets the AdvancedThreatProtectionSettingsClient object to access its operations. * - * @return the PrivateDnsZoneSuffixesClient object. + * @return the AdvancedThreatProtectionSettingsClient object. */ - public PrivateDnsZoneSuffixesClient getPrivateDnsZoneSuffixes() { - return this.privateDnsZoneSuffixes; + public AdvancedThreatProtectionSettingsClient getAdvancedThreatProtectionSettings() { + return this.advancedThreatProtectionSettings; } /** - * The PrivateEndpointConnectionsClient object to access its operations. + * The ServerThreatProtectionSettingsClient object to access its operations. */ - private final PrivateEndpointConnectionsClient privateEndpointConnections; + private final ServerThreatProtectionSettingsClient serverThreatProtectionSettings; /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. + * Gets the ServerThreatProtectionSettingsClient object to access its operations. * - * @return the PrivateEndpointConnectionsClient object. + * @return the ServerThreatProtectionSettingsClient object. */ - public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { - return this.privateEndpointConnections; + public ServerThreatProtectionSettingsClient getServerThreatProtectionSettings() { + return this.serverThreatProtectionSettings; } /** - * The PrivateLinkResourcesClient object to access its operations. + * The BackupsAutomaticAndOnDemandsClient object to access its operations. */ - private final PrivateLinkResourcesClient privateLinkResources; + private final BackupsAutomaticAndOnDemandsClient backupsAutomaticAndOnDemands; /** - * Gets the PrivateLinkResourcesClient object to access its operations. + * Gets the BackupsAutomaticAndOnDemandsClient object to access its operations. * - * @return the PrivateLinkResourcesClient object. + * @return the BackupsAutomaticAndOnDemandsClient object. */ - public PrivateLinkResourcesClient getPrivateLinkResources() { - return this.privateLinkResources; + public BackupsAutomaticAndOnDemandsClient getBackupsAutomaticAndOnDemands() { + return this.backupsAutomaticAndOnDemands; } /** - * The QuotaUsagesClient object to access its operations. + * The TuningOptionsOperationsClient object to access its operations. */ - private final QuotaUsagesClient quotaUsages; + private final TuningOptionsOperationsClient tuningOptionsOperations; /** - * Gets the QuotaUsagesClient object to access its operations. + * Gets the TuningOptionsOperationsClient object to access its operations. * - * @return the QuotaUsagesClient object. + * @return the TuningOptionsOperationsClient object. */ - public QuotaUsagesClient getQuotaUsages() { - return this.quotaUsages; + public TuningOptionsOperationsClient getTuningOptionsOperations() { + return this.tuningOptionsOperations; } /** - * The ReplicasClient object to access its operations. + * The CapabilitiesByLocationsClient object to access its operations. */ - private final ReplicasClient replicas; + private final CapabilitiesByLocationsClient capabilitiesByLocations; /** - * Gets the ReplicasClient object to access its operations. + * Gets the CapabilitiesByLocationsClient object to access its operations. * - * @return the ReplicasClient object. + * @return the CapabilitiesByLocationsClient object. */ - public ReplicasClient getReplicas() { - return this.replicas; + public CapabilitiesByLocationsClient getCapabilitiesByLocations() { + return this.capabilitiesByLocations; } /** - * The ServersClient object to access its operations. + * The NameAvailabilitiesClient object to access its operations. */ - private final ServersClient servers; + private final NameAvailabilitiesClient nameAvailabilities; /** - * Gets the ServersClient object to access its operations. + * Gets the NameAvailabilitiesClient object to access its operations. * - * @return the ServersClient object. + * @return the NameAvailabilitiesClient object. */ - public ServersClient getServers() { - return this.servers; + public NameAvailabilitiesClient getNameAvailabilities() { + return this.nameAvailabilities; } /** - * The TuningOptionsOperationsClient object to access its operations. + * The PrivateDnsZoneSuffixesClient object to access its operations. */ - private final TuningOptionsOperationsClient tuningOptionsOperations; + private final PrivateDnsZoneSuffixesClient privateDnsZoneSuffixes; /** - * Gets the TuningOptionsOperationsClient object to access its operations. + * Gets the PrivateDnsZoneSuffixesClient object to access its operations. * - * @return the TuningOptionsOperationsClient object. + * @return the PrivateDnsZoneSuffixesClient object. */ - public TuningOptionsOperationsClient getTuningOptionsOperations() { - return this.tuningOptionsOperations; + public PrivateDnsZoneSuffixesClient getPrivateDnsZoneSuffixes() { + return this.privateDnsZoneSuffixes; } /** - * The VirtualEndpointsClient object to access its operations. + * The QuotaUsagesClient object to access its operations. */ - private final VirtualEndpointsClient virtualEndpoints; + private final QuotaUsagesClient quotaUsages; /** - * Gets the VirtualEndpointsClient object to access its operations. + * Gets the QuotaUsagesClient object to access its operations. * - * @return the VirtualEndpointsClient object. + * @return the QuotaUsagesClient object. */ - public VirtualEndpointsClient getVirtualEndpoints() { - return this.virtualEndpoints; + public QuotaUsagesClient getQuotaUsages() { + return this.quotaUsages; } /** @@ -477,39 +477,39 @@ public VirtualNetworkSubnetUsagesClient getVirtualNetworkSubnetUsages() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. + * @param endpoint Service host. * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param endpoint server parameter. */ PostgreSqlManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2025-08-01"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2026-01-01-preview"; + this.operations = new OperationsClientImpl(this); + this.migrations = new MigrationsClientImpl(this); + this.servers = new ServersClientImpl(this); + this.configurations = new ConfigurationsClientImpl(this); + this.databases = new DatabasesClientImpl(this); + this.firewallRules = new FirewallRulesClientImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); + this.virtualEndpoints = new VirtualEndpointsClientImpl(this); this.administratorsMicrosoftEntras = new AdministratorsMicrosoftEntrasClientImpl(this); + this.capabilitiesByServers = new CapabilitiesByServersClientImpl(this); + this.capturedLogs = new CapturedLogsClientImpl(this); + this.backupsLongTermRetentions = new BackupsLongTermRetentionsClientImpl(this); + this.replicas = new ReplicasClientImpl(this); this.advancedThreatProtectionSettings = new AdvancedThreatProtectionSettingsClientImpl(this); this.serverThreatProtectionSettings = new ServerThreatProtectionSettingsClientImpl(this); this.backupsAutomaticAndOnDemands = new BackupsAutomaticAndOnDemandsClientImpl(this); + this.tuningOptionsOperations = new TuningOptionsOperationsClientImpl(this); this.capabilitiesByLocations = new CapabilitiesByLocationsClientImpl(this); - this.capabilitiesByServers = new CapabilitiesByServersClientImpl(this); - this.capturedLogs = new CapturedLogsClientImpl(this); - this.configurations = new ConfigurationsClientImpl(this); - this.databases = new DatabasesClientImpl(this); - this.firewallRules = new FirewallRulesClientImpl(this); - this.backupsLongTermRetentions = new BackupsLongTermRetentionsClientImpl(this); - this.migrations = new MigrationsClientImpl(this); this.nameAvailabilities = new NameAvailabilitiesClientImpl(this); - this.operations = new OperationsClientImpl(this); this.privateDnsZoneSuffixes = new PrivateDnsZoneSuffixesClientImpl(this); - this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); - this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.quotaUsages = new QuotaUsagesClientImpl(this); - this.replicas = new ReplicasClientImpl(this); - this.servers = new ServersClientImpl(this); - this.tuningOptionsOperations = new TuningOptionsOperationsClientImpl(this); - this.virtualEndpoints = new VirtualEndpointsClientImpl(this); this.virtualNetworkSubnetUsages = new VirtualNetworkSubnetUsagesClientImpl(this); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesClientImpl.java index ba89783e72b5..cd33b379b972 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -20,7 +20,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient; import reactor.core.publisher.Mono; @@ -53,21 +52,21 @@ public final class PrivateDnsZoneSuffixesClientImpl implements PrivateDnsZoneSuf * The interface defining all the services for PostgreSqlManagementClientPrivateDnsZoneSuffixes to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientPrivateDnsZoneSuffixes") public interface PrivateDnsZoneSuffixesService { @Headers({ "Content-Type: application/json" }) @Post("/providers/Microsoft.DBforPostgreSQL/getPrivateDnsZoneSuffix") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/providers/Microsoft.DBforPostgreSQL/getPrivateDnsZoneSuffix") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } @@ -80,10 +79,6 @@ Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-v */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync() { - 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( @@ -114,11 +109,6 @@ public Mono getAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); } @@ -134,6 +124,4 @@ public Response getWithResponse(Context context) { public String get() { return getWithResponse(Context.NONE).getValue(); } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateDnsZoneSuffixesClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesImpl.java index c1d0c8343b9b..81a83ca8f898 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; 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 1c017e7a0a48..93d8e052e96f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; 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 66d06037ace7..8028eaa307c6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -30,12 +30,11 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.PrivateEndpointConnectionList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -69,14 +68,14 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi * The interface defining all the services for PostgreSqlManagementClientPrivateEndpointConnections to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientPrivateEndpointConnections") public interface PrivateEndpointConnectionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @@ -86,59 +85,57 @@ Mono> get(@HostParam("$host") String en @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @BodyParam("application/json") PrivateEndpointConnectionInner parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") PrivateEndpointConnectionInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @BodyParam("application/json") PrivateEndpointConnectionInner parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") PrivateEndpointConnectionInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -147,7 +144,7 @@ Mono> listByServer(@HostParam("$host") S @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateEndpointConnections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -157,7 +154,7 @@ Response listByServerSync(@HostParam("$host") Str @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -165,7 +162,7 @@ Mono> listByServerNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -174,7 +171,8 @@ Response listByServerNextSync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -183,25 +181,6 @@ Response listByServerNextSync( @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName) { - 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 (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -215,7 +194,8 @@ public Mono> getWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -233,7 +213,8 @@ public Mono getAsync(String resourceGroupName, S * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -243,29 +224,6 @@ public Mono getAsync(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, accept, context); @@ -276,7 +234,8 @@ public Response getWithResponse(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -293,46 +252,22 @@ public PrivateEndpointConnectionInner get(String resourceGroupName, String serve * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 private endpoint connection resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - 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 (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, - parameters, accept, context)) + contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -341,49 +276,21 @@ public Mono>> updateWithResponseAsync(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 private endpoint connection resource along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, parameters, - accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, contentType, + parameters, Context.NONE); } /** @@ -391,50 +298,22 @@ private Response updateWithResponse(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 private endpoint connection resource along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, parameters, - accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, contentType, + parameters, context); } /** @@ -442,12 +321,13 @@ private Response updateWithResponse(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 the private endpoint connection resource. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( @@ -465,12 +345,13 @@ public PollerFlux, PrivateEndpointCon * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 the private endpoint connection resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( @@ -487,13 +368,14 @@ public SyncPoller, PrivateEndpointCon * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 the private endpoint connection resource. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( @@ -510,12 +392,13 @@ public SyncPoller, PrivateEndpointCon * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 private endpoint connection resource on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateAsync(String resourceGroupName, String serverName, @@ -529,12 +412,13 @@ public Mono updateAsync(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 private endpoint connection resource. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, @@ -547,13 +431,14 @@ public PrivateEndpointConnectionInner update(String resourceGroupName, String se * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 private endpoint connection resource. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public PrivateEndpointConnectionInner update(String resourceGroupName, String serverName, @@ -567,7 +452,8 @@ public PrivateEndpointConnectionInner update(String resourceGroupName, String se * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -576,30 +462,9 @@ public PrivateEndpointConnectionInner update(String resourceGroupName, String se @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName) { - 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 (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName 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, privateEndpointConnectionName, accept, - context)) + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -608,7 +473,8 @@ public Mono>> deleteWithResponseAsync(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -617,32 +483,8 @@ public Mono>> deleteWithResponseAsync(String resourceG @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String serverName, String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, accept, + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, Context.NONE); } @@ -651,7 +493,8 @@ private Response deleteWithResponse(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -661,33 +504,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, accept, - context); + this.client.getSubscriptionId(), resourceGroupName, serverName, privateEndpointConnectionName, context); } /** @@ -695,7 +513,8 @@ private Response deleteWithResponse(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -715,7 +534,8 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -734,7 +554,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -754,7 +575,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -771,7 +593,8 @@ public Mono deleteAsync(String resourceGroupName, String serverName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -786,7 +609,8 @@ public void delete(String resourceGroupName, String serverName, String privateEn * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -812,21 +636,6 @@ public void delete(String resourceGroupName, String serverName, String privateEn @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), @@ -865,24 +674,6 @@ public PagedFlux listByServerAsync(String resour @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -905,24 +696,6 @@ private PagedResponse listByServerSinglePage(Str @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -977,13 +750,6 @@ public PagedIterable listByServer(String resourc */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(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.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1003,15 +769,6 @@ private Mono> listByServerNextSing */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1031,21 +788,10 @@ private PagedResponse listByServerNextSinglePage */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsClientImpl.class); } 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 f3ea45388ed1..326ef3a3fbf1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; 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 23d02b05fac8..ca8f52d58892 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; 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 7d76c3a4eabc..39a3eadfab99 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -25,10 +25,9 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkResourceList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.PrivateLinkResourceList; import reactor.core.publisher.Mono; /** @@ -60,51 +59,51 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource * The interface defining all the services for PostgreSqlManagementClientPrivateLinkResources to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientPrivateLinkResources") public interface PrivateLinkResourcesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources/{groupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("groupName") String groupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources/{groupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("groupName") String groupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources/{groupName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("groupName") String groupName, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources/{groupName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("groupName") String groupName, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -112,10 +111,85 @@ Mono> listByServerNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets a private link resource for PostgreSQL server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param groupName The name of the private link resource. + * @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 private link resource for PostgreSQL server along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String groupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, groupName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a private link resource for PostgreSQL server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param groupName The name of the private link resource. + * @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 private link resource for PostgreSQL server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, String groupName) { + return getWithResponseAsync(resourceGroupName, serverName, groupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a private link resource for PostgreSQL server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param groupName The name of the private link resource. + * @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 private link resource for PostgreSQL server along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + String groupName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, groupName, accept, context); + } + + /** + * Gets a private link resource for PostgreSQL server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param groupName The name of the private link resource. + * @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 private link resource for PostgreSQL server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourceInner get(String resourceGroupName, String serverName, String groupName) { + return getWithResponse(resourceGroupName, serverName, groupName, Context.NONE).getValue(); + } + /** * Gets the private link resources for PostgreSQL server. * @@ -130,21 +204,6 @@ Response listByServerNextSync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), @@ -183,24 +242,6 @@ public PagedFlux listByServerAsync(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -223,24 +264,6 @@ private PagedResponse listByServerSinglePage(String re @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -283,121 +306,6 @@ public PagedIterable listByServer(String resourceGroup nextLink -> listByServerNextSinglePage(nextLink, context)); } - /** - * Gets a private link resource for PostgreSQL server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param groupName The name of the private link resource. - * @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 private link resource for PostgreSQL server along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String groupName) { - 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 (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, groupName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a private link resource for PostgreSQL server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param groupName The name of the private link resource. - * @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 private link resource for PostgreSQL server on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, String groupName) { - return getWithResponseAsync(resourceGroupName, serverName, groupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a private link resource for PostgreSQL server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param groupName The name of the private link resource. - * @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 private link resource for PostgreSQL server along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String groupName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (groupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, groupName, accept, context); - } - - /** - * Gets a private link resource for PostgreSQL server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param groupName The name of the private link resource. - * @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 private link resource for PostgreSQL server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceInner get(String resourceGroupName, String serverName, String groupName) { - return getWithResponse(resourceGroupName, serverName, groupName, Context.NONE).getValue(); - } - /** * Get the next page of items. * @@ -410,13 +318,6 @@ public PrivateLinkResourceInner get(String resourceGroupName, String serverName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(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.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -436,15 +337,6 @@ private Mono> listByServerNextSinglePage */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -464,21 +356,10 @@ private PagedResponse listByServerNextSinglePage(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesClientImpl.class); } 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 5732b22ec1d5..8f492b7b16c0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -27,19 +27,6 @@ public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByServer(String resourceGroupName, String serverName) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String serverName, String groupName, Context context) { Response inner @@ -61,6 +48,19 @@ public PrivateLinkResource get(String resourceGroupName, String serverName, Stri } } + public PagedIterable listByServer(String resourceGroupName, String serverName) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + } + private PrivateLinkResourcesClient serviceClient() { return this.innerClient; } 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 index 7e4b096d6581..2f3cdc4960d2 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; 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 index 9b05338ae9e3..f0eea6f6442c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -25,10 +25,9 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -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.QuotaUsageList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.QuotaUsageList; import reactor.core.publisher.Mono; /** @@ -60,14 +59,14 @@ public final class QuotaUsagesClientImpl implements QuotaUsagesClient { * The interface defining all the services for PostgreSqlManagementClientQuotaUsages to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientQuotaUsages") 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, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); @@ -75,7 +74,7 @@ Mono> list(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/resourceType/flexibleServers/usages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); @@ -84,14 +83,14 @@ Response listSync(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -106,17 +105,6 @@ Response listNextSync(@PathParam(value = "nextLink", encoded = t */ @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(), @@ -151,20 +139,6 @@ public PagedFlux listAsync(String locationName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String locationName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (locationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, accept, Context.NONE); @@ -184,20 +158,6 @@ private PagedResponse listSinglePage(String locationName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String locationName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (locationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, accept, context); @@ -249,13 +209,6 @@ public PagedIterable list(String locationName, Context context) */ @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(), @@ -274,15 +227,6 @@ private Mono> listNextSinglePageAsync(String next */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), @@ -301,20 +245,9 @@ private PagedResponse listNextSinglePage(String nextLink) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(QuotaUsagesClientImpl.class); } 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 index 47d5bef6e5f6..4cdc83f05f32 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; 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 85b5ec9f2a22..d51cbfa39129 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -25,10 +25,9 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ReplicasClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.ServerList; import reactor.core.publisher.Mono; /** @@ -59,14 +58,14 @@ public final class ReplicasClientImpl implements ReplicasClient { * The interface defining all the services for PostgreSqlManagementClientReplicas to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientReplicas") public interface ReplicasService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/replicas") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -75,10 +74,24 @@ Mono> listByServer(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/replicas") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByServerNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -93,27 +106,12 @@ Response listByServerSync(@HostParam("$host") String endpoint, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), null, null)) + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -129,7 +127,8 @@ private Mono> listByServerSinglePageAsync(String reso */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName)); + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePageAsync(nextLink)); } /** @@ -144,29 +143,11 @@ public PagedFlux listByServerAsync(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - null, null); + res.getValue().nextLink(), null); } /** @@ -183,29 +164,11 @@ private PagedResponse listByServerSinglePage(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - null, null); + res.getValue().nextLink(), null); } /** @@ -220,7 +183,8 @@ private PagedResponse listByServerSinglePage(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName)); + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePage(nextLink)); } /** @@ -236,8 +200,62 @@ public PagedIterable listByServer(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context)); + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @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. + * @return a list of servers along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServerNext(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. + * @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 list of servers along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } - private static final ClientLogger LOGGER = new ClientLogger(ReplicasClientImpl.class); + /** + * Get the next page of items. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of servers along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); + return 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/ReplicasImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasImpl.java index 2c4ebe0a0346..f378efe67adc 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceManagerUtils.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceManagerUtils.java index 23110d4f2839..bd548c20b718 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceManagerUtils.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; 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 b4960aae5c93..8cc725d53714 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -21,6 +21,7 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityForPatch; import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow; import com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindowForPatch; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateNetworkStatus; import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnection; @@ -295,6 +296,14 @@ public void stop(Context context) { serviceManager.servers().stop(resourceGroupName, serverName, context); } + public MigrateNetworkStatus migrateNetworkMode() { + return serviceManager.servers().migrateNetworkMode(resourceGroupName, serverName); + } + + public MigrateNetworkStatus migrateNetworkMode(Context context) { + return serviceManager.servers().migrateNetworkMode(resourceGroupName, serverName, context); + } + public ServerImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; 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 6f29286c0364..3bdd53a52ca6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -24,7 +24,6 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient; @@ -63,30 +62,30 @@ public final class ServerThreatProtectionSettingsClientImpl implements ServerThr * The interface defining all the services for PostgreSqlManagementClientServerThreatProtectionSettings to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientServerThreatProtectionSettings") public interface ServerThreatProtectionSettingsService { - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, - @BodyParam("application/json") AdvancedThreatProtectionSettingsModelInner parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") AdvancedThreatProtectionSettingsModelInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{threatProtectionName}") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("threatProtectionName") ThreatProtectionName threatProtectionName, - @BodyParam("application/json") AdvancedThreatProtectionSettingsModelInner parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") AdvancedThreatProtectionSettingsModelInner parameters, Context context); } /** @@ -99,41 +98,16 @@ Response createOrUpdateSync(@HostParam("$host") String endpoint, * @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 advanced threat protection settings of the server along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters) { - 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 (threatProtectionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter threatProtectionName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, threatProtectionName, parameters, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, serverName, threatProtectionName, contentType, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -147,43 +121,15 @@ public Mono>> createOrUpdateWithResponseAsync(String r * @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 advanced threat protection settings of the server along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (threatProtectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter threatProtectionName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, threatProtectionName, parameters, accept, - Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, serverName, threatProtectionName, contentType, + parameters, Context.NONE); } /** @@ -197,44 +143,16 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @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 advanced threat protection settings of the server along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, ThreatProtectionName threatProtectionName, AdvancedThreatProtectionSettingsModelInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (threatProtectionName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter threatProtectionName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, threatProtectionName, parameters, accept, - context); + this.client.getSubscriptionId(), resourceGroupName, serverName, threatProtectionName, contentType, + parameters, context); } /** @@ -247,7 +165,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @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 advanced threat protection settings of the server. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public @@ -272,7 +190,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @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 advanced threat protection settings of the server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public @@ -298,7 +216,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @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 advanced threat protection settings of the server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public @@ -323,7 +241,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @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 advanced threat protection settings of the server on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync(String resourceGroupName, @@ -343,7 +261,7 @@ public Mono createOrUpdateAsync(Stri * @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 advanced threat protection settings of the server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AdvancedThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, @@ -362,7 +280,7 @@ public AdvancedThreatProtectionSettingsModelInner createOrUpdate(String resource * @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 advanced threat protection settings of the server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AdvancedThreatProtectionSettingsModelInner createOrUpdate(String resourceGroupName, String serverName, @@ -371,6 +289,4 @@ public AdvancedThreatProtectionSettingsModelInner createOrUpdate(String resource return beginCreateOrUpdate(resourceGroupName, serverName, threatProtectionName, parameters, context) .getFinalResult(); } - - private static final ClientLogger LOGGER = new ClientLogger(ServerThreatProtectionSettingsClientImpl.class); } 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 39fbc0b5db44..304b1de3bbdd 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; 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 eb9155277701..62668cba4c87 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -32,14 +32,14 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrateNetworkStatusInner; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerInner; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.ServerList; import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForPatch; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -72,90 +72,90 @@ public final class ServersClientImpl implements ServersClient { * The interface defining all the services for PostgreSqlManagementClientServers to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientServers") public interface ServersService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") ServerInner parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") ServerInner parameters, @HeaderParam("Accept") String accept, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") ServerInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") ServerForPatch parameters, @HeaderParam("Accept") String accept, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") ServerInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") ServerForPatch parameters, @HeaderParam("Accept") String accept, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") ServerForPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") - @ExpectedResponses({ 202, 204 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") ServerForPatch parameters, + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @@ -164,7 +164,7 @@ Mono> listByResourceGroup(@HostParam("$host") String endpoi @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("$host") String endpoint, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @@ -173,7 +173,7 @@ Response listByResourceGroupSync(@HostParam("$host") String endpoint @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/flexibleServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -181,62 +181,79 @@ Mono> list(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/flexibleServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/restart") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restart(@HostParam("$host") String endpoint, + Mono>> restart(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") RestartParameter parameters, @HeaderParam("Accept") String accept, - Context context); + @BodyParam("application/json") RestartParameter parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/restart") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response restartSync(@HostParam("$host") String endpoint, + Response restartSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @BodyParam("application/json") RestartParameter parameters, @HeaderParam("Accept") String accept, - Context context); + @BodyParam("application/json") RestartParameter parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/start") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start(@HostParam("$host") String endpoint, + Mono>> start(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/start") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response startSync(@HostParam("$host") String endpoint, + Response startSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/stop") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop(@HostParam("$host") String endpoint, + Mono>> stop(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/stop") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response stopSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Response stopSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrateNetwork") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> migrateNetworkMode(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrateNetwork") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response migrateNetworkModeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -245,7 +262,7 @@ Response stopSync(@HostParam("$host") String endpoint, @QueryParam(" @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -253,14 +270,14 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByResourceGroupNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -268,7 +285,78 @@ Mono> listBySubscriptionNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listBySubscriptionNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets information about an existing server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 information about an existing server along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String serverName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about an existing server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 information about an existing server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, String serverName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, serverName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about an existing server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 information about an existing server along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + } + + /** + * Gets information about an existing server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 information about an existing server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ServerInner getByResourceGroup(String resourceGroupName, String serverName) { + return getByResourceGroupWithResponse(resourceGroupName, serverName, Context.NONE).getValue(); } /** @@ -280,35 +368,15 @@ Response listBySubscriptionNextSync(@PathParam(value = "nextLink", e * @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 properties of a server along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String serverName, ServerInner parameters) { - 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -321,38 +389,14 @@ public Mono>> createOrUpdateWithResponseAsync(String r * @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 properties of a server along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, ServerInner parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, parameters, Context.NONE); } /** @@ -365,38 +409,14 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @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 properties of a server along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String serverName, ServerInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, parameters, context); } /** @@ -408,7 +428,7 @@ private Response createOrUpdateWithResponse(String resourceGroupName * @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 properties of a server. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ServerInner> beginCreateOrUpdateAsync(String resourceGroupName, @@ -428,7 +448,7 @@ public PollerFlux, ServerInner> beginCreateOrUpdateAsync * @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 properties of a server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, @@ -448,7 +468,7 @@ public SyncPoller, ServerInner> beginCreateOrUpdate(Stri * @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 properties of a server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerInner> beginCreateOrUpdate(String resourceGroupName, @@ -467,7 +487,7 @@ public SyncPoller, ServerInner> beginCreateOrUpdate(Stri * @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 properties of a server on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createOrUpdateAsync(String resourceGroupName, String serverName, ServerInner parameters) { @@ -484,7 +504,7 @@ public Mono createOrUpdateAsync(String resourceGroupName, String se * @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 properties of a server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters) { @@ -501,7 +521,7 @@ public ServerInner createOrUpdate(String resourceGroupName, String serverName, S * @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 properties of a server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerInner createOrUpdate(String resourceGroupName, String serverName, ServerInner parameters, @@ -519,35 +539,15 @@ public ServerInner createOrUpdate(String resourceGroupName, String serverName, S * @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 properties of a server along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, ServerForPatch parameters) { - 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -561,38 +561,14 @@ public Mono>> updateWithResponseAsync(String resourceG * @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 properties of a server along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, ServerForPatch parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, parameters, Context.NONE); } /** @@ -606,38 +582,14 @@ private Response updateWithResponse(String resourceGroupName, String * @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 properties of a server along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, ServerForPatch parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, contentType, parameters, context); } /** @@ -650,7 +602,7 @@ private Response updateWithResponse(String resourceGroupName, String * @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 properties of a server. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, ServerInner> beginUpdateAsync(String resourceGroupName, @@ -670,7 +622,7 @@ public PollerFlux, ServerInner> beginUpdateAsync(String * @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 properties of a server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, @@ -691,7 +643,7 @@ public SyncPoller, ServerInner> beginUpdate(String resou * @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 properties of a server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerInner> beginUpdate(String resourceGroupName, String serverName, @@ -711,7 +663,7 @@ public SyncPoller, ServerInner> beginUpdate(String resou * @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 properties of a server on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateAsync(String resourceGroupName, String serverName, ServerForPatch parameters) { @@ -729,7 +681,7 @@ public Mono updateAsync(String resourceGroupName, String serverName * @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 properties of a server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerInner update(String resourceGroupName, String serverName, ServerForPatch parameters) { @@ -747,7 +699,7 @@ public ServerInner update(String resourceGroupName, String serverName, ServerFor * @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 properties of a server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerInner update(String resourceGroupName, String serverName, ServerForPatch parameters, Context context) { @@ -766,25 +718,9 @@ public ServerInner update(String resourceGroupName, String serverName, ServerFor */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName) { - 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.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, serverName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -800,27 +736,8 @@ public Mono>> deleteWithResponseAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, serverName, Context.NONE); } /** @@ -836,27 +753,8 @@ private Response deleteWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, context); } /** @@ -954,110 +852,6 @@ public void delete(String resourceGroupName, String serverName, Context context) beginDelete(resourceGroupName, serverName, context).getFinalResult(); } - /** - * Gets information about an existing server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 information about an existing server along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String serverName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets information about an existing server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 information about an existing server on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByResourceGroupAsync(String resourceGroupName, String serverName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, serverName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets information about an existing server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 information about an existing server along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); - } - - /** - * Gets information about an existing server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 information about an existing server. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServerInner getByResourceGroup(String resourceGroupName, String serverName) { - return getByResourceGroupWithResponse(resourceGroupName, serverName, Context.NONE).getValue(); - } - /** * Lists all servers in a resource group. * @@ -1069,18 +863,6 @@ public ServerInner getByResourceGroup(String resourceGroupName, String serverNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1116,20 +898,6 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupName) */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); @@ -1149,20 +917,6 @@ private PagedResponse listByResourceGroupSinglePage(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); @@ -1210,14 +964,6 @@ public PagedIterable listByResourceGroup(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1249,16 +995,6 @@ public PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage() { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); @@ -1277,16 +1013,6 @@ private PagedResponse listSinglePage() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); @@ -1335,28 +1061,9 @@ public PagedIterable list(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> restartWithResponseAsync(String resourceGroupName, String serverName, RestartParameter parameters) { - 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 (parameters != null) { - parameters.validate(); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1374,30 +1081,8 @@ public Mono>> restartWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response restartWithResponse(String resourceGroupName, String serverName, RestartParameter parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters != null) { - parameters.validate(); - } - final String accept = "application/json"; return service.restartSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, Context.NONE); } /** @@ -1415,30 +1100,8 @@ private Response restartWithResponse(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Response restartWithResponse(String resourceGroupName, String serverName, RestartParameter parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (parameters != null) { - parameters.validate(); - } - final String accept = "application/json"; return service.restartSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, context); } /** @@ -1609,25 +1272,9 @@ public void restart(String resourceGroupName, String serverName, RestartParamete */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> startWithResponseAsync(String resourceGroupName, String serverName) { - 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.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, serverName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1643,27 +1290,8 @@ public Mono>> startWithResponseAsync(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) private Response startWithResponse(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, serverName, Context.NONE); } /** @@ -1679,27 +1307,8 @@ private Response startWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Response startWithResponse(String resourceGroupName, String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, context); } /** @@ -1808,25 +1417,9 @@ public void start(String resourceGroupName, String serverName, Context context) */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> stopWithResponseAsync(String resourceGroupName, String serverName) { - 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.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, serverName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1842,27 +1435,8 @@ public Mono>> stopWithResponseAsync(String resourceGro */ @ServiceMethod(returns = ReturnType.SINGLE) private Response stopWithResponse(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; return service.stopSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, accept, Context.NONE); + resourceGroupName, serverName, Context.NONE); } /** @@ -1878,27 +1452,8 @@ private Response stopWithResponse(String resourceGroupName, String s */ @ServiceMethod(returns = ReturnType.SINGLE) private Response stopWithResponse(String resourceGroupName, String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - final String accept = "application/json"; return service.stopSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, accept, context); + resourceGroupName, serverName, context); } /** @@ -1995,6 +1550,184 @@ public void stop(String resourceGroupName, String serverName, Context context) { beginStop(resourceGroupName, serverName, context).getFinalResult(); } + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 status of a network migration operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> migrateNetworkModeWithResponseAsync(String resourceGroupName, + String serverName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.migrateNetworkMode(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 status of a network migration operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response migrateNetworkModeWithResponse(String resourceGroupName, String serverName) { + final String accept = "application/json"; + return service.migrateNetworkModeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + } + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 status of a network migration operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response migrateNetworkModeWithResponse(String resourceGroupName, String serverName, + Context context) { + final String accept = "application/json"; + return service.migrateNetworkModeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + } + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 the status of a network migration operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, MigrateNetworkStatusInner> + beginMigrateNetworkModeAsync(String resourceGroupName, String serverName) { + Mono>> mono = migrateNetworkModeWithResponseAsync(resourceGroupName, serverName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MigrateNetworkStatusInner.class, MigrateNetworkStatusInner.class, + this.client.getContext()); + } + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 the status of a network migration operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MigrateNetworkStatusInner> + beginMigrateNetworkMode(String resourceGroupName, String serverName) { + Response response = migrateNetworkModeWithResponse(resourceGroupName, serverName); + return this.client.getLroResult(response, + MigrateNetworkStatusInner.class, MigrateNetworkStatusInner.class, Context.NONE); + } + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 the status of a network migration operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MigrateNetworkStatusInner> + beginMigrateNetworkMode(String resourceGroupName, String serverName, Context context) { + Response response = migrateNetworkModeWithResponse(resourceGroupName, serverName, context); + return this.client.getLroResult(response, + MigrateNetworkStatusInner.class, MigrateNetworkStatusInner.class, context); + } + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 status of a network migration operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono migrateNetworkModeAsync(String resourceGroupName, String serverName) { + return beginMigrateNetworkModeAsync(resourceGroupName, serverName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 status of a network migration operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MigrateNetworkStatusInner migrateNetworkMode(String resourceGroupName, String serverName) { + return beginMigrateNetworkMode(resourceGroupName, serverName).getFinalResult(); + } + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 status of a network migration operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MigrateNetworkStatusInner migrateNetworkMode(String resourceGroupName, String serverName, Context context) { + return beginMigrateNetworkMode(resourceGroupName, serverName, context).getFinalResult(); + } + /** * Get the next page of items. * @@ -2006,13 +1739,6 @@ public void stop(String resourceGroupName, String serverName, Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(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( @@ -2033,15 +1759,6 @@ private Mono> listByResourceGroupNextSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -2061,15 +1778,6 @@ private PagedResponse listByResourceGroupNextSinglePage(String next */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -2088,13 +1796,6 @@ private PagedResponse listByResourceGroupNextSinglePage(String next */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(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( @@ -2115,15 +1816,6 @@ private Mono> listBySubscriptionNextSinglePageAsync(S */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -2143,21 +1835,10 @@ private PagedResponse listBySubscriptionNextSinglePage(String nextL */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(ServersClientImpl.class); } 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 baee87c114dc..61cd834bf962 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -10,7 +10,9 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrateNetworkStatusInner; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerInner; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateNetworkStatus; import com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter; import com.azure.resourcemanager.postgresqlflexibleserver.models.Server; import com.azure.resourcemanager.postgresqlflexibleserver.models.Servers; @@ -28,14 +30,6 @@ public ServersImpl(ServersClient innerClient, this.serviceManager = serviceManager; } - public void deleteByResourceGroup(String resourceGroupName, String serverName) { - this.serviceClient().delete(resourceGroupName, serverName); - } - - public void delete(String resourceGroupName, String serverName, Context context) { - this.serviceClient().delete(resourceGroupName, serverName, context); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context) { Response inner @@ -57,6 +51,14 @@ public Server getByResourceGroup(String resourceGroupName, String serverName) { } } + public void deleteByResourceGroup(String resourceGroupName, String serverName) { + this.serviceClient().delete(resourceGroupName, serverName); + } + + public void delete(String resourceGroupName, String serverName, Context context) { + this.serviceClient().delete(resourceGroupName, serverName, context); + } + public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new ServerImpl(inner1, this.manager())); @@ -101,6 +103,25 @@ public void stop(String resourceGroupName, String serverName, Context context) { this.serviceClient().stop(resourceGroupName, serverName, context); } + public MigrateNetworkStatus migrateNetworkMode(String resourceGroupName, String serverName) { + MigrateNetworkStatusInner inner = this.serviceClient().migrateNetworkMode(resourceGroupName, serverName); + if (inner != null) { + return new MigrateNetworkStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public MigrateNetworkStatus migrateNetworkMode(String resourceGroupName, String serverName, Context context) { + MigrateNetworkStatusInner inner + = this.serviceClient().migrateNetworkMode(resourceGroupName, serverName, context); + if (inner != null) { + return new MigrateNetworkStatusImpl(inner, this.manager()); + } else { + return null; + } + } + public Server getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsImpl.java index ee4e55f1fe38..895ffdf10ad2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsClientImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsClientImpl.java index 334f50232370..c63b871804e1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsClientImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -25,14 +25,13 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.ObjectRecommendationList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.TuningOptionsList; import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeParameterEnum; import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsList; import reactor.core.publisher.Mono; /** @@ -64,14 +63,14 @@ public final class TuningOptionsOperationsClientImpl implements TuningOptionsOpe * The interface defining all the services for PostgreSqlManagementClientTuningOptionsOperations to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientTuningOptionsOperations") public interface TuningOptionsOperationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("tuningOption") TuningOptionParameterEnum tuningOption, @HeaderParam("Accept") String accept, @@ -81,82 +80,82 @@ Mono> get(@HostParam("$host") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("tuningOption") TuningOptionParameterEnum tuningOption, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/recommendations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRecommendations(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionParameterEnum tuningOption, - @QueryParam("recommendationType") RecommendationTypeParameterEnum recommendationType, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/recommendations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listRecommendationsSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("tuningOption") TuningOptionParameterEnum tuningOption, - @QueryParam("recommendationType") RecommendationTypeParameterEnum recommendationType, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/recommendations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listRecommendations(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("tuningOption") TuningOptionParameterEnum tuningOption, + @QueryParam("recommendationType") RecommendationTypeParameterEnum recommendationType, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/tuningOptions/{tuningOption}/recommendations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listRecommendationsSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @PathParam("tuningOption") TuningOptionParameterEnum tuningOption, + @QueryParam("recommendationType") RecommendationTypeParameterEnum recommendationType, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listRecommendationsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listByServerNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listRecommendationsNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Mono> listRecommendationsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + Response listRecommendationsNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** @@ -173,24 +172,6 @@ Response listByServerNextSync(@PathParam(value = "nextLink", @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getWithResponseAsync(String resourceGroupName, String serverName, TuningOptionParameterEnum tuningOption) { - 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 (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -231,28 +212,6 @@ public Mono getAsync(String resourceGroupName, String server @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String serverName, TuningOptionParameterEnum tuningOption, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, accept, context); @@ -274,6 +233,120 @@ public TuningOptionsInner get(String resourceGroupName, String serverName, Tunin return getWithResponse(resourceGroupName, serverName, tuningOption, Context.NONE).getValue(); } + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of server tuning options along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByServerSinglePageAsync(String resourceGroupName, + String serverName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, 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())); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of server tuning options as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { + return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePageAsync(nextLink)); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of server tuning options along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { + final String accept = "application/json"; + Response res + = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of server tuning options along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, + Context context) { + final String accept = "application/json"; + Response res + = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of server tuning options as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName) { + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), + nextLink -> listByServerNextSinglePage(nextLink)); + } + + /** + * Lists the tuning options of a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 list of server tuning options as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByServer(String resourceGroupName, String serverName, + Context context) { + return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), + nextLink -> listByServerNextSinglePage(nextLink, context)); + } + /** * Lists available object recommendations. * @@ -290,24 +363,6 @@ public TuningOptionsInner get(String resourceGroupName, String serverName, Tunin @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRecommendationsSinglePageAsync(String resourceGroupName, String serverName, TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType) { - 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 (tuningOption == null) { - return Mono.error(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listRecommendations(this.client.getEndpoint(), this.client.getApiVersion(), @@ -373,28 +428,6 @@ public PagedFlux listRecommendationsAsync(String reso @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listRecommendationsSinglePage(String resourceGroupName, String serverName, TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listRecommendationsSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, @@ -420,28 +453,6 @@ private PagedResponse listRecommendationsSinglePage(S private PagedResponse listRecommendationsSinglePage(String resourceGroupName, String serverName, TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (tuningOption == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter tuningOption is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listRecommendationsSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, serverName, tuningOption, @@ -491,101 +502,46 @@ public PagedIterable listRecommendations(String resou } /** - * Lists the tuning options of a server. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @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. * @return list of server tuning options along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerSinglePageAsync(String resourceGroupName, - String serverName) { - 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.")); - } + private Mono> listByServerNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context)) + .withContext(context -> service.listByServerNext(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())); } /** - * Lists the tuning options of a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 list of server tuning options as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByServerAsync(String resourceGroupName, String serverName) { - return new PagedFlux<>(() -> listByServerSinglePageAsync(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePageAsync(nextLink)); - } - - /** - * Lists the tuning options of a server. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @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. * @return list of server tuning options along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } + private PagedResponse listByServerNextSinglePage(String nextLink) { final String accept = "application/json"; Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, Context.NONE); + = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } /** - * Lists the tuning options of a server. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. + * @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. @@ -593,68 +549,14 @@ private PagedResponse listByServerSinglePage(String resource * @return list of server tuning options along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, - Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } + private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; Response res - = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context); + = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - /** - * Lists the tuning options of a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 list of server tuning options as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName), - nextLink -> listByServerNextSinglePage(nextLink)); - } - - /** - * Lists the tuning options of a server. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @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 list of server tuning options as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByServer(String resourceGroupName, String serverName, - Context context) { - return new PagedIterable<>(() -> listByServerSinglePage(resourceGroupName, serverName, context), - nextLink -> listByServerNextSinglePage(nextLink, context)); - } - /** * Get the next page of items. * @@ -667,13 +569,6 @@ public PagedIterable listByServer(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRecommendationsNextSinglePageAsync(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( @@ -694,15 +589,6 @@ private Mono> listRecommendationsNextSi */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listRecommendationsNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listRecommendationsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -723,102 +609,10 @@ private PagedResponse listRecommendationsNextSinglePa @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listRecommendationsNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listRecommendationsNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - /** - * Get the next page of items. - * - * @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. - * @return list of server tuning options along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServerNextSinglePageAsync(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.listByServerNext(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. - * @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 list of server tuning options along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of server tuning options along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - Response res - = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - private static final ClientLogger LOGGER = new ClientLogger(TuningOptionsOperationsClientImpl.class); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsImpl.java index db3ea6b26793..cd5ee263a2c1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -52,6 +52,17 @@ public TuningOptions get(String resourceGroupName, String serverName, TuningOpti } } + public PagedIterable listByServer(String resourceGroupName, String serverName) { + PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TuningOptionsImpl(inner1, this.manager())); + } + + public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { + PagedIterable inner + = this.serviceClient().listByServer(resourceGroupName, serverName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TuningOptionsImpl(inner1, this.manager())); + } + public PagedIterable listRecommendations(String resourceGroupName, String serverName, TuningOptionParameterEnum tuningOption) { PagedIterable inner @@ -66,17 +77,6 @@ public PagedIterable listRecommendations(String resourceGr return ResourceManagerUtils.mapPage(inner, inner1 -> new ObjectRecommendationImpl(inner1, this.manager())); } - public PagedIterable listByServer(String resourceGroupName, String serverName) { - PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TuningOptionsImpl(inner1, this.manager())); - } - - public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { - PagedIterable inner - = this.serviceClient().listByServer(resourceGroupName, serverName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new TuningOptionsImpl(inner1, this.manager())); - } - private TuningOptionsOperationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointImpl.java index f8eb88475a26..72a84e6d570d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -18,6 +18,22 @@ public final class VirtualEndpointImpl implements VirtualEndpoint, VirtualEndpoi private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager; + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + public VirtualEndpointType endpointType() { return this.innerModel().endpointType(); } @@ -40,22 +56,6 @@ public List virtualEndpoints() { } } - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - public String resourceGroupName() { return resourceGroupName; } 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 fe7e11422cee..0656e25e4f9a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -31,13 +31,12 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.VirtualEndpointsList; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResourceForPatch; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointsList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -71,98 +70,96 @@ public final class VirtualEndpointsClientImpl implements VirtualEndpointsClient * The interface defining all the services for PostgreSqlManagementClientVirtualEndpoints to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientVirtualEndpoints") public interface VirtualEndpointsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("virtualEndpointName") String virtualEndpointName, - @BodyParam("application/json") VirtualEndpointInner parameters, @HeaderParam("Accept") String accept, + @PathParam("virtualEndpointName") String virtualEndpointName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createSync(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("virtualEndpointName") String virtualEndpointName, - @BodyParam("application/json") VirtualEndpointInner parameters, @HeaderParam("Accept") String accept, + @PathParam("virtualEndpointName") String virtualEndpointName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("virtualEndpointName") String virtualEndpointName, - @BodyParam("application/json") VirtualEndpointResourceForPatch parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") VirtualEndpointInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("$host") String endpoint, + Response createSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @PathParam("virtualEndpointName") String virtualEndpointName, - @BodyParam("application/json") VirtualEndpointResourceForPatch parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") VirtualEndpointInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") - @ExpectedResponses({ 202, 204 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("virtualEndpointName") String virtualEndpointName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("virtualEndpointName") String virtualEndpointName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") VirtualEndpointResourceForPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") - @ExpectedResponses({ 202, 204 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("virtualEndpointName") String virtualEndpointName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("virtualEndpointName") String virtualEndpointName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") VirtualEndpointResourceForPatch parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("virtualEndpointName") String virtualEndpointName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("virtualEndpointName") String virtualEndpointName, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints/{virtualEndpointName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @PathParam("virtualEndpointName") String virtualEndpointName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("virtualEndpointName") String virtualEndpointName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByServer(@HostParam("$host") String endpoint, + Mono> listByServer(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -171,7 +168,7 @@ Mono> listByServer(@HostParam("$host") String end @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/virtualendpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByServerSync(@HostParam("$host") String endpoint, + Response listByServerSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, @HeaderParam("Accept") String accept, Context context); @@ -181,7 +178,7 @@ Response listByServerSync(@HostParam("$host") String endpo @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByServerNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -189,10 +186,86 @@ Mono> listByServerNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByServerNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } + /** + * Gets information about a pair of virtual endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @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 information about a pair of virtual endpoints along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String serverName, + String virtualEndpointName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about a pair of virtual endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @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 information about a pair of virtual endpoints on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String serverName, + String virtualEndpointName) { + return getWithResponseAsync(resourceGroupName, serverName, virtualEndpointName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about a pair of virtual endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @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 information about a pair of virtual endpoints along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String serverName, + String virtualEndpointName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, serverName, virtualEndpointName, accept, context); + } + + /** + * Gets information about a pair of virtual endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param virtualEndpointName Base name of the virtual endpoints. + * @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 information about a pair of virtual endpoints. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualEndpointInner get(String resourceGroupName, String serverName, String virtualEndpointName) { + return getWithResponse(resourceGroupName, serverName, virtualEndpointName, Context.NONE).getValue(); + } + /** * Creates a pair of virtual endpoints for a server. * @@ -203,41 +276,16 @@ Response listByServerNextSync( * @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 pair of virtual endpoints for a server along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> createWithResponseAsync(String resourceGroupName, String serverName, String virtualEndpointName, VirtualEndpointInner parameters) { - 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 (virtualEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualEndpointName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, parameters, accept, - context)) + this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, contentType, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -251,43 +299,15 @@ public Mono>> createWithResponseAsync(String resourceG * @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 pair of virtual endpoints for a server along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, String virtualEndpointName, VirtualEndpointInner parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (virtualEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualEndpointName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, parameters, accept, - Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, contentType, + parameters, Context.NONE); } /** @@ -301,43 +321,15 @@ private Response createWithResponse(String resourceGroupName, String * @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 pair of virtual endpoints for a server along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String serverName, String virtualEndpointName, VirtualEndpointInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (virtualEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualEndpointName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, parameters, accept, - context); + this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, contentType, + parameters, context); } /** @@ -350,7 +342,7 @@ private Response createWithResponse(String resourceGroupName, String * @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 pair of virtual endpoints for a server. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, VirtualEndpointInner> beginCreateAsync(String resourceGroupName, @@ -371,7 +363,7 @@ public PollerFlux, VirtualEndpointInner> beginC * @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 pair of virtual endpoints for a server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualEndpointInner> beginCreate(String resourceGroupName, @@ -393,7 +385,7 @@ public SyncPoller, VirtualEndpointInner> beginC * @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 pair of virtual endpoints for a server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualEndpointInner> beginCreate(String resourceGroupName, @@ -414,7 +406,7 @@ public SyncPoller, VirtualEndpointInner> beginC * @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 pair of virtual endpoints for a server on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createAsync(String resourceGroupName, String serverName, @@ -433,7 +425,7 @@ public Mono createAsync(String resourceGroupName, String s * @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 pair of virtual endpoints for a server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public VirtualEndpointInner create(String resourceGroupName, String serverName, String virtualEndpointName, @@ -452,7 +444,7 @@ public VirtualEndpointInner create(String resourceGroupName, String serverName, * @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 pair of virtual endpoints for a server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public VirtualEndpointInner create(String resourceGroupName, String serverName, String virtualEndpointName, @@ -470,41 +462,16 @@ public VirtualEndpointInner create(String resourceGroupName, String serverName, * @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 pair of virtual endpoints for a server along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> updateWithResponseAsync(String resourceGroupName, String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters) { - 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 (virtualEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualEndpointName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, parameters, accept, - context)) + this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, contentType, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -518,43 +485,15 @@ public Mono>> updateWithResponseAsync(String resourceG * @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 pair of virtual endpoints for a server along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (virtualEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualEndpointName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, parameters, accept, - Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, contentType, + parameters, Context.NONE); } /** @@ -568,43 +507,15 @@ private Response updateWithResponse(String resourceGroupName, String * @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 pair of virtual endpoints for a server along with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String serverName, String virtualEndpointName, VirtualEndpointResourceForPatch parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (virtualEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualEndpointName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, parameters, accept, - context); + this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, contentType, + parameters, context); } /** @@ -617,7 +528,7 @@ private Response updateWithResponse(String resourceGroupName, String * @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 pair of virtual endpoints for a server. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, VirtualEndpointInner> beginUpdateAsync(String resourceGroupName, @@ -638,7 +549,7 @@ public PollerFlux, VirtualEndpointInner> beginU * @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 pair of virtual endpoints for a server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualEndpointInner> beginUpdate(String resourceGroupName, @@ -660,7 +571,7 @@ public SyncPoller, VirtualEndpointInner> beginU * @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 pair of virtual endpoints for a server. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualEndpointInner> beginUpdate(String resourceGroupName, @@ -681,7 +592,7 @@ public SyncPoller, VirtualEndpointInner> beginU * @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 pair of virtual endpoints for a server on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateAsync(String resourceGroupName, String serverName, @@ -700,7 +611,7 @@ public Mono updateAsync(String resourceGroupName, String s * @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 pair of virtual endpoints for a server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public VirtualEndpointInner update(String resourceGroupName, String serverName, String virtualEndpointName, @@ -719,7 +630,7 @@ public VirtualEndpointInner update(String resourceGroupName, String serverName, * @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 pair of virtual endpoints for a server. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public VirtualEndpointInner update(String resourceGroupName, String serverName, String virtualEndpointName, @@ -741,29 +652,9 @@ public VirtualEndpointInner update(String resourceGroupName, String serverName, @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName, String virtualEndpointName) { - 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 (virtualEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualEndpointName 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, virtualEndpointName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -781,31 +672,8 @@ public Mono>> deleteWithResponseAsync(String resourceG @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String serverName, String virtualEndpointName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (virtualEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualEndpointName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, accept, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, Context.NONE); } /** @@ -823,31 +691,8 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String serverName, String virtualEndpointName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (virtualEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualEndpointName is required and cannot be null.")); - } - final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, accept, context); + this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, context); } /** @@ -955,123 +800,6 @@ public void delete(String resourceGroupName, String serverName, String virtualEn beginDelete(resourceGroupName, serverName, virtualEndpointName, context).getFinalResult(); } - /** - * Gets information about a pair of virtual endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param virtualEndpointName Base name of the virtual endpoints. - * @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 information about a pair of virtual endpoints along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync(String resourceGroupName, String serverName, - String virtualEndpointName) { - 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 (virtualEndpointName == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualEndpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, serverName, virtualEndpointName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets information about a pair of virtual endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param virtualEndpointName Base name of the virtual endpoints. - * @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 information about a pair of virtual endpoints on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync(String resourceGroupName, String serverName, - String virtualEndpointName) { - return getWithResponseAsync(resourceGroupName, serverName, virtualEndpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets information about a pair of virtual endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param virtualEndpointName Base name of the virtual endpoints. - * @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 information about a pair of virtual endpoints along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String serverName, - String virtualEndpointName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } - if (virtualEndpointName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter virtualEndpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, serverName, virtualEndpointName, accept, context); - } - - /** - * Gets information about a pair of virtual endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param serverName The name of the server. - * @param virtualEndpointName Base name of the virtual endpoints. - * @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 information about a pair of virtual endpoints. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualEndpointInner get(String resourceGroupName, String serverName, String virtualEndpointName) { - return getWithResponse(resourceGroupName, serverName, virtualEndpointName, Context.NONE).getValue(); - } - /** * Lists pair of virtual endpoints associated to a server. * @@ -1085,21 +813,6 @@ public VirtualEndpointInner get(String resourceGroupName, String serverName, Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { - 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.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1137,24 +850,6 @@ public PagedFlux listByServerAsync(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1177,24 +872,6 @@ private PagedResponse listByServerSinglePage(String resour @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerSinglePage(String resourceGroupName, String serverName, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (serverName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerSync(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1248,13 +925,6 @@ public PagedIterable listByServer(String resourceGroupName */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(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.listByServerNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1274,15 +944,6 @@ private Mono> listByServerNextSinglePageAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1302,21 +963,10 @@ private PagedResponse listByServerNextSinglePage(String ne */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByServerNextSinglePage(String nextLink, Context context) { - if (nextLink == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; Response res = service.listByServerNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } - - private static final ClientLogger LOGGER = new ClientLogger(VirtualEndpointsClientImpl.class); } 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 d75b2491e0fe..a4b25857d42a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; @@ -27,14 +27,6 @@ public VirtualEndpointsImpl(VirtualEndpointsClient innerClient, this.serviceManager = serviceManager; } - public void delete(String resourceGroupName, String serverName, String virtualEndpointName) { - this.serviceClient().delete(resourceGroupName, serverName, virtualEndpointName); - } - - public void delete(String resourceGroupName, String serverName, String virtualEndpointName, Context context) { - this.serviceClient().delete(resourceGroupName, serverName, virtualEndpointName, context); - } - public Response getWithResponse(String resourceGroupName, String serverName, String virtualEndpointName, Context context) { Response inner @@ -56,6 +48,14 @@ public VirtualEndpoint get(String resourceGroupName, String serverName, String v } } + public void delete(String resourceGroupName, String serverName, String virtualEndpointName) { + this.serviceClient().delete(resourceGroupName, serverName, virtualEndpointName); + } + + public void delete(String resourceGroupName, String serverName, String virtualEndpointName, Context context) { + this.serviceClient().delete(resourceGroupName, serverName, virtualEndpointName, context); + } + public PagedIterable listByServer(String resourceGroupName, String serverName) { PagedIterable inner = this.serviceClient().listByServer(resourceGroupName, serverName); return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualEndpointImpl(inner1, this.manager())); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageModelImpl.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageModelImpl.java index 6afe82bf3aa6..932d1aefe871 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageModelImpl.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageModelImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; 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 e077dd44cec5..668e562bfcd7 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 @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; 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; @@ -22,7 +21,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; @@ -57,35 +55,33 @@ public final class VirtualNetworkSubnetUsagesClientImpl implements VirtualNetwor * The interface defining all the services for PostgreSqlManagementClientVirtualNetworkSubnetUsages to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") + @Host("{endpoint}") @ServiceInterface(name = "PostgreSqlManagementClientVirtualNetworkSubnetUsages") public interface VirtualNetworkSubnetUsagesService { - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkVirtualNetworkSubnetUsage") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @BodyParam("application/json") VirtualNetworkSubnetUsageParameter parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("locationName") String locationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") VirtualNetworkSubnetUsageParameter parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/checkVirtualNetworkSubnetUsage") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @BodyParam("application/json") VirtualNetworkSubnetUsageParameter parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("locationName") String locationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") VirtualNetworkSubnetUsageParameter parameters, Context context); } /** * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. - * @param parameters The required parameters for creating or updating a server. + * @param parameters The request body. * @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. @@ -94,26 +90,11 @@ Response listSync(@HostParam("$host") Strin @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listWithResponseAsync(String locationName, VirtualNetworkSubnetUsageParameter parameters) { - 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.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), locationName, parameters, accept, context)) + this.client.getSubscriptionId(), locationName, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -121,7 +102,7 @@ public Mono> listWithResponseAsync * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. - * @param parameters The required parameters for creating or updating a server. + * @param parameters The request body. * @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. @@ -137,7 +118,7 @@ public Mono listAsync(String locationName, * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. - * @param parameters The required parameters for creating or updating a server. + * @param parameters The request body. * @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. @@ -147,36 +128,17 @@ public Mono listAsync(String locationName, @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse(String locationName, VirtualNetworkSubnetUsageParameter parameters, Context context) { - if (this.client.getEndpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (locationName == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (parameters == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - locationName, parameters, accept, context); + locationName, contentType, accept, parameters, context); } /** * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. - * @param parameters The required parameters for creating or updating a server. + * @param parameters The request body. * @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. @@ -187,6 +149,4 @@ public VirtualNetworkSubnetUsageModelInner list(String locationName, VirtualNetworkSubnetUsageParameter parameters) { return listWithResponse(locationName, parameters, Context.NONE).getValue(); } - - private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkSubnetUsagesClientImpl.class); } 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 1eebfa8d752c..5adce34d7373 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.implementation; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/AdministratorMicrosoftEntraList.java similarity index 65% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/AdministratorMicrosoftEntraList.java index 54e97f4d55ed..1fcd9756df7a 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/AdministratorMicrosoftEntraList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of server administrators associated to Microsoft Entra principals. */ -@Fluent +@Immutable public final class AdministratorMicrosoftEntraList implements JsonSerializable { /* - * List of server administrators associated to Microsoft Entra principals. + * The AdministratorMicrosoftEntra items on this page */ private List value; /* - * Link used to get the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of AdministratorMicrosoftEntraList class. */ - public AdministratorMicrosoftEntraList() { + private AdministratorMicrosoftEntraList() { } /** - * Get the value property: List of server administrators associated to Microsoft Entra principals. + * Get the value property: The AdministratorMicrosoftEntra items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of server administrators associated to Microsoft Entra principals. - * - * @param value the value value to set. - * @return the AdministratorMicrosoftEntraList object itself. - */ - public AdministratorMicrosoftEntraList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link used to get the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link used to get the next page of results. - * - * @param nextLink the nextLink value to set. - * @return the AdministratorMicrosoftEntraList object itself. - */ - public AdministratorMicrosoftEntraList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AdministratorMicrosoftEntraList 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 AdministratorMicrosoftEntraList. */ public static AdministratorMicrosoftEntraList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/AdvancedThreatProtectionSettingsList.java similarity index 73% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/AdvancedThreatProtectionSettingsList.java index 96786efbebf3..44976f876bf4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/AdvancedThreatProtectionSettingsList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * List of advanced threat protection settings for a server. */ -@Fluent +@Immutable public final class AdvancedThreatProtectionSettingsList implements JsonSerializable { /* - * Array of results. + * The AdvancedThreatProtectionSettingsModel items on this page */ private List value; /* - * Link used to get the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of AdvancedThreatProtectionSettingsList class. */ - public AdvancedThreatProtectionSettingsList() { + private AdvancedThreatProtectionSettingsList() { } /** - * Get the value property: Array of results. + * Get the value property: The AdvancedThreatProtectionSettingsModel items on this page. * * @return the value value. */ @@ -45,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: Link used to get the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,28 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link used to get the next page of results. - * - * @param nextLink the nextLink value to set. - * @return the AdvancedThreatProtectionSettingsList object itself. - */ - public AdvancedThreatProtectionSettingsList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -91,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AdvancedThreatProtectionSettingsList 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 AdvancedThreatProtectionSettingsList. */ public static AdvancedThreatProtectionSettingsList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemandList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/BackupAutomaticAndOnDemandList.java similarity index 67% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemandList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/BackupAutomaticAndOnDemandList.java index d0ca493dea86..18e3bd4c5205 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemandList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/BackupAutomaticAndOnDemandList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of backups. */ -@Fluent +@Immutable public final class BackupAutomaticAndOnDemandList implements JsonSerializable { /* - * List of available backups. + * The BackupAutomaticAndOnDemand items on this page */ private List value; /* - * Link used to get the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of BackupAutomaticAndOnDemandList class. */ - public BackupAutomaticAndOnDemandList() { + private BackupAutomaticAndOnDemandList() { } /** - * Get the value property: List of available backups. + * Get the value property: The BackupAutomaticAndOnDemand items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of available backups. - * - * @param value the value value to set. - * @return the BackupAutomaticAndOnDemandList object itself. - */ - public BackupAutomaticAndOnDemandList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link used to get the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link used to get the next page of results. - * - * @param nextLink the nextLink value to set. - * @return the BackupAutomaticAndOnDemandList object itself. - */ - public BackupAutomaticAndOnDemandList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of BackupAutomaticAndOnDemandList 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 BackupAutomaticAndOnDemandList. */ public static BackupAutomaticAndOnDemandList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/CapabilityList.java similarity index 71% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/CapabilityList.java index d2232f3a41c1..91a6b5beb403 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/CapabilityList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of capabilities for the Azure Database for PostgreSQL flexible server. */ -@Fluent +@Immutable public final class CapabilityList implements JsonSerializable { /* - * List of supported capabilities. + * The Capability items on this page */ private List value; /* - * Link to retrieve next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of CapabilityList class. */ - public CapabilityList() { + private CapabilityList() { } /** - * Get the value property: List of supported capabilities. + * Get the value property: The Capability items on this page. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: Link to retrieve next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -52,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link to retrieve next page of results. - * - * @param nextLink the nextLink value to set. - * @return the CapabilityList object itself. - */ - public CapabilityList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -90,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of CapabilityList 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 CapabilityList. */ public static CapabilityList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/CapturedLogList.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/CapturedLogList.java index 94da97e002e2..cbb9d1666f23 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/CapturedLogList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of log files. */ -@Fluent +@Immutable public final class CapturedLogList implements JsonSerializable { /* - * List of log files in a server. + * The CapturedLog items on this page */ private List value; /* - * Link used to get the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of CapturedLogList class. */ - public CapturedLogList() { + private CapturedLogList() { } /** - * Get the value property: List of log files in a server. + * Get the value property: The CapturedLog items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of log files in a server. - * - * @param value the value value to set. - * @return the CapturedLogList object itself. - */ - public CapturedLogList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link used to get the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link used to get the next page of results. - * - * @param nextLink the nextLink value to set. - * @return the CapturedLogList object itself. - */ - public CapturedLogList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of CapturedLogList 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 CapturedLogList. */ public static CapturedLogList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/ConfigurationList.java similarity index 65% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/ConfigurationList.java index 58d831e2f356..f10db1dbba7a 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/ConfigurationList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of configurations (also known as server parameters). */ -@Fluent +@Immutable public final class ConfigurationList implements JsonSerializable { /* - * List of configurations (also known as server parameters). + * The Configuration items on this page */ private List value; /* - * Link used to get the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ConfigurationList class. */ - public ConfigurationList() { + private ConfigurationList() { } /** - * Get the value property: List of configurations (also known as server parameters). + * Get the value property: The Configuration items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of configurations (also known as server parameters). - * - * @param value the value value to set. - * @return the ConfigurationList object itself. - */ - public ConfigurationList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link used to get the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link used to get the next page of results. - * - * @param nextLink the nextLink value to set. - * @return the ConfigurationList object itself. - */ - public ConfigurationList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ConfigurationList 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 ConfigurationList. */ public static ConfigurationList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/DatabaseList.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/DatabaseList.java index 7bde8bee07fc..f7329ef26874 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/DatabaseList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of all databases in a server. */ -@Fluent +@Immutable public final class DatabaseList implements JsonSerializable { /* - * List of all databases in a server. + * The Database items on this page */ private List value; /* - * Link used to get the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of DatabaseList class. */ - public DatabaseList() { + private DatabaseList() { } /** - * Get the value property: List of all databases in a server. + * Get the value property: The Database items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of all databases in a server. - * - * @param value the value value to set. - * @return the DatabaseList object itself. - */ - public DatabaseList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link used to get the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link used to get the next page of results. - * - * @param nextLink the nextLink value to set. - * @return the DatabaseList object itself. - */ - public DatabaseList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DatabaseList 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 DatabaseList. */ public static DatabaseList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/FirewallRuleList.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/FirewallRuleList.java index b6ab09bcb571..5d067a6c2070 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRuleList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/FirewallRuleList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of firewall rules. */ -@Fluent +@Immutable public final class FirewallRuleList implements JsonSerializable { /* - * List of firewall rules in a server. + * The FirewallRule items on this page */ private List value; /* - * Link to retrieve next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of FirewallRuleList class. */ - public FirewallRuleList() { + private FirewallRuleList() { } /** - * Get the value property: List of firewall rules in a server. + * Get the value property: The FirewallRule items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of firewall rules in a server. - * - * @param value the value value to set. - * @return the FirewallRuleList object itself. - */ - public FirewallRuleList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to retrieve next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link to retrieve next page of results. - * - * @param nextLink the nextLink value to set. - * @return the FirewallRuleList object itself. - */ - public FirewallRuleList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of FirewallRuleList 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 FirewallRuleList. */ public static FirewallRuleList fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/LtrServerBackupOperationList.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrServerBackupOperationList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/LtrServerBackupOperationList.java index 6133a9998c8e..8c90caf48d1b 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/implementation/models/LtrServerBackupOperationList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * A list of long term retention backup operations for server. */ -@Fluent +@Immutable public final class LtrServerBackupOperationList implements JsonSerializable { /* - * The list of long term retention server backup operations + * The BackupsLongTermRetentionOperation items on this page */ private List value; /* - * The link used to get the next page of operations. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of LtrServerBackupOperationList class. */ - public LtrServerBackupOperationList() { + private LtrServerBackupOperationList() { } /** - * Get the value property: The list of long term retention server backup operations. + * Get the value property: The BackupsLongTermRetentionOperation items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: The list of long term retention server backup operations. - * - * @param value the value value to set. - * @return the LtrServerBackupOperationList object itself. - */ - public LtrServerBackupOperationList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link used to get the next page of operations. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the LtrServerBackupOperationList object itself. - */ - public LtrServerBackupOperationList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @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 IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the LtrServerBackupOperationList. */ public static LtrServerBackupOperationList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/MigrationList.java similarity index 71% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/MigrationList.java index bfde555cd22e..84b4d63d4cf5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/MigrationList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of migrations. */ -@Fluent +@Immutable public final class MigrationList implements JsonSerializable { /* - * List of migrations. + * The Migration items on this page */ private List value; /* - * Link used to get the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of MigrationList class. */ - public MigrationList() { + private MigrationList() { } /** - * Get the value property: List of migrations. + * Get the value property: The Migration items on this page. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: Link used to get the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -52,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link used to get the next page of results. - * - * @param nextLink the nextLink value to set. - * @return the MigrationList object itself. - */ - public MigrationList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -90,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of MigrationList 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 MigrationList. */ public static MigrationList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/ObjectRecommendationList.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/ObjectRecommendationList.java index 7b76bcc71f93..97e04dc421d3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/ObjectRecommendationList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of available object recommendations. */ -@Fluent +@Immutable public final class ObjectRecommendationList implements JsonSerializable { /* - * List of available object recommendations. + * The ObjectRecommendation items on this page */ private List value; /* - * Link used to get the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ObjectRecommendationList class. */ - public ObjectRecommendationList() { + private ObjectRecommendationList() { } /** - * Get the value property: List of available object recommendations. + * Get the value property: The ObjectRecommendation items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of available object recommendations. - * - * @param value the value value to set. - * @return the ObjectRecommendationList object itself. - */ - public ObjectRecommendationList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link used to get the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link used to get the next page of results. - * - * @param nextLink the nextLink value to set. - * @return the ObjectRecommendationList object itself. - */ - public ObjectRecommendationList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ObjectRecommendationList 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 ObjectRecommendationList. */ public static ObjectRecommendationList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/OperationList.java similarity index 64% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/OperationList.java index 8c34887c3c0e..5723e2146987 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/OperationList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * List of resource provider operations. + * Paged collection of Operation items. */ -@Fluent +@Immutable public final class OperationList implements JsonSerializable { /* - * Collection of available operation details + * The Operation items on this page */ private List value; /* - * Link used to get the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of OperationList class. */ - public OperationList() { + private OperationList() { } /** - * Get the value property: Collection of available operation details. + * Get the value property: The Operation items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: Collection of available operation details. - * - * @param value the value value to set. - * @return the OperationList object itself. - */ - public OperationList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link used to get the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link used to get the next page of results. - * - * @param nextLink the nextLink value to set. - * @return the OperationList object itself. - */ - public OperationList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OperationList 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 OperationList. */ public static OperationList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/PrivateEndpointConnectionList.java similarity index 73% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/PrivateEndpointConnectionList.java index 1e11351ac766..7a0571f75a10 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/PrivateEndpointConnectionList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of private endpoint connections. */ -@Fluent +@Immutable public final class PrivateEndpointConnectionList implements JsonSerializable { /* - * Array of results. + * The PrivateEndpointConnection items on this page */ private List value; /* - * Link used to get the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of PrivateEndpointConnectionList class. */ - public PrivateEndpointConnectionList() { + private PrivateEndpointConnectionList() { } /** - * Get the value property: Array of results. + * Get the value property: The PrivateEndpointConnection items on this page. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: Link used to get the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -52,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link used to get the next page of results. - * - * @param nextLink the nextLink value to set. - * @return the PrivateEndpointConnectionList object itself. - */ - public PrivateEndpointConnectionList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -90,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of PrivateEndpointConnectionList 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 PrivateEndpointConnectionList. */ public static PrivateEndpointConnectionList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/PrivateLinkResourceList.java similarity index 72% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/PrivateLinkResourceList.java index a93a9bf36982..1b2372ab3d14 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResourceList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/PrivateLinkResourceList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * A list of private link resources. */ -@Fluent +@Immutable public final class PrivateLinkResourceList implements JsonSerializable { /* - * Array of results. + * The PrivateLinkResource items on this page */ private List value; /* - * Link to retrieve next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of PrivateLinkResourceList class. */ - public PrivateLinkResourceList() { + private PrivateLinkResourceList() { } /** - * Get the value property: Array of results. + * Get the value property: The PrivateLinkResource items on this page. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: Link to retrieve next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -52,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link to retrieve next page of results. - * - * @param nextLink the nextLink value to set. - * @return the PrivateLinkResourceList object itself. - */ - public PrivateLinkResourceList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -90,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of PrivateLinkResourceList 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 PrivateLinkResourceList. */ public static PrivateLinkResourceList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsageList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/QuotaUsageList.java similarity index 71% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsageList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/QuotaUsageList.java index a21cdcb5c556..0b44ff19335a 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsageList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/QuotaUsageList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Capability for the PostgreSQL server. */ -@Fluent +@Immutable public final class QuotaUsageList implements JsonSerializable { /* - * A list of quota usages. + * The QuotaUsage items on this page */ private List value; /* - * Link to retrieve next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of QuotaUsageList class. */ - public QuotaUsageList() { + private QuotaUsageList() { } /** - * Get the value property: A list of quota usages. + * Get the value property: The QuotaUsage items on this page. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: Link to retrieve next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -52,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link to retrieve next page of results. - * - * @param nextLink the nextLink value to set. - * @return the QuotaUsageList object itself. - */ - public QuotaUsageList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -90,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of QuotaUsageList 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 QuotaUsageList. */ public static QuotaUsageList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/ServerList.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/ServerList.java index 862777192d6d..39308753e73f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/ServerList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * A list of servers. */ -@Fluent +@Immutable public final class ServerList implements JsonSerializable { /* - * The list of servers + * The Server items on this page */ private List value; /* - * The link used to get the next page of operations. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ServerList class. */ - public ServerList() { + private ServerList() { } /** - * Get the value property: The list of servers. + * Get the value property: The Server items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: The list of servers. - * - * @param value the value value to set. - * @return the ServerList object itself. - */ - public ServerList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link used to get the next page of operations. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link used to get the next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the ServerList object itself. - */ - public ServerList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ServerList 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 ServerList. */ public static ServerList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/TuningOptionsList.java similarity index 66% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/TuningOptionsList.java index 56de034101e1..a20d5880b2c5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/TuningOptionsList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of server tuning options. */ -@Fluent +@Immutable public final class TuningOptionsList implements JsonSerializable { /* - * List of available tuning options. + * The TuningOptions items on this page */ private List value; /* - * Link used to get the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of TuningOptionsList class. */ - public TuningOptionsList() { + private TuningOptionsList() { } /** - * Get the value property: List of available tuning options. + * Get the value property: The TuningOptions items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of available tuning options. - * - * @param value the value value to set. - * @return the TuningOptionsList object itself. - */ - public TuningOptionsList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link used to get the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link used to get the next page of results. - * - * @param nextLink the nextLink value to set. - * @return the TuningOptionsList object itself. - */ - public TuningOptionsList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of TuningOptionsList 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 TuningOptionsList. */ public static TuningOptionsList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsList.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/VirtualEndpointsList.java similarity index 67% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsList.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/VirtualEndpointsList.java index 3c29b9a5ac37..68d349645cf9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointsList.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/VirtualEndpointsList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.postgresqlflexibleserver.models; +package com.azure.resourcemanager.postgresqlflexibleserver.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of virtual endpoints. */ -@Fluent +@Immutable public final class VirtualEndpointsList implements JsonSerializable { /* - * List of virtual endpoints. + * The VirtualEndpoint items on this page */ private List value; /* - * Link used to get the next page of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of VirtualEndpointsList class. */ - public VirtualEndpointsList() { + private VirtualEndpointsList() { } /** - * Get the value property: List of virtual endpoints. + * Get the value property: The VirtualEndpoint items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of virtual endpoints. - * - * @param value the value value to set. - * @return the VirtualEndpointsList object itself. - */ - public VirtualEndpointsList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link used to get the next page of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link used to get the next page of results. - * - * @param nextLink the nextLink value to set. - * @return the VirtualEndpointsList object itself. - */ - public VirtualEndpointsList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of VirtualEndpointsList 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 VirtualEndpointsList. */ public static VirtualEndpointsList fromJson(JsonReader jsonReader) throws IOException { 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 aa03b7e448c5..00ba57e08e26 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 @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for PostgreSqlManagementClient. + * Package containing the implementations for PostgreSql. * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure * PostgreSQL resources including servers, databases, firewall rules, network configuration, 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/AdminCredentials.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentials.java index 0409bc977c68..ab4518220e51 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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.JsonSerializable; import com.azure.json.JsonToken; @@ -73,26 +72,6 @@ public AdminCredentials withTargetServerPassword(String targetServerPassword) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceServerPassword() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property sourceServerPassword in model AdminCredentials")); - } - if (targetServerPassword() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetServerPassword in model AdminCredentials")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AdminCredentials.class); - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentialsForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentialsForPatch.java index bdbe5a3b071e..0fcd2bfb3ba9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentialsForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentialsForPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -72,14 +72,6 @@ public AdminCredentialsForPatch withTargetServerPassword(String targetServerPass return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntra.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntra.java index 9d89a4f5d581..6056e731b07e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntra.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntra.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraAdd.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraAdd.java index cc9d5cb6a453..d10dc61026f8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraAdd.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraAdd.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -109,17 +109,6 @@ public AdministratorMicrosoftEntraAdd withTenantId(String tenantId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorsMicrosoftEntras.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorsMicrosoftEntras.java index 635192c996e7..0bf31ad74f7f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorsMicrosoftEntras.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorsMicrosoftEntras.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -13,58 +13,58 @@ */ public interface AdministratorsMicrosoftEntras { /** - * Deletes an existing server administrator associated to a Microsoft Entra principal. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param objectId Object identifier of the Microsoft Entra principal. + * @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 information about a server administrator associated to a Microsoft Entra principal along with + * {@link Response}. */ - void delete(String resourceGroupName, String serverName, String objectId); + Response getWithResponse(String resourceGroupName, String serverName, String objectId, + Context context); /** - * Deletes an existing server administrator associated to a Microsoft Entra principal. + * Gets information about a server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param objectId Object identifier of the Microsoft Entra principal. - * @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 information about a server administrator associated to a Microsoft Entra principal. */ - void delete(String resourceGroupName, String serverName, String objectId, Context context); + AdministratorMicrosoftEntra get(String resourceGroupName, String serverName, String objectId); /** - * Gets information about a server administrator associated to a Microsoft Entra principal. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param objectId Object identifier of the Microsoft Entra principal. - * @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 information about a server administrator associated to a Microsoft Entra principal along with - * {@link Response}. */ - Response getWithResponse(String resourceGroupName, String serverName, String objectId, - Context context); + void delete(String resourceGroupName, String serverName, String objectId); /** - * Gets information about a server administrator associated to a Microsoft Entra principal. + * Deletes an existing server administrator associated to a Microsoft Entra principal. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param objectId Object identifier of the Microsoft Entra principal. + * @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 information about a server administrator associated to a Microsoft Entra principal. */ - AdministratorMicrosoftEntra get(String resourceGroupName, String serverName, String objectId); + void delete(String resourceGroupName, String serverName, String objectId, Context context); /** * List all server administrators associated to a Microsoft Entra principal. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettings.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettings.java index 116e18e003d3..759bf38adbe4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettings.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -13,59 +13,59 @@ */ public interface AdvancedThreatProtectionSettings { /** - * Lists state of advanced threat protection settings for a server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param threatProtectionName Name of the advanced threat protection settings. + * @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 list of advanced threat protection settings for a server as paginated response with - * {@link PagedIterable}. + * @return state of advanced threat protection settings for a server along with {@link Response}. */ - PagedIterable listByServer(String resourceGroupName, String serverName); + Response getWithResponse(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName, Context context); /** - * Lists state of advanced threat protection settings for a server. + * Gets state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param threatProtectionName Name of the advanced threat protection settings. * @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 list of advanced threat protection settings for a server as paginated response with - * {@link PagedIterable}. + * @return state of advanced threat protection settings for a server. */ - PagedIterable listByServer(String resourceGroupName, String serverName, - Context context); + AdvancedThreatProtectionSettingsModel get(String resourceGroupName, String serverName, + ThreatProtectionName threatProtectionName); /** - * Gets state of advanced threat protection settings for a server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName Name of the advanced threat protection settings. - * @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 state of advanced threat protection settings for a server along with {@link Response}. + * @return list of advanced threat protection settings for a server as paginated response with + * {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets state of advanced threat protection settings for a server. + * Lists state of advanced threat protection settings for a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param threatProtectionName Name of the advanced threat protection settings. + * @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 state of advanced threat protection settings for a server. + * @return list of advanced threat protection settings for a server as paginated response with + * {@link PagedIterable}. */ - AdvancedThreatProtectionSettingsModel get(String resourceGroupName, String serverName, - ThreatProtectionName threatProtectionName); + PagedIterable listByServer(String resourceGroupName, String serverName, + Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsModel.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsModel.java index c76f4156a8ff..1c2cbe2cd8a1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsModel.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsModel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 bc3d4fcee233..db0112008fec 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -97,14 +97,6 @@ public AuthConfig withTenantId(String tenantId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfigForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfigForPatch.java index 558487ee0476..0b66bdd85116 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfigForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfigForPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -97,14 +97,6 @@ public AuthConfigForPatch withTenantId(String tenantId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTier.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTier.java index b9f59a12e13a..314d44c06e5c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTier.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTier.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 58c546a365e9..2e5368a885cb 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -90,14 +90,6 @@ public OffsetDateTime earliestRestoreDate() { return this.earliestRestoreDate; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemand.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemand.java index df1f83f1895d..542d8205b922 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemand.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemand.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupForPatch.java index 8d86370dcf5d..1fd566d52eca 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupForPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -69,18 +69,6 @@ public GeographicallyRedundantBackup geoRedundantBackup() { return this.geoRedundantBackup; } - /** - * Set the geoRedundantBackup property: Indicates if the server is configured to create geographically redundant - * backups. - * - * @param geoRedundantBackup the geoRedundantBackup value to set. - * @return the BackupForPatch object itself. - */ - public BackupForPatch withGeoRedundantBackup(GeographicallyRedundantBackup geoRedundantBackup) { - this.geoRedundantBackup = geoRedundantBackup; - return this; - } - /** * Get the earliestRestoreDate property: Earliest restore point time (ISO8601 format) for a server. * @@ -90,14 +78,6 @@ public OffsetDateTime earliestRestoreDate() { return this.earliestRestoreDate; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -105,8 +85,6 @@ public void validate() { 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(); } 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 c7d7791a6ffa..d62b13cc0a2f 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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.JsonSerializable; import com.azure.json.JsonToken; @@ -48,23 +47,6 @@ public BackupRequestBase withBackupSettings(BackupSettings backupSettings) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (backupSettings() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property backupSettings in model BackupRequestBase")); - } else { - backupSettings().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BackupRequestBase.class); - /** * {@inheritDoc} */ 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 6a505fb19466..df22e11bee6e 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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.JsonSerializable; import com.azure.json.JsonToken; @@ -48,20 +47,6 @@ public BackupSettings withBackupName(String backupName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (backupName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property backupName in model BackupSettings")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BackupSettings.class); - /** * {@inheritDoc} */ 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 5536be8e80fb..6913ccd43f38 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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.JsonSerializable; import com.azure.json.JsonToken; @@ -49,20 +48,6 @@ public BackupStoreDetails withSasUriList(List sasUriList) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sasUriList() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property sasUriList in model BackupStoreDetails")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BackupStoreDetails.class); - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupType.java index 3b155e19bb29..6815cbabac16 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsAutomaticAndOnDemands.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsAutomaticAndOnDemands.java index 4c6f6821188f..ef95cedd0d82 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsAutomaticAndOnDemands.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsAutomaticAndOnDemands.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -13,34 +13,35 @@ */ public interface BackupsAutomaticAndOnDemands { /** - * Creates an on demand backup of a server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param backupName 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 properties of a backup. + * @return information of an on demand backup, given its name along with {@link Response}. */ - BackupAutomaticAndOnDemand create(String resourceGroupName, String serverName, String backupName); + Response getWithResponse(String resourceGroupName, String serverName, String backupName, + Context context); /** - * Creates an on demand backup of a server. + * Gets information of an on demand backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param backupName 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 properties of a backup. + * @return information of an on demand backup, given its name. */ - BackupAutomaticAndOnDemand create(String resourceGroupName, String serverName, String backupName, Context context); + BackupAutomaticAndOnDemand get(String resourceGroupName, String serverName, String backupName); /** - * Deletes a specific backup, given its name. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -48,11 +49,12 @@ public interface BackupsAutomaticAndOnDemands { * @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 response. */ - void delete(String resourceGroupName, String serverName, String backupName); + BackupAutomaticAndOnDemand create(String resourceGroupName, String serverName, String backupName); /** - * Deletes a specific backup, given its name. + * Creates an on demand backup of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. @@ -61,36 +63,34 @@ public interface BackupsAutomaticAndOnDemands { * @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 response. */ - void delete(String resourceGroupName, String serverName, String backupName, Context context); + BackupAutomaticAndOnDemand create(String resourceGroupName, String serverName, String backupName, Context context); /** - * Gets information of an on demand backup, given its name. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param backupName 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 information of an on demand backup, given its name along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String serverName, String backupName, - Context context); + void delete(String resourceGroupName, String serverName, String backupName); /** - * Gets information of an on demand backup, given its name. + * Deletes a specific backup, given its name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param backupName 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 information of an on demand backup, given its name. */ - BackupAutomaticAndOnDemand get(String resourceGroupName, String serverName, String backupName); + void delete(String resourceGroupName, String serverName, String backupName, Context context); /** * Lists all available backups of a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionOperation.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionOperation.java index 9e4f4f16e7fc..f548225d6525 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionOperation.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionOperation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionRequest.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionRequest.java index 136078b16473..e55cb09e0b61 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionRequest.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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; @@ -56,31 +55,6 @@ public BackupsLongTermRetentionRequest withBackupSettings(BackupSettings backupS return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (targetDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetDetails in model BackupsLongTermRetentionRequest")); - } else { - targetDetails().validate(); - } - if (backupSettings() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property backupSettings in model BackupsLongTermRetentionRequest")); - } else { - backupSettings().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BackupsLongTermRetentionRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionResponse.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionResponse.java index ca9d953bceed..4ac02ce4bf58 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionResponse.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentions.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentions.java index fc3709bea64b..22c306394684 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentions.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesHeaders.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesHeaders.java index 75ac0065d6b6..858626456c1b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesHeaders.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesHeaders.java @@ -1,22 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; /** * The BackupsLongTermRetentionsCheckPrerequisitesHeaders model. */ -@Fluent +@Immutable public final class BackupsLongTermRetentionsCheckPrerequisitesHeaders { /* * The x-ms-request-id property. */ - private String xMsRequestId; + private final String xMsRequestId; // HttpHeaders containing the raw property values. /** @@ -36,23 +36,4 @@ public BackupsLongTermRetentionsCheckPrerequisitesHeaders(HttpHeaders rawHeaders public String xMsRequestId() { return this.xMsRequestId; } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the BackupsLongTermRetentionsCheckPrerequisitesHeaders object itself. - */ - public BackupsLongTermRetentionsCheckPrerequisitesHeaders withXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - 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/BackupsLongTermRetentionsCheckPrerequisitesResponse.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesResponse.java index 7c27ca25ea1f..553fc323b8b0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesResponse.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cancel.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cancel.java index 7c235c79a417..f1d2ecd018ac 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cancel.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cancel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByLocations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByLocations.java index 52fffe0886b8..b99613409369 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByLocations.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByLocations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByServers.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByServers.java index afdf060d82f6..7819b645e90e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByServers.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByServers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Capability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Capability.java index ed641fac11a3..e81384a8ab7b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Capability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Capability.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 61f09fc113a5..b5a82d36830d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -29,7 +29,7 @@ public class CapabilityBase implements JsonSerializable { /** * Creates an instance of CapabilityBase class. */ - public CapabilityBase() { + protected CapabilityBase() { } /** @@ -72,14 +72,6 @@ CapabilityBase withReason(String reason) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 0d721b02130d..219bbde5478d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLog.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLog.java index 682b8d97e9d9..aa9d51b0a02b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLog.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLog.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogs.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogs.java index 817f9765a62a..ce2b63d49f05 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogs.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogs.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 aa9c4a3781c7..0f293b7d6ade 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -8,16 +8,16 @@ import java.util.Collection; /** - * The reason why the given name is not available. + * Possible reasons for a name not being available. */ public final class CheckNameAvailabilityReason extends ExpandableStringEnum { /** - * Static value Invalid for CheckNameAvailabilityReason. + * Name is invalid. */ public static final CheckNameAvailabilityReason INVALID = fromString("Invalid"); /** - * Static value AlreadyExists for CheckNameAvailabilityReason. + * Name already exists. */ public static final CheckNameAvailabilityReason ALREADY_EXISTS = fromString("AlreadyExists"); 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 24dbb5867c23..c71b809715df 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -72,14 +72,6 @@ public CheckNameAvailabilityRequest withType(String type) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 bf855751423e..62d97d7e21a1 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The check availability result. */ -@Fluent +@Immutable public class CheckNameAvailabilityResponse implements JsonSerializable { /* * Indicates if the resource name is available. @@ -27,14 +27,14 @@ public class CheckNameAvailabilityResponse implements JsonSerializable listByServer(String resourceGroupName, String serverName); + Response getWithResponse(String resourceGroupName, String serverName, String configurationName, + Context context); /** - * Lists all configurations (also known as server parameters) of a server. + * Gets information about a specific configuration (also known as server parameter) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param configurationName Name of the configuration (also known as server parameter). * @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 list of configurations (also known as server parameters) as paginated response with - * {@link PagedIterable}. + * @return information about a specific configuration (also known as server parameter) of a server. */ - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + Configuration get(String resourceGroupName, String serverName, String configurationName); /** - * Gets information about a specific configuration (also known as server parameter) of a server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName Name of the configuration (also known as server parameter). - * @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 information about a specific configuration (also known as server parameter) of a server along with - * {@link Response}. + * @return list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String serverName, String configurationName, - Context context); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets information about a specific configuration (also known as server parameter) of a server. + * Lists all configurations (also known as server parameters) of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param configurationName Name of the configuration (also known as server parameter). + * @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 information about a specific configuration (also known as server parameter) of a server. + * @return list of configurations (also known as server parameters) as paginated response with + * {@link PagedIterable}. */ - Configuration get(String resourceGroupName, String serverName, String configurationName); + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** * Gets information about a specific configuration (also known as server parameter) of a server. 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 86d4e2b952a6..f84cd655fd30 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForPatch.java index e4f8900c9494..7cf53ea095c3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 1819c5f98ca7..52a37bbed751 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -187,18 +187,6 @@ public EncryptionKeyStatus primaryEncryptionKeyStatus() { return this.primaryEncryptionKeyStatus; } - /** - * Set the primaryEncryptionKeyStatus property: Status of key used by a server configured with data encryption based - * on customer managed key, to encrypt the primary storage associated to the server. - * - * @param primaryEncryptionKeyStatus the primaryEncryptionKeyStatus value to set. - * @return the DataEncryption object itself. - */ - public DataEncryption withPrimaryEncryptionKeyStatus(EncryptionKeyStatus primaryEncryptionKeyStatus) { - this.primaryEncryptionKeyStatus = primaryEncryptionKeyStatus; - return this; - } - /** * Get the geoBackupEncryptionKeyStatus property: Status of key used by a server configured with data encryption * based on customer managed key, to encrypt the geographically redundant storage associated to the server when it @@ -210,27 +198,6 @@ public EncryptionKeyStatus geoBackupEncryptionKeyStatus() { return this.geoBackupEncryptionKeyStatus; } - /** - * Set the geoBackupEncryptionKeyStatus property: Status of key used by a server configured with data encryption - * based on customer managed key, to encrypt the geographically redundant storage associated to the server when it - * is configured to support geographically redundant backups. - * - * @param geoBackupEncryptionKeyStatus the geoBackupEncryptionKeyStatus value to set. - * @return the DataEncryption object itself. - */ - public DataEncryption withGeoBackupEncryptionKeyStatus(EncryptionKeyStatus geoBackupEncryptionKeyStatus) { - this.geoBackupEncryptionKeyStatus = geoBackupEncryptionKeyStatus; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -242,10 +209,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { 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(); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryptionType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryptionType.java index a5c1f42511f1..46d947ef44fe 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryptionType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryptionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Database.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Database.java index a0cc89c4271d..41652e04d9a6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Database.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Database.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseMigrationState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseMigrationState.java index 3c3e363e5cff..ae1c8261d8e2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseMigrationState.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseMigrationState.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * Migration state of a database. */ -@Fluent +@Immutable public final class DatabaseMigrationState implements JsonSerializable { /* * Name of database. @@ -102,7 +102,7 @@ public final class DatabaseMigrationState implements JsonSerializable getWithResponse(String resourceGroupName, String serverName, String databaseName, + Context context); /** - * Deletes an existing database. + * Gets information about an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the * list of all existing databases in a server. - * @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 information about an existing database. */ - void delete(String resourceGroupName, String serverName, String databaseName, Context context); + Database get(String resourceGroupName, String serverName, String databaseName); /** - * Gets information about an existing database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the * list of all existing databases in a server. - * @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 information about an existing database along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String serverName, String databaseName, - Context context); + void delete(String resourceGroupName, String serverName, String databaseName); /** - * Gets information about an existing database. + * Deletes an existing database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param databaseName Name of the database (case-sensitive). Exact database names can be retrieved by getting the * list of all existing databases in a server. + * @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 information about an existing database. */ - Database get(String resourceGroupName, String serverName, String databaseName); + void delete(String resourceGroupName, String serverName, String databaseName, Context context); /** * Lists all databases in a server. 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 f07e5bb308c5..59ab691c3f2d 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -18,7 +18,7 @@ /** * Validation status summary for a database. */ -@Fluent +@Immutable public final class DbLevelValidationStatus implements JsonSerializable { /* * Name of database. @@ -43,7 +43,7 @@ public final class DbLevelValidationStatus implements JsonSerializable summary() { return this.summary; } - /** - * Set the summary property: Summary of database level validations. - * - * @param summary the summary value to set. - * @return the DbLevelValidationStatus object itself. - */ - public DbLevelValidationStatus withSummary(List summary) { - this.summary = summary; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (summary() != null) { - summary().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 f894cd7321b6..c356ae29d670 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Database server metadata. */ -@Fluent +@Immutable public final class DbServerMetadata implements JsonSerializable { /* * Location of database server. @@ -40,7 +40,7 @@ public final class DbServerMetadata implements JsonSerializable getWithResponse(String resourceGroupName, String serverName, String firewallRuleName, + Context context); /** - * Deletes an existing firewall rule. + * Gets information about a firewall rule in a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName Name of the firewall rule. - * @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 information about a firewall rule in a server. */ - void delete(String resourceGroupName, String serverName, String firewallRuleName, Context context); + FirewallRule get(String resourceGroupName, String serverName, String firewallRuleName); /** - * Gets information about a firewall rule in a server. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName Name of the firewall rule. - * @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 information about a firewall rule in a server along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String serverName, String firewallRuleName, - Context context); + void delete(String resourceGroupName, String serverName, String firewallRuleName); /** - * Gets information about a firewall rule in a server. + * Deletes an existing firewall rule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param firewallRuleName Name of the firewall rule. + * @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 information about a firewall rule in a server. */ - FirewallRule get(String resourceGroupName, String serverName, String firewallRuleName); + void delete(String resourceGroupName, String serverName, String firewallRuleName, Context context); /** * Lists information about all firewall rules in a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackup.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackup.java index c3c6f75a9862..adf702ffdf2f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackup.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackup.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackupSupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackupSupport.java index a6ecc45998b8..7ef564c6c64a 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackupSupport.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackupSupport.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 59b76abe5bf5..fa6c893a0fc5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -19,7 +19,7 @@ public final class HighAvailability implements JsonSerializable { /* * Dimension name. @@ -39,7 +39,7 @@ public final class ImpactRecord implements JsonSerializable { /** * Creates an instance of ImpactRecord class. */ - public ImpactRecord() { + private ImpactRecord() { } /** @@ -51,17 +51,6 @@ public String dimensionName() { return this.dimensionName; } - /** - * Set the dimensionName property: Dimension name. - * - * @param dimensionName the dimensionName value to set. - * @return the ImpactRecord object itself. - */ - public ImpactRecord withDimensionName(String dimensionName) { - this.dimensionName = dimensionName; - return this; - } - /** * Get the unit property: Dimension unit. * @@ -71,17 +60,6 @@ public String unit() { return this.unit; } - /** - * Set the unit property: Dimension unit. - * - * @param unit the unit value to set. - * @return the ImpactRecord object itself. - */ - public ImpactRecord withUnit(String unit) { - this.unit = unit; - return this; - } - /** * Get the queryId property: Optional property that can be used to store the identifier of the query, if the metric * is for a specific query. @@ -92,18 +70,6 @@ public Long queryId() { return this.queryId; } - /** - * Set the queryId property: Optional property that can be used to store the identifier of the query, if the metric - * is for a specific query. - * - * @param queryId the queryId value to set. - * @return the ImpactRecord object itself. - */ - public ImpactRecord withQueryId(Long queryId) { - this.queryId = queryId; - return this; - } - /** * Get the absoluteValue property: Absolute value. * @@ -113,25 +79,6 @@ public Double absoluteValue() { return this.absoluteValue; } - /** - * Set the absoluteValue property: Absolute value. - * - * @param absoluteValue the absoluteValue value to set. - * @return the ImpactRecord object itself. - */ - public ImpactRecord withAbsoluteValue(Double absoluteValue) { - this.absoluteValue = absoluteValue; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationRestricted.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationRestricted.java index 73cb1b16641b..d91c9dc480dd 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationRestricted.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationRestricted.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceServer.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceServer.java index 2a5ff6952fad..9a0a0c044f95 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceServer.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceServer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 df8c8c4e8aeb..f29df8af6723 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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; @@ -31,24 +30,6 @@ public LtrPreBackupRequest withBackupSettings(BackupSettings backupSettings) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void 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} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrPreBackupResponse.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrPreBackupResponse.java index 80d1358db77a..8ce6b5abcea3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrPreBackupResponse.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrPreBackupResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 d087a803cf16..17eca3e97e17 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -122,14 +122,6 @@ public MaintenanceWindow withDayOfWeek(Integer dayOfWeek) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindowForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindowForPatch.java index d9500a1d0df8..08ec1d1531a3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindowForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindowForPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -122,14 +122,6 @@ public MaintenanceWindowForPatch withDayOfWeek(Integer dayOfWeek) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MicrosoftEntraAuth.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MicrosoftEntraAuth.java index a0d8b3f75413..ddc09c06f50f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MicrosoftEntraAuth.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MicrosoftEntraAuth.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateNetworkStatus.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateNetworkStatus.java new file mode 100644 index 000000000000..0f15fa6a8f98 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateNetworkStatus.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrateNetworkStatusInner; + +/** + * An immutable client-side representation of MigrateNetworkStatus. + */ +public interface MigrateNetworkStatus { + /** + * Gets the subscriptionId property: The ID of the subscription. + * + * @return the subscriptionId value. + */ + String subscriptionId(); + + /** + * Gets the resourceGroupName property: The name of the resource group. + * + * @return the resourceGroupName value. + */ + String resourceGroupName(); + + /** + * Gets the serverName property: The name of the server. + * + * @return the serverName value. + */ + String serverName(); + + /** + * Gets the state property: The state of the network migration operation. + * + * @return the state value. + */ + NetworkMigrationState state(); + + /** + * Gets the inner com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrateNetworkStatusInner object. + * + * @return the inner object. + */ + MigrateNetworkStatusInner innerModel(); +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesAndPermissions.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesAndPermissions.java index ebb6f01ffa17..b626677f1339 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesAndPermissions.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesAndPermissions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migration.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migration.java index e52bcb7ed10e..1ee6cf029ba1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migration.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDatabaseState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDatabaseState.java index 035b72a8650d..af3361d62180 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDatabaseState.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDatabaseState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 df3ec90e51a8..1fe326c71288 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 1e2736bfa640..dc4a31fb7fc0 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailability.java index 48d7651ec1c4..46d0ac985eb7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailability.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 ba4a94d3a6c9..ca56b3a2c38b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 9e732bdcf897..b183c554ea94 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 4649165b23aa..b17d62367fe6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -437,17 +437,6 @@ public MigrationResourceForPatch withMigrationMode(MigrationMode migrationMode) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 53bfc0a85dba..3ff535e73e38 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 @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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.JsonSerializable; import com.azure.json.JsonToken; @@ -102,23 +101,6 @@ public MigrationSecretParameters withTargetServerUsername(String targetServerUse return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (adminCredentials() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property adminCredentials in model MigrationSecretParameters")); - } else { - adminCredentials().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MigrationSecretParameters.class); - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParametersForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParametersForPatch.java index 41e7e2120873..44fbb5aa5bf8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParametersForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParametersForPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -101,17 +101,6 @@ public MigrationSecretParametersForPatch withTargetServerUsername(String targetS return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (adminCredentials() != null) { - adminCredentials().validate(); - } - } - /** * {@inheritDoc} */ 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 c48fb234260b..4a9f4d9dbe8e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 592eb787199f..9ee07a7ab027 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -34,7 +34,7 @@ public final class MigrationStatus implements JsonSerializable /** * Creates an instance of MigrationStatus class. */ - public MigrationStatus() { + private MigrationStatus() { } /** @@ -64,17 +64,6 @@ public MigrationSubstateDetails currentSubStateDetails() { return this.currentSubStateDetails; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (currentSubStateDetails() != null) { - currentSubStateDetails().validate(); - } - } - /** * {@inheritDoc} */ 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 4de69ec889da..a63417b51741 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 66033cdcd58e..d8d2c6b4ab8d 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Details of migration substate. */ -@Fluent +@Immutable public final class MigrationSubstateDetails implements JsonSerializable { /* * Substate of migration. @@ -23,19 +23,19 @@ public final class MigrationSubstateDetails implements JsonSerializable + * The dbDetails property. */ private Map dbDetails; /* - * Details for the validation for migration. + * The validationDetails property. */ private ValidationDetails validationDetails; /** * Creates an instance of MigrationSubstateDetails class. */ - public MigrationSubstateDetails() { + private MigrationSubstateDetails() { } /** @@ -48,7 +48,7 @@ public MigrationSubstate currentSubState() { } /** - * Get the dbDetails property: Dictionary of <DatabaseMigrationState>. + * Get the dbDetails property: The dbDetails property. * * @return the dbDetails value. */ @@ -57,18 +57,7 @@ public Map dbDetails() { } /** - * Set the dbDetails property: Dictionary of <DatabaseMigrationState>. - * - * @param dbDetails the dbDetails value to set. - * @return the MigrationSubstateDetails object itself. - */ - public MigrationSubstateDetails withDbDetails(Map dbDetails) { - this.dbDetails = dbDetails; - return this; - } - - /** - * Get the validationDetails property: Details for the validation for migration. + * Get the validationDetails property: The validationDetails property. * * @return the validationDetails value. */ @@ -76,35 +65,6 @@ public ValidationDetails validationDetails() { return this.validationDetails; } - /** - * Set the validationDetails property: Details for the validation for migration. - * - * @param validationDetails the validationDetails value to set. - * @return the MigrationSubstateDetails object itself. - */ - public MigrationSubstateDetails withValidationDetails(ValidationDetails validationDetails) { - this.validationDetails = validationDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dbDetails() != null) { - dbDetails().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (validationDetails() != null) { - validationDetails().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migrations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migrations.java index 1ad1eb13b8cc..2d6fccabcfbd 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migrations.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migrations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilities.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilities.java index 7ca389e36738..1cf1c5c48ef5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilities.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilities.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -15,8 +15,7 @@ public interface NameAvailabilities { * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base * name of a new pair of virtual endpoints. * - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -29,8 +28,7 @@ public interface NameAvailabilities { * Checks the validity and availability of the given name, to assign it to a new server or to use it as the base * name of a new pair of virtual endpoints. * - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -42,8 +40,7 @@ public interface NameAvailabilities { * Check the availability of name for resource. * * @param locationName The name of the location. - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. @@ -57,8 +54,7 @@ Response checkWithLocationWithResponse(String locationNam * Check the availability of name for resource. * * @param locationName The name of the location. - * @param parameters Parameters required to check if a given name is valid and available to assign it to a new - * server or to use it as the base name of a new pair of virtual endpoints. + * @param parameters The request body. * @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. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilityModel.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilityModel.java index 06f5d6898ba7..83c9fb3f4ad2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilityModel.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilityModel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -25,7 +25,7 @@ public interface NameAvailabilityModel { CheckNameAvailabilityReason reason(); /** - * Gets the message property: Detailed reason why the given name is available. + * Gets the message property: Detailed reason why the given name is not available. * * @return the message value. */ 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 index 48cf6475bcae..f59e360c819e 100644 --- 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Name property for quota usage. */ -@Fluent +@Immutable public final class NameProperty implements JsonSerializable { /* * Name value @@ -29,7 +29,7 @@ public final class NameProperty implements JsonSerializable { /** * Creates an instance of NameProperty class. */ - public NameProperty() { + private NameProperty() { } /** @@ -41,17 +41,6 @@ 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. * @@ -61,25 +50,6 @@ 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() { - } - /** * {@inheritDoc} */ 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 16f3e453fab4..4935226799bc 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -116,14 +116,6 @@ public Network withPrivateDnsZoneArmResourceId(String privateDnsZoneArmResourceI return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NetworkMigrationState.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NetworkMigrationState.java new file mode 100644 index 000000000000..c20fb2964098 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NetworkMigrationState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The state of the network migration operation. + */ +public final class NetworkMigrationState extends ExpandableStringEnum { + /** + * The network migration is pending. + */ + public static final NetworkMigrationState PENDING = fromString("Pending"); + + /** + * The network migration is in progress. + */ + public static final NetworkMigrationState IN_PROGRESS = fromString("InProgress"); + + /** + * The network migration succeeded. + */ + public static final NetworkMigrationState SUCCEEDED = fromString("Succeeded"); + + /** + * The network migration failed. + */ + public static final NetworkMigrationState FAILED = fromString("Failed"); + + /** + * The network migration cancellation is in progress. + */ + public static final NetworkMigrationState CANCEL_IN_PROGRESS = fromString("CancelInProgress"); + + /** + * The network migration was cancelled. + */ + public static final NetworkMigrationState CANCELLED = fromString("Cancelled"); + + /** + * Creates a new instance of NetworkMigrationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NetworkMigrationState() { + } + + /** + * Creates or finds a NetworkMigrationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding NetworkMigrationState. + */ + public static NetworkMigrationState fromString(String name) { + return fromString(name, NetworkMigrationState.class); + } + + /** + * Gets known NetworkMigrationState values. + * + * @return known NetworkMigrationState values. + */ + public static Collection values() { + return values(NetworkMigrationState.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendation.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendation.java index fd9230227f2d..39e79a410ec0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendation.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationDetails.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationDetails.java index 24640033c675..b401446650b6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationDetails.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationDetails.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Recommendation details for the recommended action. */ -@Fluent +@Immutable public final class ObjectRecommendationDetails implements JsonSerializable { /* * Database name. @@ -55,7 +55,7 @@ public final class ObjectRecommendationDetails implements JsonSerializable indexColumns() { return this.indexColumns; } - /** - * Set the indexColumns property: Index columns. - * - * @param indexColumns the indexColumns value to set. - * @return the ObjectRecommendationDetails object itself. - */ - public ObjectRecommendationDetails withIndexColumns(List indexColumns) { - this.indexColumns = indexColumns; - return this; - } - /** * Get the includedColumns property: Index included columns. * @@ -187,25 +121,6 @@ public List includedColumns() { return this.includedColumns; } - /** - * Set the includedColumns property: Index included columns. - * - * @param includedColumns the includedColumns value to set. - * @return the ObjectRecommendationDetails object itself. - */ - public ObjectRecommendationDetails withIncludedColumns(List includedColumns) { - this.includedColumns = includedColumns; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesAnalyzedWorkload.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesAnalyzedWorkload.java index 74b1aface6e4..c4b17652a2d7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesAnalyzedWorkload.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesAnalyzedWorkload.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * Workload information for the recommended action. */ -@Fluent +@Immutable public final class ObjectRecommendationPropertiesAnalyzedWorkload implements JsonSerializable { /* @@ -39,7 +39,7 @@ public final class ObjectRecommendationPropertiesAnalyzedWorkload /** * Creates an instance of ObjectRecommendationPropertiesAnalyzedWorkload class. */ - public ObjectRecommendationPropertiesAnalyzedWorkload() { + private ObjectRecommendationPropertiesAnalyzedWorkload() { } /** @@ -51,17 +51,6 @@ public OffsetDateTime startTime() { return this.startTime; } - /** - * Set the startTime property: Start time (UTC) of the workload analyzed. - * - * @param startTime the startTime value to set. - * @return the ObjectRecommendationPropertiesAnalyzedWorkload object itself. - */ - public ObjectRecommendationPropertiesAnalyzedWorkload withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - /** * Get the endTime property: End time (UTC) of the workload analyzed. * @@ -71,17 +60,6 @@ public OffsetDateTime endTime() { return this.endTime; } - /** - * Set the endTime property: End time (UTC) of the workload analyzed. - * - * @param endTime the endTime value to set. - * @return the ObjectRecommendationPropertiesAnalyzedWorkload object itself. - */ - public ObjectRecommendationPropertiesAnalyzedWorkload withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - /** * Get the queryCount property: Number of queries from the workload that were examined to produce this * recommendation. For DROP INDEX recommendations it's 0 (zero). @@ -92,26 +70,6 @@ public Integer queryCount() { return this.queryCount; } - /** - * Set the queryCount property: Number of queries from the workload that were examined to produce this - * recommendation. For DROP INDEX recommendations it's 0 (zero). - * - * @param queryCount the queryCount value to set. - * @return the ObjectRecommendationPropertiesAnalyzedWorkload object itself. - */ - public ObjectRecommendationPropertiesAnalyzedWorkload withQueryCount(Integer queryCount) { - this.queryCount = queryCount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesImplementationDetails.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesImplementationDetails.java index 2e34b6d9b494..b5f898e83db1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesImplementationDetails.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesImplementationDetails.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Implementation details for the recommended action. */ -@Fluent +@Immutable public final class ObjectRecommendationPropertiesImplementationDetails implements JsonSerializable { /* @@ -30,7 +30,7 @@ public final class ObjectRecommendationPropertiesImplementationDetails /** * Creates an instance of ObjectRecommendationPropertiesImplementationDetails class. */ - public ObjectRecommendationPropertiesImplementationDetails() { + private ObjectRecommendationPropertiesImplementationDetails() { } /** @@ -42,17 +42,6 @@ public String method() { return this.method; } - /** - * Set the method property: Method of implementation for recommended action. - * - * @param method the method value to set. - * @return the ObjectRecommendationPropertiesImplementationDetails object itself. - */ - public ObjectRecommendationPropertiesImplementationDetails withMethod(String method) { - this.method = method; - return this; - } - /** * Get the script property: Implementation script for the recommended action. * @@ -62,25 +51,6 @@ public String script() { return this.script; } - /** - * Set the script property: Implementation script for the recommended action. - * - * @param script the script value to set. - * @return the ObjectRecommendationPropertiesImplementationDetails object itself. - */ - public ObjectRecommendationPropertiesImplementationDetails withScript(String script) { - this.script = script; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineStorageResizeSupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineStorageResizeSupport.java index faadde7dad4b..f488a3618338 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineStorageResizeSupport.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineStorageResizeSupport.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 c1afcdc793c3..ad74e7be8913 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 d2fe3603baa4..f1d5635e0bcf 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -39,7 +39,7 @@ public final class OperationDisplay implements JsonSerializable list(); @@ -27,7 +27,7 @@ public interface Operations { * @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 list of resource provider operations as paginated response with {@link PagedIterable}. + * @return paged collection of Operation items as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDatabasesOnTargetServer.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDatabasesOnTargetServer.java index 5ddb664f5978..285a590659f8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDatabasesOnTargetServer.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDatabasesOnTargetServer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordBasedAuth.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordBasedAuth.java index 16998ada41dd..caac7bac7fc9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordBasedAuth.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordBasedAuth.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgreSqlFlexibleServerHighAvailabilityMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgreSqlFlexibleServerHighAvailabilityMode.java new file mode 100644 index 000000000000..b705672f4e0e --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgreSqlFlexibleServerHighAvailabilityMode.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Modes of high availability supported for this compute. + */ +public final class PostgreSqlFlexibleServerHighAvailabilityMode + extends ExpandableStringEnum { + /** + * Static value Disabled for PostgreSqlFlexibleServerHighAvailabilityMode. + */ + public static final PostgreSqlFlexibleServerHighAvailabilityMode DISABLED = fromString("Disabled"); + + /** + * Static value ZoneRedundant for PostgreSqlFlexibleServerHighAvailabilityMode. + */ + public static final PostgreSqlFlexibleServerHighAvailabilityMode ZONE_REDUNDANT = fromString("ZoneRedundant"); + + /** + * Static value SameZone for PostgreSqlFlexibleServerHighAvailabilityMode. + */ + public static final PostgreSqlFlexibleServerHighAvailabilityMode SAME_ZONE = fromString("SameZone"); + + /** + * Creates a new instance of PostgreSqlFlexibleServerHighAvailabilityMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PostgreSqlFlexibleServerHighAvailabilityMode() { + } + + /** + * Creates or finds a PostgreSqlFlexibleServerHighAvailabilityMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding PostgreSqlFlexibleServerHighAvailabilityMode. + */ + public static PostgreSqlFlexibleServerHighAvailabilityMode fromString(String name) { + return fromString(name, PostgreSqlFlexibleServerHighAvailabilityMode.class); + } + + /** + * Gets known PostgreSqlFlexibleServerHighAvailabilityMode values. + * + * @return known PostgreSqlFlexibleServerHighAvailabilityMode values. + */ + public static Collection values() { + return values(PostgreSqlFlexibleServerHighAvailabilityMode.class); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgresMajorVersion.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgresMajorVersion.java index b3846939172c..b52a5f7b9142 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgresMajorVersion.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgresMajorVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 c791312fb102..28a5a38cf18d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -12,22 +12,22 @@ */ public final class PrincipalType extends ExpandableStringEnum { /** - * Static value Unknown for PrincipalType. + * The principal type is not known or not specified. */ public static final PrincipalType UNKNOWN = fromString("Unknown"); /** - * Static value User for PrincipalType. + * A Microsoft Entra user. */ public static final PrincipalType USER = fromString("User"); /** - * Static value Group for PrincipalType. + * A Microsoft Entra group. */ public static final PrincipalType GROUP = fromString("Group"); /** - * Static value ServicePrincipal for PrincipalType. + * A Microsoft Entra service principal, typically representing an application or service identity. */ public static final PrincipalType SERVICE_PRINCIPAL = fromString("ServicePrincipal"); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateDnsZoneSuffixes.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateDnsZoneSuffixes.java index 2d2647295b5b..146c22f3d6a8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateDnsZoneSuffixes.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateDnsZoneSuffixes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 b9e02f2cb612..3c6e899552d7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -17,7 +17,7 @@ @Immutable public final class PrivateEndpoint implements JsonSerializable { /* - * The ARM identifier for private endpoint. + * The resource identifier of the private endpoint */ private String id; @@ -28,7 +28,7 @@ public PrivateEndpoint() { } /** - * Get the id property: The ARM identifier for private endpoint. + * Get the id property: The resource identifier of the private endpoint. * * @return the id value. */ @@ -36,14 +36,6 @@ public String id() { return this.id; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnection.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnection.java index a77a63401d97..a4d2aa0b9c7e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnection.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnection.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 104ef98f5347..ff442b456c2b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -13,22 +13,22 @@ public final class PrivateEndpointConnectionProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for PrivateEndpointConnectionProvisioningState. + * Connection has been provisioned. */ public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Creating for PrivateEndpointConnectionProvisioningState. + * Connection is being created. */ public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); /** - * Static value Deleting for PrivateEndpointConnectionProvisioningState. + * Connection is being deleted. */ public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); /** - * Static value Failed for PrivateEndpointConnectionProvisioningState. + * Connection provisioning has failed. */ public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnections.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnections.java index f8eb70a3b453..63066059b45e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnections.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnections.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -18,7 +18,8 @@ public interface PrivateEndpointConnections { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -33,7 +34,8 @@ Response getWithResponse(String resourceGroupName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -46,12 +48,13 @@ Response getWithResponse(String resourceGroupName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 private endpoint connection resource. + * @return the response. */ PrivateEndpointConnection update(String resourceGroupName, String serverName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); @@ -61,13 +64,14 @@ PrivateEndpointConnection update(String resourceGroupName, String serverName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @param parameters Parameters required to update a private endpoint connection. * @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 private endpoint connection resource. + * @return the response. */ PrivateEndpointConnection update(String resourceGroupName, String serverName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context); @@ -77,7 +81,8 @@ PrivateEndpointConnection update(String resourceGroupName, String serverName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. @@ -89,7 +94,8 @@ PrivateEndpointConnection update(String resourceGroupName, String serverName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. * @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. 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 19f7edb576b0..6e5c643ca9db 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -13,17 +13,17 @@ public final class PrivateEndpointServiceConnectionStatus extends ExpandableStringEnum { /** - * Static value Pending for PrivateEndpointServiceConnectionStatus. + * Connection waiting for approval or rejection. */ public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); /** - * Static value Approved for PrivateEndpointServiceConnectionStatus. + * Connection approved. */ public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); /** - * Static value Rejected for PrivateEndpointServiceConnectionStatus. + * Connection Rejected. */ public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResource.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResource.java index 3d73b036fef9..6228fcb2c0d8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResource.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResources.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResources.java index 4fc68c5dbfa2..8b91759b4411 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResources.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResources.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -13,55 +13,55 @@ */ public interface PrivateLinkResources { /** - * Gets the private link resources for PostgreSQL server. + * Gets a private link resource for PostgreSQL server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param groupName The name of the private link resource. + * @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 private link resources for PostgreSQL server as paginated response with {@link PagedIterable}. + * @return a private link resource for PostgreSQL server along with {@link Response}. */ - PagedIterable listByServer(String resourceGroupName, String serverName); + Response getWithResponse(String resourceGroupName, String serverName, String groupName, + Context context); /** - * Gets the private link resources for PostgreSQL server. + * Gets a private link resource for PostgreSQL server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param context The context to associate with this operation. + * @param groupName The name of the private link resource. * @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 private link resources for PostgreSQL server as paginated response with {@link PagedIterable}. + * @return a private link resource for PostgreSQL server. */ - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + PrivateLinkResource get(String resourceGroupName, String serverName, String groupName); /** - * Gets a private link resource for PostgreSQL server. + * Gets the private link resources for PostgreSQL server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param groupName The name of the private link resource. - * @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 a private link resource for PostgreSQL server along with {@link Response}. + * @return the private link resources for PostgreSQL server as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String serverName, String groupName, - Context context); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Gets a private link resource for PostgreSQL server. + * Gets the private link resources for PostgreSQL server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param groupName The name of the private link resource. + * @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 a private link resource for PostgreSQL server. + * @return the private link resources for PostgreSQL server as paginated response with {@link PagedIterable}. */ - PrivateLinkResource get(String resourceGroupName, String serverName, String groupName); + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } 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 63efa0ff6394..8c934df2fc9c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -101,14 +101,6 @@ public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequi return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 index 0044cd095fbb..d8de4f17fb34 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 index b2243c0d4723..0066a864519f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 c972f8a7d05c..3b71a0021fe3 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -14,12 +14,12 @@ */ public final class ReadReplicaPromoteMode extends ExpandableStringEnum { /** - * Static value Standalone for ReadReplicaPromoteMode. + * Read replica will become an independent server. */ public static final ReadReplicaPromoteMode STANDALONE = fromString("Standalone"); /** - * Static value Switchover for ReadReplicaPromoteMode. + * Read replica will swap roles with primary server. */ public static final ReadReplicaPromoteMode SWITCHOVER = fromString("Switchover"); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteOption.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteOption.java index 10b4fc9ea6d9..1b77635e67bf 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteOption.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteOption.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -13,12 +13,14 @@ */ public final class ReadReplicaPromoteOption extends ExpandableStringEnum { /** - * Static value Planned for ReadReplicaPromoteOption. + * The operation will wait for data in the read replica to be fully synchronized with its source server, before it + * initiates the operation. */ public static final ReadReplicaPromoteOption PLANNED = fromString("Planned"); /** - * Static value Forced for ReadReplicaPromoteOption. + * The operation will not wait for data in the read replica to be synchronized with its source server, before it + * initiates the operation. */ public static final ReadReplicaPromoteOption FORCED = fromString("Forced"); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeEnum.java index 2e8af8ac605e..9c85f19efa62 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeEnum.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeParameterEnum.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeParameterEnum.java index 4844ad0dd221..4068cd572580 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeParameterEnum.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeParameterEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for RecommendationTypeParameterEnum. + * Recommendations list filter. Retrieves recommendations based on type. */ public final class RecommendationTypeParameterEnum extends ExpandableStringEnum { /** 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 c771b5214aa8..1ba2f96792ac 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -139,14 +139,6 @@ public Replica withPromoteOption(ReadReplicaPromoteOption promoteOption) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replicas.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replicas.java index fa95fe78bf23..02c6095b0e4e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replicas.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replicas.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 bb64fc3cf56c..57b106eb49b8 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; 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 46041d3abf52..6fb3c13b41f3 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -13,32 +13,33 @@ */ public final class ReplicationState extends ExpandableStringEnum { /** - * Static value Active for ReplicationState. + * The read replica server is fully synchronized and actively replicating data from the primary server. */ public static final ReplicationState ACTIVE = fromString("Active"); /** - * Static value Catchup for ReplicationState. + * The read replica server is behind the primary server and is currently catching up with pending changes. */ public static final ReplicationState CATCHUP = fromString("Catchup"); /** - * Static value Provisioning for ReplicationState. + * The read replica server is being created and is in process of getting initialized. */ public static final ReplicationState PROVISIONING = fromString("Provisioning"); /** - * Static value Updating for ReplicationState. + * The read replica server is undergoing some changes it can be changing compute size of promoting it to primary + * server. */ public static final ReplicationState UPDATING = fromString("Updating"); /** - * Static value Broken for ReplicationState. + * Replication has failed or been interrupted. */ public static final ReplicationState BROKEN = fromString("Broken"); /** - * Static value Reconfiguring for ReplicationState. + * The read replica server is being reconfigured, possibly due to changes in source or settings. */ public static final ReplicationState RECONFIGURING = fromString("Reconfiguring"); 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 af701e82f5e2..f5a8c0cb03bc 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -75,14 +75,6 @@ public RestartParameter withFailoverMode(FailoverMode failoverMode) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 6979f5df6243..f0001438142f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -930,4 +930,28 @@ interface WithCluster { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void stop(Context context); + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @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 status of a network migration operation. + */ + MigrateNetworkStatus migrateNetworkMode(); + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @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 status of a network migration operation. + */ + MigrateNetworkStatus migrateNetworkMode(Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerEditionCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerEditionCapability.java index 9972bc7aefa0..f2bbdf73d6ec 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerEditionCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerEditionCapability.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -49,7 +49,7 @@ public final class ServerEditionCapability extends CapabilityBase { /** * Creates an instance of ServerEditionCapability class. */ - public ServerEditionCapability() { + private ServerEditionCapability() { } /** @@ -109,21 +109,6 @@ public CapabilityStatus status() { return this.status; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (supportedStorageEditions() != null) { - supportedStorageEditions().forEach(e -> e.validate()); - } - if (supportedServerSkus() != null) { - supportedServerSkus().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForPatch.java index 670d701f4109..06f37a697564 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -126,24 +126,6 @@ public String administratorLogin() { return this.innerProperties() == null ? null : this.innerProperties().administratorLogin(); } - /** - * Set the administratorLogin property: Name of the login designated as the first password based administrator - * assigned to your instance of PostgreSQL. Must be specified the first time that you enable password based - * authentication on a server. Once set to a given value, it cannot be changed for the rest of the life of a server. - * If you disable password based authentication on a server which had it enabled, this password based role isn't - * deleted. - * - * @param administratorLogin the administratorLogin value to set. - * @return the ServerForPatch object itself. - */ - public ServerForPatch withAdministratorLogin(String administratorLogin) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerPropertiesForPatch(); - } - this.innerProperties().withAdministratorLogin(administratorLogin); - return this; - } - /** * Get the administratorLoginPassword property: Password assigned to the administrator login. As long as password * authentication is enabled, this password can be changed at any time. @@ -472,23 +454,6 @@ public ServerForPatch withCluster(Cluster cluster) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ 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 77c01af64dea..8cf53d509d23 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -8,8 +8,7 @@ import java.util.Collection; /** - * Indicates if public network access is enabled or not. This is only supported for servers that are not integrated into - * a virtual network which is owned and provided by customer when server is deployed. + * Indicates if public network access is enabled or not. */ public final class ServerPublicNetworkAccessState extends ExpandableStringEnum { /** 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 a2fe07ed0362..938e8072326b 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Compute information of a server. */ -@Fluent +@Immutable public final class ServerSku implements JsonSerializable { /* * Compute tier and size of the database server. This object is empty for an Azure Database for PostgreSQL single @@ -30,7 +30,7 @@ public final class ServerSku implements JsonSerializable { /** * Creates an instance of ServerSku class. */ - public ServerSku() { + private ServerSku() { } /** @@ -43,18 +43,6 @@ public String name() { return this.name; } - /** - * Set the name property: Compute tier and size of the database server. This object is empty for an Azure Database - * for PostgreSQL single server. - * - * @param name the name value to set. - * @return the ServerSku object itself. - */ - public ServerSku withName(String name) { - this.name = name; - return this; - } - /** * Get the tier property: Tier of the compute assigned to a server. * @@ -64,25 +52,6 @@ public SkuTier tier() { return this.tier; } - /** - * Set the tier property: Tier of the compute assigned to a server. - * - * @param tier the tier value to set. - * @return the ServerSku object itself. - */ - public ServerSku withTier(SkuTier tier) { - this.tier = tier; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ 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 97a567f0ed30..d812950f9d3f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -69,7 +69,7 @@ public final class ServerSkuCapability extends CapabilityBase { /** * Creates an instance of ServerSkuCapability class. */ - public ServerSkuCapability() { + private ServerSkuCapability() { } /** @@ -165,18 +165,6 @@ public CapabilityStatus status() { return this.status; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (supportedFeatures() != null) { - supportedFeatures().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ 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 cdb7e1b2a03a..970dabe0bf92 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettings.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettings.java index 028b26e00a9c..51d9be94b2df 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettings.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersionCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersionCapability.java index 67436e57527d..7789c3648f72 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersionCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersionCapability.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -44,7 +44,7 @@ public final class ServerVersionCapability extends CapabilityBase { /** * Creates an instance of ServerVersionCapability class. */ - public ServerVersionCapability() { + private ServerVersionCapability() { } /** @@ -95,18 +95,6 @@ public CapabilityStatus status() { return this.status; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (supportedFeatures() != null) { - supportedFeatures().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Servers.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Servers.java index f5c9744b0e41..42aae3145ce8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Servers.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Servers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -13,52 +13,52 @@ */ public interface Servers { /** - * Deletes or drops an existing server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @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 information about an existing server along with {@link Response}. */ - void deleteByResourceGroup(String resourceGroupName, String serverName); + Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context); /** - * Deletes or drops an existing server. + * Gets information about an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @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 information about an existing server. */ - void delete(String resourceGroupName, String serverName, Context context); + Server getByResourceGroup(String resourceGroupName, String serverName); /** - * Gets information about an existing server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @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 information about an existing server along with {@link Response}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context); + void deleteByResourceGroup(String resourceGroupName, String serverName); /** - * Gets information about an existing server. + * Deletes or drops an existing server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @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 information about an existing server. */ - Server getByResourceGroup(String resourceGroupName, String serverName); + void delete(String resourceGroupName, String serverName, Context context); /** * Lists all servers in a resource group. @@ -173,6 +173,35 @@ public interface Servers { */ void stop(String resourceGroupName, String serverName, Context context); + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 status of a network migration operation. + */ + MigrateNetworkStatus migrateNetworkMode(String resourceGroupName, String serverName); + + /** + * Migrates the network configuration of a PostgreSQL flexible server from customer owned VNET to Microsoft owned + * VNET with support for private endpoints, or from Microsoft owned VNET with no support for private endpoints to + * Microsoft owned VNET with support for private endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @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 status of a network migration operation. + */ + MigrateNetworkStatus migrateNetworkMode(String resourceGroupName, String serverName, Context context); + /** * Gets information about an existing server. * diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Sku.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Sku.java index b357c4ab7638..0fb6d53f4561 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Sku.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Sku.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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.JsonSerializable; import com.azure.json.JsonToken; @@ -73,22 +72,6 @@ public Sku withTier(SkuTier tier) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Sku")); - } - if (tier() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property tier in model Sku")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Sku.class); - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuForPatch.java index 51e7fe8838bd..dceb51031b77 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuForPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -72,14 +72,6 @@ public SkuForPatch withTier(SkuTier tier) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuTier.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuTier.java index dbdaf5ede1c0..dd3cdde06be4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuTier.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuTier.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SourceType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SourceType.java index dd9574fbaa70..fbdbf774ab73 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SourceType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SourceType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SslMode.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SslMode.java index 280d61b5f58c..94a69d4c0b16 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SslMode.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SslMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigration.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigration.java index 1cece04f7e97..0958f3dd48b9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigration.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Storage.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Storage.java index 65356fe6c68e..ac67ebcca446 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Storage.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Storage.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -182,14 +182,6 @@ public Storage withType(StorageType type) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrow.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrow.java index 3464db964731..8d51e401131e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrow.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrow.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupport.java index 5de2b28b18c2..a9f4736eb9be 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupport.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupport.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageEditionCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageEditionCapability.java index 2f78571e1f4d..73d0727ad0d1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageEditionCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageEditionCapability.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -44,7 +44,7 @@ public final class StorageEditionCapability extends CapabilityBase { /** * Creates an instance of StorageEditionCapability class. */ - public StorageEditionCapability() { + private StorageEditionCapability() { } /** @@ -94,18 +94,6 @@ public CapabilityStatus status() { return this.status; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (supportedStorageMb() != null) { - supportedStorageMb().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageMbCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageMbCapability.java index 9e669f7962b4..033e31929fee 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageMbCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageMbCapability.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -69,7 +69,7 @@ public final class StorageMbCapability extends CapabilityBase { /** * Creates an instance of StorageMbCapability class. */ - public StorageMbCapability() { + private StorageMbCapability() { } /** @@ -164,18 +164,6 @@ public CapabilityStatus status() { return this.status; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (supportedIopsTiers() != null) { - supportedIopsTiers().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageTierCapability.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageTierCapability.java index c886ec63fe26..1c07f0c17687 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageTierCapability.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageTierCapability.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -38,7 +38,7 @@ public final class StorageTierCapability extends CapabilityBase { /** * Creates an instance of StorageTierCapability class. */ - public StorageTierCapability() { + private StorageTierCapability() { } /** @@ -79,15 +79,6 @@ public CapabilityStatus status() { return this.status; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageType.java index 2c0b523f7b07..7b9b739d1a7d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeature.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeature.java index 57964df1a66e..b1fe72b020e7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeature.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeature.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -29,7 +29,7 @@ public final class SupportedFeature implements JsonSerializable { /** diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptions.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptions.java index 575ba179e7c0..5dc1e3fc483e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptions.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsOperations.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsOperations.java index 8916c88d3fa9..58fd30e80bf8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsOperations.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsOperations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -41,57 +41,57 @@ Response getWithResponse(String resourceGroupName, String serverN TuningOptions get(String resourceGroupName, String serverName, TuningOptionParameterEnum tuningOption); /** - * Lists available object recommendations. + * Lists the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. * @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 list of available object recommendations as paginated response with {@link PagedIterable}. + * @return list of server tuning options as paginated response with {@link PagedIterable}. */ - PagedIterable listRecommendations(String resourceGroupName, String serverName, - TuningOptionParameterEnum tuningOption); + PagedIterable listByServer(String resourceGroupName, String serverName); /** - * Lists available object recommendations. + * Lists the tuning options of a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. - * @param tuningOption The name of the tuning option. - * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. * @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 list of available object recommendations as paginated response with {@link PagedIterable}. + * @return list of server tuning options as paginated response with {@link PagedIterable}. */ - PagedIterable listRecommendations(String resourceGroupName, String serverName, - TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType, Context context); + PagedIterable listByServer(String resourceGroupName, String serverName, Context context); /** - * Lists the tuning options of a server. + * Lists available object recommendations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. * @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 list of server tuning options as paginated response with {@link PagedIterable}. + * @return list of available object recommendations as paginated response with {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName); + PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption); /** - * Lists the tuning options of a server. + * Lists available object recommendations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. + * @param tuningOption The name of the tuning option. + * @param recommendationType Recommendations list filter. Retrieves recommendations based on type. * @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 list of server tuning options as paginated response with {@link PagedIterable}. + * @return list of available object recommendations as paginated response with {@link PagedIterable}. */ - PagedIterable listByServer(String resourceGroupName, String serverName, Context context); + PagedIterable listRecommendations(String resourceGroupName, String serverName, + TuningOptionParameterEnum tuningOption, RecommendationTypeParameterEnum recommendationType, Context context); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserAssignedIdentity.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserAssignedIdentity.java index 99ba4c9f680c..f59825bc36d3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserAssignedIdentity.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserAssignedIdentity.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. 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.JsonSerializable; import com.azure.json.JsonToken; @@ -115,27 +114,6 @@ public String tenantId() { return this.tenantId; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userAssignedIdentities() != null) { - userAssignedIdentities().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property type in model UserAssignedIdentity")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UserAssignedIdentity.class); - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserIdentity.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserIdentity.java index b280a19f40e8..e5574ad2a2f1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserIdentity.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -76,14 +76,6 @@ public UserIdentity withClientId(String clientId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationDetails.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationDetails.java index 05135027c8a7..cf28f00d29f9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationDetails.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationDetails.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -18,7 +18,7 @@ /** * Details for the validation for migration. */ -@Fluent +@Immutable public final class ValidationDetails implements JsonSerializable { /* * Validation status for migration. @@ -48,7 +48,7 @@ public final class ValidationDetails implements JsonSerializable serverLevelValidationDetails() { return this.serverLevelValidationDetails; } - /** - * Set the serverLevelValidationDetails property: Details of server level validations. - * - * @param serverLevelValidationDetails the serverLevelValidationDetails value to set. - * @return the ValidationDetails object itself. - */ - public ValidationDetails - withServerLevelValidationDetails(List serverLevelValidationDetails) { - this.serverLevelValidationDetails = serverLevelValidationDetails; - return this; - } - /** * Get the dbLevelValidationDetails property: Details of server level validations. * @@ -141,31 +96,6 @@ public List dbLevelValidationDetails() { return this.dbLevelValidationDetails; } - /** - * Set the dbLevelValidationDetails property: Details of server level validations. - * - * @param dbLevelValidationDetails the dbLevelValidationDetails value to set. - * @return the ValidationDetails object itself. - */ - public ValidationDetails withDbLevelValidationDetails(List dbLevelValidationDetails) { - this.dbLevelValidationDetails = dbLevelValidationDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serverLevelValidationDetails() != null) { - serverLevelValidationDetails().forEach(e -> e.validate()); - } - if (dbLevelValidationDetails() != null) { - dbLevelValidationDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationMessage.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationMessage.java index 6e8bed7063db..cc5a8a7259c4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationMessage.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationMessage.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Validation message object. */ -@Fluent +@Immutable public final class ValidationMessage implements JsonSerializable { /* * Severity of validation message. @@ -29,7 +29,7 @@ public final class ValidationMessage implements JsonSerializable { /* * Validation type. @@ -35,7 +35,7 @@ public final class ValidationSummaryItem implements JsonSerializable messages() { return this.messages; } - /** - * Set the messages property: Validation messages. - * - * @param messages the messages value to set. - * @return the ValidationSummaryItem object itself. - */ - public ValidationSummaryItem withMessages(List messages) { - this.messages = messages; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (messages() != null) { - messages().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoint.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoint.java index c408365e4654..f94dc320f4b6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoint.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -14,55 +14,53 @@ */ public interface VirtualEndpoint { /** - * Gets the endpointType property: Type of endpoint for the virtual endpoints. + * Gets the id property: Fully qualified resource Id for the resource. * - * @return the endpointType value. + * @return the id value. */ - VirtualEndpointType endpointType(); + String id(); /** - * Gets the members property: List of servers that one of the virtual endpoints can refer to. + * Gets the name property: The name of the resource. * - * @return the members value. + * @return the name value. */ - List members(); + String name(); /** - * Gets the virtualEndpoints property: List of virtual endpoints for a server. + * Gets the type property: The type of the resource. * - * @return the virtualEndpoints value. + * @return the type value. */ - List virtualEndpoints(); + String type(); /** - * Gets the id property: Fully qualified resource ID for the resource. E.g. - * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the id value. + * @return the systemData value. */ - String id(); + SystemData systemData(); /** - * Gets the name property: The name of the resource. + * Gets the endpointType property: Type of endpoint for the virtual endpoints. * - * @return the name value. + * @return the endpointType value. */ - String name(); + VirtualEndpointType endpointType(); /** - * Gets the type property: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - * "Microsoft.Storage/storageAccounts". + * Gets the members property: List of servers that one of the virtual endpoints can refer to. * - * @return the type value. + * @return the members value. */ - String type(); + List members(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Gets the virtualEndpoints property: List of virtual endpoints for a server. * - * @return the systemData value. + * @return the virtualEndpoints value. */ - SystemData systemData(); + List virtualEndpoints(); /** * Gets the name of the resource group. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResourceForPatch.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResourceForPatch.java index 22ec5fa5b809..9ecc78c7336e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResourceForPatch.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResourceForPatch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -17,7 +17,7 @@ * Pair of virtual endpoints for a server. */ @Fluent -public class VirtualEndpointResourceForPatch implements JsonSerializable { +public final class VirtualEndpointResourceForPatch implements JsonSerializable { /* * Properties of the pair of virtual endpoints. */ @@ -38,17 +38,6 @@ private VirtualEndpointResourceProperties innerProperties() { return this.innerProperties; } - /** - * Set the innerProperties property: Properties of the pair of virtual endpoints. - * - * @param innerProperties the innerProperties value to set. - * @return the VirtualEndpointResourceForPatch object itself. - */ - VirtualEndpointResourceForPatch withInnerProperties(VirtualEndpointResourceProperties innerProperties) { - this.innerProperties = innerProperties; - return this; - } - /** * Get the endpointType property: Type of endpoint for the virtual endpoints. * @@ -104,17 +93,6 @@ public List virtualEndpoints() { return this.innerProperties() == null ? null : this.innerProperties().virtualEndpoints(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointType.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointType.java index fca4579d570b..8a4342f0f6a6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointType.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoints.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoints.java index e04ee5714df7..3ee3c6282ca7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoints.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoints.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -13,57 +13,57 @@ */ public interface VirtualEndpoints { /** - * Deletes a pair of virtual endpoints. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualEndpointName Base name of the virtual endpoints. + * @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 information about a pair of virtual endpoints along with {@link Response}. */ - void delete(String resourceGroupName, String serverName, String virtualEndpointName); + Response getWithResponse(String resourceGroupName, String serverName, String virtualEndpointName, + Context context); /** - * Deletes a pair of virtual endpoints. + * Gets information about a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualEndpointName Base name of the virtual endpoints. - * @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 information about a pair of virtual endpoints. */ - void delete(String resourceGroupName, String serverName, String virtualEndpointName, Context context); + VirtualEndpoint get(String resourceGroupName, String serverName, String virtualEndpointName); /** - * Gets information about a pair of virtual endpoints. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualEndpointName Base name of the virtual endpoints. - * @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 information about a pair of virtual endpoints along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String serverName, String virtualEndpointName, - Context context); + void delete(String resourceGroupName, String serverName, String virtualEndpointName); /** - * Gets information about a pair of virtual endpoints. + * Deletes a pair of virtual endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param virtualEndpointName Base name of the virtual endpoints. + * @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 information about a pair of virtual endpoints. */ - VirtualEndpoint get(String resourceGroupName, String serverName, String virtualEndpointName); + void delete(String resourceGroupName, String serverName, String virtualEndpointName, Context context); /** * Lists pair of virtual endpoints associated to a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageModel.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageModel.java index 847409abb36e..9da7a3d63d83 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageModel.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageModel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageParameter.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageParameter.java index e4d9bc5b96b8..acf4c47deac1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageParameter.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageParameter.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -47,14 +47,6 @@ public VirtualNetworkSubnetUsageParameter withVirtualNetworkArmResourceId(String return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsages.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsages.java index 7a58b27450f9..9dd806a81dd5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsages.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsages.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; @@ -15,7 +15,7 @@ public interface VirtualNetworkSubnetUsages { * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. - * @param parameters The required parameters for creating or updating a server. + * @param parameters The request body. * @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. @@ -29,7 +29,7 @@ Response listWithResponse(String locationName, * Lists the virtual network subnet usage for a given virtual network. * * @param locationName The name of the location. - * @param parameters The required parameters for creating or updating a server. + * @param parameters The request body. * @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. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.java index 126dee36fd15..136c5c3799c8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilitySupport.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilitySupport.java index eaa3073c0715..18b09f1b2e99 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilitySupport.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilitySupport.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.models; diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/package-info.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/package-info.java index 4be91fe90b9d..170a17f93bee 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/package-info.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for PostgreSqlManagementClient. + * Package containing the data models for PostgreSql. * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure * PostgreSQL resources including servers, databases, firewall rules, network configuration, 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/package-info.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/package-info.java index ce951214f674..ae2bb4368663 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/package-info.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for PostgreSqlManagementClient. + * Package containing the classes for PostgreSql. * The Azure Database for PostgreSQL management API provides create, read, update, and delete functionality for Azure * PostgreSQL resources including servers, databases, firewall rules, network configuration, security alert policies, * log files and configurations with new business model. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/module-info.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/module-info.java index 9d9f1556ba85..ec7233ccb9d2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/module-info.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.postgresqlflexibleserver { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.postgresqlflexibleserver.fluent.models to com.azure.core; opens com.azure.resourcemanager.postgresqlflexibleserver.models to com.azure.core; + opens com.azure.resourcemanager.postgresqlflexibleserver.implementation.models to com.azure.core; } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/resources/META-INF/azure-resourcemanager-postgresqlflexibleserver_apiview_properties.json b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/resources/META-INF/azure-resourcemanager-postgresqlflexibleserver_apiview_properties.json new file mode 100644 index 000000000000..ded099dcc88b --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/resources/META-INF/azure-resourcemanager-postgresqlflexibleserver_apiview_properties.json @@ -0,0 +1,466 @@ +{ + "flavor": "azure", + "CrossLanguageDefinitionId": { + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient": "Microsoft.DBforPostgreSQL", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.beginCreateOrUpdate": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.beginCreateOrUpdateAsync": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.beginDelete": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.beginDeleteAsync": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.createOrUpdate": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.createOrUpdateAsync": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.createOrUpdateWithResponseAsync": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.delete": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.deleteAsync": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.deleteWithResponseAsync": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.get": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.getAsync": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.getWithResponse": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.getWithResponseAsync": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.listByServer": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.listByServerAsync": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient": "Microsoft.DBforPostgreSQL", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient.get": "Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient.getAsync": "Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient.getWithResponse": "Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient.getWithResponseAsync": "Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient.listByServer": "Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient.listByServerAsync": "Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient": "Microsoft.DBforPostgreSQL", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.beginCreate": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.beginCreateAsync": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.beginDelete": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.beginDeleteAsync": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.create": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.createAsync": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.createWithResponseAsync": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.delete": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.deleteAsync": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.deleteWithResponseAsync": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.get": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.getAsync": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.getWithResponse": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.getWithResponseAsync": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.listByServer": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.listByServerAsync": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient": "Microsoft.DBforPostgreSQL", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.beginStart": "Microsoft.DBforPostgreSQL.Servers.start", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.beginStartAsync": "Microsoft.DBforPostgreSQL.Servers.start", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.checkPrerequisites": "Microsoft.DBforPostgreSQL.Servers.checkPrerequisites", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.checkPrerequisitesAsync": "Microsoft.DBforPostgreSQL.Servers.checkPrerequisites", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.checkPrerequisitesWithResponse": "Microsoft.DBforPostgreSQL.Servers.checkPrerequisites", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.checkPrerequisitesWithResponseAsync": "Microsoft.DBforPostgreSQL.Servers.checkPrerequisites", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.get": "Microsoft.DBforPostgreSQL.BackupsLongTermRetentionOperations.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.getAsync": "Microsoft.DBforPostgreSQL.BackupsLongTermRetentionOperations.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.getWithResponse": "Microsoft.DBforPostgreSQL.BackupsLongTermRetentionOperations.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.getWithResponseAsync": "Microsoft.DBforPostgreSQL.BackupsLongTermRetentionOperations.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.listByServer": "Microsoft.DBforPostgreSQL.BackupsLongTermRetentionOperations.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.listByServerAsync": "Microsoft.DBforPostgreSQL.BackupsLongTermRetentionOperations.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.start": "Microsoft.DBforPostgreSQL.Servers.start", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.startAsync": "Microsoft.DBforPostgreSQL.Servers.start", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.startWithResponseAsync": "Microsoft.DBforPostgreSQL.Servers.start", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByLocationsClient": "Microsoft.DBforPostgreSQL", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByLocationsClient.list": "Microsoft.DBforPostgreSQL.CapabilitiesByLocationOperationGroup.list", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByLocationsClient.listAsync": "Microsoft.DBforPostgreSQL.CapabilitiesByLocationOperationGroup.list", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByServersClient": "Microsoft.DBforPostgreSQL", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByServersClient.list": "Microsoft.DBforPostgreSQL.Servers.list", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByServersClient.listAsync": "Microsoft.DBforPostgreSQL.Servers.list", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapturedLogsClient": "Microsoft.DBforPostgreSQL", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapturedLogsClient.listByServer": "Microsoft.DBforPostgreSQL.Servers.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapturedLogsClient.listByServerAsync": "Microsoft.DBforPostgreSQL.Servers.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient": "Microsoft.DBforPostgreSQL.Configurations", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.beginPut": "Microsoft.DBforPostgreSQL.Configurations.put", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.beginPutAsync": "Microsoft.DBforPostgreSQL.Configurations.put", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.beginUpdate": "Microsoft.DBforPostgreSQL.Configurations.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.beginUpdateAsync": "Microsoft.DBforPostgreSQL.Configurations.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.get": "Microsoft.DBforPostgreSQL.Configurations.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.getAsync": "Microsoft.DBforPostgreSQL.Configurations.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.getWithResponse": "Microsoft.DBforPostgreSQL.Configurations.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.getWithResponseAsync": "Microsoft.DBforPostgreSQL.Configurations.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.listByServer": "Microsoft.DBforPostgreSQL.Configurations.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.listByServerAsync": "Microsoft.DBforPostgreSQL.Configurations.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.put": "Microsoft.DBforPostgreSQL.Configurations.put", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.putAsync": "Microsoft.DBforPostgreSQL.Configurations.put", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.putWithResponseAsync": "Microsoft.DBforPostgreSQL.Configurations.put", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.update": "Microsoft.DBforPostgreSQL.Configurations.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.updateAsync": "Microsoft.DBforPostgreSQL.Configurations.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.updateWithResponseAsync": "Microsoft.DBforPostgreSQL.Configurations.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient": "Microsoft.DBforPostgreSQL.Databases", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.beginCreate": "Microsoft.DBforPostgreSQL.Databases.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.beginCreateAsync": "Microsoft.DBforPostgreSQL.Databases.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.beginDelete": "Microsoft.DBforPostgreSQL.Databases.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.beginDeleteAsync": "Microsoft.DBforPostgreSQL.Databases.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.create": "Microsoft.DBforPostgreSQL.Databases.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.createAsync": "Microsoft.DBforPostgreSQL.Databases.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.createWithResponseAsync": "Microsoft.DBforPostgreSQL.Databases.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.delete": "Microsoft.DBforPostgreSQL.Databases.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.deleteAsync": "Microsoft.DBforPostgreSQL.Databases.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.deleteWithResponseAsync": "Microsoft.DBforPostgreSQL.Databases.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.get": "Microsoft.DBforPostgreSQL.Databases.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.getAsync": "Microsoft.DBforPostgreSQL.Databases.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.getWithResponse": "Microsoft.DBforPostgreSQL.Databases.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.getWithResponseAsync": "Microsoft.DBforPostgreSQL.Databases.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.listByServer": "Microsoft.DBforPostgreSQL.Databases.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.listByServerAsync": "Microsoft.DBforPostgreSQL.Databases.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient": "Microsoft.DBforPostgreSQL.FirewallRules", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.beginCreateOrUpdate": "Microsoft.DBforPostgreSQL.FirewallRules.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.beginCreateOrUpdateAsync": "Microsoft.DBforPostgreSQL.FirewallRules.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.beginDelete": "Microsoft.DBforPostgreSQL.FirewallRules.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.beginDeleteAsync": "Microsoft.DBforPostgreSQL.FirewallRules.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.createOrUpdate": "Microsoft.DBforPostgreSQL.FirewallRules.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.createOrUpdateAsync": "Microsoft.DBforPostgreSQL.FirewallRules.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.createOrUpdateWithResponseAsync": "Microsoft.DBforPostgreSQL.FirewallRules.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.delete": "Microsoft.DBforPostgreSQL.FirewallRules.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.deleteAsync": "Microsoft.DBforPostgreSQL.FirewallRules.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.deleteWithResponseAsync": "Microsoft.DBforPostgreSQL.FirewallRules.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.get": "Microsoft.DBforPostgreSQL.FirewallRules.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.getAsync": "Microsoft.DBforPostgreSQL.FirewallRules.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.getWithResponse": "Microsoft.DBforPostgreSQL.FirewallRules.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.getWithResponseAsync": "Microsoft.DBforPostgreSQL.FirewallRules.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.listByServer": "Microsoft.DBforPostgreSQL.FirewallRules.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.listByServerAsync": "Microsoft.DBforPostgreSQL.FirewallRules.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient": "Microsoft.DBforPostgreSQL.Migrations", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.cancel": "Microsoft.DBforPostgreSQL.Migrations.cancel", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.cancelAsync": "Microsoft.DBforPostgreSQL.Migrations.cancel", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.cancelWithResponse": "Microsoft.DBforPostgreSQL.Migrations.cancel", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.cancelWithResponseAsync": "Microsoft.DBforPostgreSQL.Migrations.cancel", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.checkNameAvailability": "Microsoft.DBforPostgreSQL.Servers.checkNameAvailability", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.checkNameAvailabilityAsync": "Microsoft.DBforPostgreSQL.Servers.checkNameAvailability", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.checkNameAvailabilityWithResponse": "Microsoft.DBforPostgreSQL.Servers.checkNameAvailability", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.checkNameAvailabilityWithResponseAsync": "Microsoft.DBforPostgreSQL.Servers.checkNameAvailability", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.create": "Microsoft.DBforPostgreSQL.Migrations.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.createAsync": "Microsoft.DBforPostgreSQL.Migrations.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.createWithResponse": "Microsoft.DBforPostgreSQL.Migrations.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.createWithResponseAsync": "Microsoft.DBforPostgreSQL.Migrations.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.get": "Microsoft.DBforPostgreSQL.Migrations.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.getAsync": "Microsoft.DBforPostgreSQL.Migrations.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.getWithResponse": "Microsoft.DBforPostgreSQL.Migrations.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.getWithResponseAsync": "Microsoft.DBforPostgreSQL.Migrations.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.listByTargetServer": "Microsoft.DBforPostgreSQL.Migrations.listByTargetServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.listByTargetServerAsync": "Microsoft.DBforPostgreSQL.Migrations.listByTargetServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.update": "Microsoft.DBforPostgreSQL.Migrations.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.updateAsync": "Microsoft.DBforPostgreSQL.Migrations.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.updateWithResponse": "Microsoft.DBforPostgreSQL.Migrations.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.updateWithResponseAsync": "Microsoft.DBforPostgreSQL.Migrations.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient": "Microsoft.DBforPostgreSQL", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient.checkGlobally": "Microsoft.DBforPostgreSQL.NameAvailabilityOperationGroup.checkGlobally", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient.checkGloballyAsync": "Microsoft.DBforPostgreSQL.NameAvailabilityOperationGroup.checkGlobally", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient.checkGloballyWithResponse": "Microsoft.DBforPostgreSQL.NameAvailabilityOperationGroup.checkGlobally", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient.checkGloballyWithResponseAsync": "Microsoft.DBforPostgreSQL.NameAvailabilityOperationGroup.checkGlobally", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient.checkWithLocation": "Microsoft.DBforPostgreSQL.NameAvailabilityOperationGroup.checkWithLocation", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient.checkWithLocationAsync": "Microsoft.DBforPostgreSQL.NameAvailabilityOperationGroup.checkWithLocation", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient.checkWithLocationWithResponse": "Microsoft.DBforPostgreSQL.NameAvailabilityOperationGroup.checkWithLocation", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient.checkWithLocationWithResponseAsync": "Microsoft.DBforPostgreSQL.NameAvailabilityOperationGroup.checkWithLocation", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.OperationsClient": "Microsoft.DBforPostgreSQL.Operations", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.OperationsClient.list": "Azure.ResourceManager.Legacy.Operations.list", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.OperationsClient.listAsync": "Azure.ResourceManager.Legacy.Operations.list", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PostgreSqlManagementClient": "Microsoft.DBforPostgreSQL", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient": "Microsoft.DBforPostgreSQL", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient.get": "Microsoft.DBforPostgreSQL.PrivateDnsZoneSuffixOperationGroup.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient.getAsync": "Microsoft.DBforPostgreSQL.PrivateDnsZoneSuffixOperationGroup.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient.getWithResponse": "Microsoft.DBforPostgreSQL.PrivateDnsZoneSuffixOperationGroup.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient.getWithResponseAsync": "Microsoft.DBforPostgreSQL.PrivateDnsZoneSuffixOperationGroup.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.beginDelete": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.beginDeleteAsync": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.beginUpdate": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.beginUpdateAsync": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.delete": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.deleteAsync": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.deleteWithResponseAsync": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.get": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.getAsync": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.getWithResponse": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.getWithResponseAsync": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.listByServer": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.listByServerAsync": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.update": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.updateAsync": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.updateWithResponseAsync": "Microsoft.DBforPostgreSQL.PrivateEndpointConnections.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient": "Microsoft.DBforPostgreSQL.PrivateLinkResources", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient.get": "Microsoft.DBforPostgreSQL.PrivateLinkResources.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient.getAsync": "Microsoft.DBforPostgreSQL.PrivateLinkResources.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient.getWithResponse": "Microsoft.DBforPostgreSQL.PrivateLinkResources.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient.getWithResponseAsync": "Microsoft.DBforPostgreSQL.PrivateLinkResources.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient.listByServer": "Microsoft.DBforPostgreSQL.PrivateLinkResources.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient.listByServerAsync": "Microsoft.DBforPostgreSQL.PrivateLinkResources.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.QuotaUsagesClient": "Microsoft.DBforPostgreSQL", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.QuotaUsagesClient.list": "Microsoft.DBforPostgreSQL.QuotaUsagesOperationGroup.list", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.QuotaUsagesClient.listAsync": "Microsoft.DBforPostgreSQL.QuotaUsagesOperationGroup.list", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ReplicasClient": "Microsoft.DBforPostgreSQL", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ReplicasClient.listByServer": "Microsoft.DBforPostgreSQL.Servers.replicasListByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ReplicasClient.listByServerAsync": "Microsoft.DBforPostgreSQL.Servers.replicasListByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient": "Microsoft.DBforPostgreSQL", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient.beginCreateOrUpdate": "Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient.beginCreateOrUpdateAsync": "Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient.createOrUpdate": "Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient.createOrUpdateAsync": "Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient.createOrUpdateWithResponseAsync": "Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient": "Microsoft.DBforPostgreSQL.Servers", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginCreateOrUpdate": "Microsoft.DBforPostgreSQL.Servers.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginCreateOrUpdateAsync": "Microsoft.DBforPostgreSQL.Servers.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginDelete": "Microsoft.DBforPostgreSQL.Servers.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginDeleteAsync": "Microsoft.DBforPostgreSQL.Servers.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginMigrateNetworkMode": "Microsoft.DBforPostgreSQL.Servers.migrateNetworkMode", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginMigrateNetworkModeAsync": "Microsoft.DBforPostgreSQL.Servers.migrateNetworkMode", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginRestart": "Microsoft.DBforPostgreSQL.Servers.restart", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginRestartAsync": "Microsoft.DBforPostgreSQL.Servers.restart", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginStart": "Microsoft.DBforPostgreSQL.Servers.serversStart", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginStartAsync": "Microsoft.DBforPostgreSQL.Servers.serversStart", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginStop": "Microsoft.DBforPostgreSQL.Servers.stop", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginStopAsync": "Microsoft.DBforPostgreSQL.Servers.stop", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginUpdate": "Microsoft.DBforPostgreSQL.Servers.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginUpdateAsync": "Microsoft.DBforPostgreSQL.Servers.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.createOrUpdate": "Microsoft.DBforPostgreSQL.Servers.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.createOrUpdateAsync": "Microsoft.DBforPostgreSQL.Servers.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.createOrUpdateWithResponseAsync": "Microsoft.DBforPostgreSQL.Servers.createOrUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.delete": "Microsoft.DBforPostgreSQL.Servers.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.deleteAsync": "Microsoft.DBforPostgreSQL.Servers.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.deleteWithResponseAsync": "Microsoft.DBforPostgreSQL.Servers.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.getByResourceGroup": "Microsoft.DBforPostgreSQL.Servers.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.getByResourceGroupAsync": "Microsoft.DBforPostgreSQL.Servers.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.getByResourceGroupWithResponse": "Microsoft.DBforPostgreSQL.Servers.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.getByResourceGroupWithResponseAsync": "Microsoft.DBforPostgreSQL.Servers.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.list": "Microsoft.DBforPostgreSQL.Servers.listBySubscription", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.listAsync": "Microsoft.DBforPostgreSQL.Servers.listBySubscription", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.listByResourceGroup": "Microsoft.DBforPostgreSQL.Servers.listByResourceGroup", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.listByResourceGroupAsync": "Microsoft.DBforPostgreSQL.Servers.listByResourceGroup", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.migrateNetworkMode": "Microsoft.DBforPostgreSQL.Servers.migrateNetworkMode", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.migrateNetworkModeAsync": "Microsoft.DBforPostgreSQL.Servers.migrateNetworkMode", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.migrateNetworkModeWithResponseAsync": "Microsoft.DBforPostgreSQL.Servers.migrateNetworkMode", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.restart": "Microsoft.DBforPostgreSQL.Servers.restart", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.restartAsync": "Microsoft.DBforPostgreSQL.Servers.restart", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.restartWithResponseAsync": "Microsoft.DBforPostgreSQL.Servers.restart", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.start": "Microsoft.DBforPostgreSQL.Servers.serversStart", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.startAsync": "Microsoft.DBforPostgreSQL.Servers.serversStart", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.startWithResponseAsync": "Microsoft.DBforPostgreSQL.Servers.serversStart", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.stop": "Microsoft.DBforPostgreSQL.Servers.stop", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.stopAsync": "Microsoft.DBforPostgreSQL.Servers.stop", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.stopWithResponseAsync": "Microsoft.DBforPostgreSQL.Servers.stop", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.update": "Microsoft.DBforPostgreSQL.Servers.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.updateAsync": "Microsoft.DBforPostgreSQL.Servers.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.updateWithResponseAsync": "Microsoft.DBforPostgreSQL.Servers.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient": "Microsoft.DBforPostgreSQL", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient.get": "Microsoft.DBforPostgreSQL.TuningOptionsOperationGroup.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient.getAsync": "Microsoft.DBforPostgreSQL.TuningOptionsOperationGroup.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient.getWithResponse": "Microsoft.DBforPostgreSQL.TuningOptionsOperationGroup.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient.getWithResponseAsync": "Microsoft.DBforPostgreSQL.TuningOptionsOperationGroup.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient.listByServer": "Microsoft.DBforPostgreSQL.TuningOptionsOperationGroup.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient.listByServerAsync": "Microsoft.DBforPostgreSQL.TuningOptionsOperationGroup.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient.listRecommendations": "Microsoft.DBforPostgreSQL.TuningOptionsOperationGroup.listRecommendations", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient.listRecommendationsAsync": "Microsoft.DBforPostgreSQL.TuningOptionsOperationGroup.listRecommendations", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient": "Microsoft.DBforPostgreSQL.VirtualEndpoints", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.beginCreate": "Microsoft.DBforPostgreSQL.VirtualEndpoints.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.beginCreateAsync": "Microsoft.DBforPostgreSQL.VirtualEndpoints.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.beginDelete": "Microsoft.DBforPostgreSQL.VirtualEndpoints.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.beginDeleteAsync": "Microsoft.DBforPostgreSQL.VirtualEndpoints.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.beginUpdate": "Microsoft.DBforPostgreSQL.VirtualEndpoints.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.beginUpdateAsync": "Microsoft.DBforPostgreSQL.VirtualEndpoints.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.create": "Microsoft.DBforPostgreSQL.VirtualEndpoints.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.createAsync": "Microsoft.DBforPostgreSQL.VirtualEndpoints.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.createWithResponseAsync": "Microsoft.DBforPostgreSQL.VirtualEndpoints.create", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.delete": "Microsoft.DBforPostgreSQL.VirtualEndpoints.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.deleteAsync": "Microsoft.DBforPostgreSQL.VirtualEndpoints.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.deleteWithResponseAsync": "Microsoft.DBforPostgreSQL.VirtualEndpoints.delete", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.get": "Microsoft.DBforPostgreSQL.VirtualEndpoints.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.getAsync": "Microsoft.DBforPostgreSQL.VirtualEndpoints.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.getWithResponse": "Microsoft.DBforPostgreSQL.VirtualEndpoints.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.getWithResponseAsync": "Microsoft.DBforPostgreSQL.VirtualEndpoints.get", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.listByServer": "Microsoft.DBforPostgreSQL.VirtualEndpoints.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.listByServerAsync": "Microsoft.DBforPostgreSQL.VirtualEndpoints.listByServer", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.update": "Microsoft.DBforPostgreSQL.VirtualEndpoints.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.updateAsync": "Microsoft.DBforPostgreSQL.VirtualEndpoints.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.updateWithResponseAsync": "Microsoft.DBforPostgreSQL.VirtualEndpoints.update", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient": "Microsoft.DBforPostgreSQL", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient.list": "Microsoft.DBforPostgreSQL.VirtualNetworkSubnetUsageOperationGroup.list", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient.listAsync": "Microsoft.DBforPostgreSQL.VirtualNetworkSubnetUsageOperationGroup.list", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient.listWithResponse": "Microsoft.DBforPostgreSQL.VirtualNetworkSubnetUsageOperationGroup.list", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient.listWithResponseAsync": "Microsoft.DBforPostgreSQL.VirtualNetworkSubnetUsageOperationGroup.list", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntra", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraProperties": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntraProperties", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraPropertiesForAdd": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntraPropertiesForAdd", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner": "Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModel", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsProperties": "Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsProperties", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemand", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandProperties": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemandProperties", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner": "Microsoft.DBforPostgreSQL.BackupsLongTermRetentionOperation", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseInner": "Microsoft.DBforPostgreSQL.BackupsLongTermRetentionResponse", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseProperties": "Microsoft.DBforPostgreSQL.BackupsLongTermRetentionResponseProperties", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner": "Microsoft.DBforPostgreSQL.Capability", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner": "Microsoft.DBforPostgreSQL.CapturedLog", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogProperties": "Microsoft.DBforPostgreSQL.CapturedLogProperties", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationInner": "Microsoft.DBforPostgreSQL.Configuration", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationProperties": "Microsoft.DBforPostgreSQL.ConfigurationProperties", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.DatabaseInner": "Microsoft.DBforPostgreSQL.Database", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.DatabaseProperties": "Microsoft.DBforPostgreSQL.DatabaseProperties", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleInner": "Microsoft.DBforPostgreSQL.FirewallRule", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleProperties": "Microsoft.DBforPostgreSQL.FirewallRuleProperties", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrBackupOperationResponseProperties": "Microsoft.DBforPostgreSQL.LtrBackupOperationResponseProperties", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner": "Microsoft.DBforPostgreSQL.LtrPreBackupResponse", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrateNetworkStatusInner": "Microsoft.DBforPostgreSQL.MigrateNetworkStatus", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner": "Microsoft.DBforPostgreSQL.Migration", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner": "Microsoft.DBforPostgreSQL.MigrationNameAvailability", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationProperties": "Microsoft.DBforPostgreSQL.MigrationProperties", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationPropertiesForPatch": "Microsoft.DBforPostgreSQL.MigrationPropertiesForPatch", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner": "Microsoft.DBforPostgreSQL.NameAvailabilityModel", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner": "Microsoft.DBforPostgreSQL.ObjectRecommendation", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationProperties": "Microsoft.DBforPostgreSQL.ObjectRecommendationProperties", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.OperationInner": "Microsoft.DBforPostgreSQL.Operation", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner": "Microsoft.DBforPostgreSQL.PrivateEndpointConnection", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionProperties": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateLinkResourceInner": "Microsoft.DBforPostgreSQL.PrivateLinkResource", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateLinkResourceProperties": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.QuotaUsageInner": "Microsoft.DBforPostgreSQL.QuotaUsage", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerInner": "Microsoft.DBforPostgreSQL.Server", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerProperties": "Microsoft.DBforPostgreSQL.ServerProperties", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerPropertiesForPatch": "Microsoft.DBforPostgreSQL.ServerPropertiesForPatch", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner": "Microsoft.DBforPostgreSQL.TuningOptions", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner": "Microsoft.DBforPostgreSQL.VirtualEndpoint", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceProperties": "Microsoft.DBforPostgreSQL.VirtualEndpointResourceProperties", + "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner": "Microsoft.DBforPostgreSQL.VirtualNetworkSubnetUsageModel", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.PostgreSqlManagementClientBuilder": "Microsoft.DBforPostgreSQL", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.AdministratorMicrosoftEntraList": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntraList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.AdvancedThreatProtectionSettingsList": "Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.BackupAutomaticAndOnDemandList": "Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemandList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.CapabilityList": "Microsoft.DBforPostgreSQL.CapabilityList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.CapturedLogList": "Microsoft.DBforPostgreSQL.CapturedLogList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.ConfigurationList": "Microsoft.DBforPostgreSQL.ConfigurationList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.DatabaseList": "Microsoft.DBforPostgreSQL.DatabaseList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.FirewallRuleList": "Microsoft.DBforPostgreSQL.FirewallRuleList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.LtrServerBackupOperationList": "Microsoft.DBforPostgreSQL.LtrServerBackupOperationList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.MigrationList": "Microsoft.DBforPostgreSQL.MigrationList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.ObjectRecommendationList": "Microsoft.DBforPostgreSQL.ObjectRecommendationList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.OperationList": "Microsoft.DBforPostgreSQL.OperationList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.PrivateEndpointConnectionList": "Microsoft.DBforPostgreSQL.PrivateEndpointConnectionList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.PrivateLinkResourceList": "Microsoft.DBforPostgreSQL.PrivateLinkResourceList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.QuotaUsageList": "Microsoft.DBforPostgreSQL.QuotaUsageList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.ServerList": "Microsoft.DBforPostgreSQL.ServerList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.TuningOptionsList": "Microsoft.DBforPostgreSQL.TuningOptionsList", + "com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.VirtualEndpointsList": "Microsoft.DBforPostgreSQL.VirtualEndpointsList", + "com.azure.resourcemanager.postgresqlflexibleserver.models.AdminCredentials": "Microsoft.DBforPostgreSQL.AdminCredentials", + "com.azure.resourcemanager.postgresqlflexibleserver.models.AdminCredentialsForPatch": "Microsoft.DBforPostgreSQL.AdminCredentialsForPatch", + "com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraAdd": "Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntraAdd", + "com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig": "Microsoft.DBforPostgreSQL.AuthConfig", + "com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfigForPatch": "Microsoft.DBforPostgreSQL.AuthConfigForPatch", + "com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTier": "Microsoft.DBforPostgreSQL.AzureManagedDiskPerformanceTier", + "com.azure.resourcemanager.postgresqlflexibleserver.models.Backup": "Microsoft.DBforPostgreSQL.Backup", + "com.azure.resourcemanager.postgresqlflexibleserver.models.BackupForPatch": "Microsoft.DBforPostgreSQL.BackupForPatch", + "com.azure.resourcemanager.postgresqlflexibleserver.models.BackupRequestBase": "Microsoft.DBforPostgreSQL.BackupRequestBase", + "com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings": "Microsoft.DBforPostgreSQL.BackupSettings", + "com.azure.resourcemanager.postgresqlflexibleserver.models.BackupStoreDetails": "Microsoft.DBforPostgreSQL.BackupStoreDetails", + "com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType": "Microsoft.DBforPostgreSQL.BackupType", + "com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionRequest": "Microsoft.DBforPostgreSQL.BackupsLongTermRetentionRequest", + "com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionsCheckPrerequisitesHeaders": null, + "com.azure.resourcemanager.postgresqlflexibleserver.models.Cancel": "Microsoft.DBforPostgreSQL.Cancel", + "com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityBase": "Microsoft.DBforPostgreSQL.CapabilityBase", + "com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityStatus": "Microsoft.DBforPostgreSQL.CapabilityStatus", + "com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityReason": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityReason", + "com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityRequest", + "com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityResponse": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse", + "com.azure.resourcemanager.postgresqlflexibleserver.models.Cluster": "Microsoft.DBforPostgreSQL.Cluster", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationDataType": "Microsoft.DBforPostgreSQL.ConfigurationDataType", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationForUpdate": "Microsoft.DBforPostgreSQL.ConfigurationForUpdate", + "com.azure.resourcemanager.postgresqlflexibleserver.models.CreateMode": "Microsoft.DBforPostgreSQL.CreateMode", + "com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForPatch": "Microsoft.DBforPostgreSQL.CreateModeForPatch", + "com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption": "Microsoft.DBforPostgreSQL.DataEncryption", + "com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryptionType": "Microsoft.DBforPostgreSQL.DataEncryptionType", + "com.azure.resourcemanager.postgresqlflexibleserver.models.DatabaseMigrationState": "Microsoft.DBforPostgreSQL.DatabaseMigrationState", + "com.azure.resourcemanager.postgresqlflexibleserver.models.DbLevelValidationStatus": "Microsoft.DBforPostgreSQL.DbLevelValidationStatus", + "com.azure.resourcemanager.postgresqlflexibleserver.models.DbServerMetadata": "Microsoft.DBforPostgreSQL.DbServerMetadata", + "com.azure.resourcemanager.postgresqlflexibleserver.models.DelegatedSubnetUsage": "Microsoft.DBforPostgreSQL.DelegatedSubnetUsage", + "com.azure.resourcemanager.postgresqlflexibleserver.models.EncryptionKeyStatus": "Microsoft.DBforPostgreSQL.EncryptionKeyStatus", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ExecutionStatus": "Microsoft.DBforPostgreSQL.ExecutionStatus", + "com.azure.resourcemanager.postgresqlflexibleserver.models.FailoverMode": "Microsoft.DBforPostgreSQL.FailoverMode", + "com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningEditionCapability": "Microsoft.DBforPostgreSQL.FastProvisioningEditionCapability", + "com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningSupport": "Microsoft.DBforPostgreSQL.FastProvisioningSupport", + "com.azure.resourcemanager.postgresqlflexibleserver.models.FeatureStatus": "Microsoft.DBforPostgreSQL.FeatureStatus", + "com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackup": "Microsoft.DBforPostgreSQL.GeographicallyRedundantBackup", + "com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackupSupport": "Microsoft.DBforPostgreSQL.GeographicallyRedundantBackupSupport", + "com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability": "Microsoft.DBforPostgreSQL.HighAvailability", + "com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityForPatch": "Microsoft.DBforPostgreSQL.HighAvailabilityForPatch", + "com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode": "Microsoft.DBforPostgreSQL.HighAvailabilityMode", + "com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityState": "Microsoft.DBforPostgreSQL.HighAvailabilityState", + "com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType": "Microsoft.DBforPostgreSQL.IdentityType", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ImpactRecord": "Microsoft.DBforPostgreSQL.ImpactRecord", + "com.azure.resourcemanager.postgresqlflexibleserver.models.LocationRestricted": "Microsoft.DBforPostgreSQL.LocationRestricted", + "com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceServer": "Microsoft.DBforPostgreSQL.LogicalReplicationOnSourceServer", + "com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest": "Microsoft.DBforPostgreSQL.LtrPreBackupRequest", + "com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow": "Microsoft.DBforPostgreSQL.MaintenanceWindow", + "com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindowForPatch": "Microsoft.DBforPostgreSQL.MaintenanceWindowForPatch", + "com.azure.resourcemanager.postgresqlflexibleserver.models.MicrosoftEntraAuth": "Microsoft.DBforPostgreSQL.MicrosoftEntraAuth", + "com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesAndPermissions": "Microsoft.DBforPostgreSQL.MigrateRolesAndPermissions", + "com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationDatabaseState": "Microsoft.DBforPostgreSQL.MigrationDatabaseState", + "com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationListFilter": "Microsoft.DBforPostgreSQL.MigrationListFilter", + "com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationMode": "Microsoft.DBforPostgreSQL.MigrationMode", + "com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailabilityReason": "Microsoft.DBforPostgreSQL.MigrationNameAvailabilityReason", + "com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationOption": "Microsoft.DBforPostgreSQL.MigrationOption", + "com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResourceForPatch": "Microsoft.DBforPostgreSQL.MigrationResourceForPatch", + "com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParameters": "Microsoft.DBforPostgreSQL.MigrationSecretParameters", + "com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParametersForPatch": "Microsoft.DBforPostgreSQL.MigrationSecretParametersForPatch", + "com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationState": "Microsoft.DBforPostgreSQL.MigrationState", + "com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationStatus": "Microsoft.DBforPostgreSQL.MigrationStatus", + "com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSubstate": "Microsoft.DBforPostgreSQL.MigrationSubstate", + "com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSubstateDetails": "Microsoft.DBforPostgreSQL.MigrationSubstateDetails", + "com.azure.resourcemanager.postgresqlflexibleserver.models.NameProperty": "Microsoft.DBforPostgreSQL.NameProperty", + "com.azure.resourcemanager.postgresqlflexibleserver.models.Network": "Microsoft.DBforPostgreSQL.Network", + "com.azure.resourcemanager.postgresqlflexibleserver.models.NetworkMigrationState": "Microsoft.DBforPostgreSQL.NetworkMigrationState", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationDetails": "Microsoft.DBforPostgreSQL.ObjectRecommendationDetails", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesAnalyzedWorkload": "Microsoft.DBforPostgreSQL.ObjectRecommendationPropertiesAnalyzedWorkload", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesImplementationDetails": "Microsoft.DBforPostgreSQL.ObjectRecommendationPropertiesImplementationDetails", + "com.azure.resourcemanager.postgresqlflexibleserver.models.OnlineStorageResizeSupport": "Microsoft.DBforPostgreSQL.OnlineStorageResizeSupport", + "com.azure.resourcemanager.postgresqlflexibleserver.models.OperationDisplay": "Microsoft.DBforPostgreSQL.OperationDisplay", + "com.azure.resourcemanager.postgresqlflexibleserver.models.OperationOrigin": "Microsoft.DBforPostgreSQL.OperationOrigin", + "com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDatabasesOnTargetServer": "Microsoft.DBforPostgreSQL.OverwriteDatabasesOnTargetServer", + "com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordBasedAuth": "Microsoft.DBforPostgreSQL.PasswordBasedAuth", + "com.azure.resourcemanager.postgresqlflexibleserver.models.PostgreSqlFlexibleServerHighAvailabilityMode": "Microsoft.DBforPostgreSQL.PostgreSqlFlexibleServerHighAvailabilityMode", + "com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion": "Microsoft.DBforPostgreSQL.PostgresMajorVersion", + "com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType": "Microsoft.DBforPostgreSQL.PrincipalType", + "com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpoint": "Azure.ResourceManager.CommonTypes.PrivateEndpoint", + "com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionProvisioningState": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProvisioningState", + "com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointServiceConnectionStatus": "Azure.ResourceManager.CommonTypes.PrivateEndpointServiceConnectionStatus", + "com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ReadReplicaPromoteMode": "Microsoft.DBforPostgreSQL.ReadReplicaPromoteMode", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ReadReplicaPromoteOption": "Microsoft.DBforPostgreSQL.ReadReplicaPromoteOption", + "com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeEnum": "Microsoft.DBforPostgreSQL.RecommendationTypeEnum", + "com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeParameterEnum": "Microsoft.DBforPostgreSQL.RecommendationTypeParameterEnum", + "com.azure.resourcemanager.postgresqlflexibleserver.models.Replica": "Microsoft.DBforPostgreSQL.Replica", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationRole": "Microsoft.DBforPostgreSQL.ReplicationRole", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationState": "Microsoft.DBforPostgreSQL.ReplicationState", + "com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter": "Microsoft.DBforPostgreSQL.RestartParameter", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ServerEditionCapability": "Microsoft.DBforPostgreSQL.ServerEditionCapability", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForPatch": "Microsoft.DBforPostgreSQL.ServerForPatch", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ServerPublicNetworkAccessState": "Microsoft.DBforPostgreSQL.ServerPublicNetworkAccessState", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ServerSku": "Microsoft.DBforPostgreSQL.ServerSku", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ServerSkuCapability": "Microsoft.DBforPostgreSQL.ServerSkuCapability", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ServerState": "Microsoft.DBforPostgreSQL.ServerState", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersionCapability": "Microsoft.DBforPostgreSQL.ServerVersionCapability", + "com.azure.resourcemanager.postgresqlflexibleserver.models.Sku": "Microsoft.DBforPostgreSQL.Sku", + "com.azure.resourcemanager.postgresqlflexibleserver.models.SkuForPatch": "Microsoft.DBforPostgreSQL.SkuForPatch", + "com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier": "Microsoft.DBforPostgreSQL.SkuTier", + "com.azure.resourcemanager.postgresqlflexibleserver.models.SourceType": "Microsoft.DBforPostgreSQL.SourceType", + "com.azure.resourcemanager.postgresqlflexibleserver.models.SslMode": "Microsoft.DBforPostgreSQL.SslMode", + "com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigration": "Microsoft.DBforPostgreSQL.StartDataMigration", + "com.azure.resourcemanager.postgresqlflexibleserver.models.Storage": "Microsoft.DBforPostgreSQL.Storage", + "com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrow": "Microsoft.DBforPostgreSQL.StorageAutoGrow", + "com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrowthSupport": "Microsoft.DBforPostgreSQL.StorageAutoGrowthSupport", + "com.azure.resourcemanager.postgresqlflexibleserver.models.StorageEditionCapability": "Microsoft.DBforPostgreSQL.StorageEditionCapability", + "com.azure.resourcemanager.postgresqlflexibleserver.models.StorageMbCapability": "Microsoft.DBforPostgreSQL.StorageMbCapability", + "com.azure.resourcemanager.postgresqlflexibleserver.models.StorageTierCapability": "Microsoft.DBforPostgreSQL.StorageTierCapability", + "com.azure.resourcemanager.postgresqlflexibleserver.models.StorageType": "Microsoft.DBforPostgreSQL.StorageType", + "com.azure.resourcemanager.postgresqlflexibleserver.models.SupportedFeature": "Microsoft.DBforPostgreSQL.SupportedFeature", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName": "Microsoft.DBforPostgreSQL.ThreatProtectionName", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState": "Microsoft.DBforPostgreSQL.ThreatProtectionState", + "com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutover": "Microsoft.DBforPostgreSQL.TriggerCutover", + "com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum": "Microsoft.DBforPostgreSQL.TuningOptionParameterEnum", + "com.azure.resourcemanager.postgresqlflexibleserver.models.UserAssignedIdentity": "Microsoft.DBforPostgreSQL.UserAssignedIdentity", + "com.azure.resourcemanager.postgresqlflexibleserver.models.UserIdentity": "Microsoft.DBforPostgreSQL.UserIdentity", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationDetails": "Microsoft.DBforPostgreSQL.ValidationDetails", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage": "Microsoft.DBforPostgreSQL.ValidationMessage", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationState": "Microsoft.DBforPostgreSQL.ValidationState", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationSummaryItem": "Microsoft.DBforPostgreSQL.ValidationSummaryItem", + "com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResourceForPatch": "Microsoft.DBforPostgreSQL.VirtualEndpointResourceForPatch", + "com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType": "Microsoft.DBforPostgreSQL.VirtualEndpointType", + "com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter": "Microsoft.DBforPostgreSQL.VirtualNetworkSubnetUsageParameter", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport": "Microsoft.DBforPostgreSQL.ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport", + "com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHighAvailabilitySupport": "Microsoft.DBforPostgreSQL.ZoneRedundantHighAvailabilitySupport" + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/resources/META-INF/azure-resourcemanager-postgresqlflexibleserver_metadata.json b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/resources/META-INF/azure-resourcemanager-postgresqlflexibleserver_metadata.json new file mode 100644 index 000000000000..30e859421232 --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/resources/META-INF/azure-resourcemanager-postgresqlflexibleserver_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersion":"2026-01-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient":"Microsoft.DBforPostgreSQL","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.beginCreateOrUpdate":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.beginCreateOrUpdateAsync":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.beginDelete":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.beginDeleteAsync":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.createOrUpdate":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.createOrUpdateAsync":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.createOrUpdateWithResponseAsync":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.delete":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.deleteAsync":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.deleteWithResponseAsync":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.get":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.getAsync":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.getWithResponse":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.getWithResponseAsync":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.listByServer":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdministratorsMicrosoftEntrasClient.listByServerAsync":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntras.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient":"Microsoft.DBforPostgreSQL","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient.get":"Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient.getAsync":"Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient.getWithResponse":"Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient.getWithResponseAsync":"Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient.listByServer":"Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient.listByServerAsync":"Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient":"Microsoft.DBforPostgreSQL","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.beginCreate":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.beginCreateAsync":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.beginDelete":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.beginDeleteAsync":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.create":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.createAsync":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.createWithResponseAsync":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.delete":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.deleteAsync":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.deleteWithResponseAsync":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.get":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.getAsync":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.getWithResponse":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.getWithResponseAsync":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.listByServer":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsAutomaticAndOnDemandsClient.listByServerAsync":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemands.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient":"Microsoft.DBforPostgreSQL","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.beginStart":"Microsoft.DBforPostgreSQL.Servers.start","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.beginStartAsync":"Microsoft.DBforPostgreSQL.Servers.start","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.checkPrerequisites":"Microsoft.DBforPostgreSQL.Servers.checkPrerequisites","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.checkPrerequisitesAsync":"Microsoft.DBforPostgreSQL.Servers.checkPrerequisites","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.checkPrerequisitesWithResponse":"Microsoft.DBforPostgreSQL.Servers.checkPrerequisites","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.checkPrerequisitesWithResponseAsync":"Microsoft.DBforPostgreSQL.Servers.checkPrerequisites","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.get":"Microsoft.DBforPostgreSQL.BackupsLongTermRetentionOperations.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.getAsync":"Microsoft.DBforPostgreSQL.BackupsLongTermRetentionOperations.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.getWithResponse":"Microsoft.DBforPostgreSQL.BackupsLongTermRetentionOperations.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.getWithResponseAsync":"Microsoft.DBforPostgreSQL.BackupsLongTermRetentionOperations.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.listByServer":"Microsoft.DBforPostgreSQL.BackupsLongTermRetentionOperations.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.listByServerAsync":"Microsoft.DBforPostgreSQL.BackupsLongTermRetentionOperations.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.start":"Microsoft.DBforPostgreSQL.Servers.start","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.startAsync":"Microsoft.DBforPostgreSQL.Servers.start","com.azure.resourcemanager.postgresqlflexibleserver.fluent.BackupsLongTermRetentionsClient.startWithResponseAsync":"Microsoft.DBforPostgreSQL.Servers.start","com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByLocationsClient":"Microsoft.DBforPostgreSQL","com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByLocationsClient.list":"Microsoft.DBforPostgreSQL.CapabilitiesByLocationOperationGroup.list","com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByLocationsClient.listAsync":"Microsoft.DBforPostgreSQL.CapabilitiesByLocationOperationGroup.list","com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByServersClient":"Microsoft.DBforPostgreSQL","com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByServersClient.list":"Microsoft.DBforPostgreSQL.Servers.list","com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapabilitiesByServersClient.listAsync":"Microsoft.DBforPostgreSQL.Servers.list","com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapturedLogsClient":"Microsoft.DBforPostgreSQL","com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapturedLogsClient.listByServer":"Microsoft.DBforPostgreSQL.Servers.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.CapturedLogsClient.listByServerAsync":"Microsoft.DBforPostgreSQL.Servers.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient":"Microsoft.DBforPostgreSQL.Configurations","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.beginPut":"Microsoft.DBforPostgreSQL.Configurations.put","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.beginPutAsync":"Microsoft.DBforPostgreSQL.Configurations.put","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.beginUpdate":"Microsoft.DBforPostgreSQL.Configurations.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.beginUpdateAsync":"Microsoft.DBforPostgreSQL.Configurations.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.get":"Microsoft.DBforPostgreSQL.Configurations.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.getAsync":"Microsoft.DBforPostgreSQL.Configurations.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.getWithResponse":"Microsoft.DBforPostgreSQL.Configurations.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.getWithResponseAsync":"Microsoft.DBforPostgreSQL.Configurations.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.listByServer":"Microsoft.DBforPostgreSQL.Configurations.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.listByServerAsync":"Microsoft.DBforPostgreSQL.Configurations.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.put":"Microsoft.DBforPostgreSQL.Configurations.put","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.putAsync":"Microsoft.DBforPostgreSQL.Configurations.put","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.putWithResponseAsync":"Microsoft.DBforPostgreSQL.Configurations.put","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.update":"Microsoft.DBforPostgreSQL.Configurations.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.updateAsync":"Microsoft.DBforPostgreSQL.Configurations.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ConfigurationsClient.updateWithResponseAsync":"Microsoft.DBforPostgreSQL.Configurations.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient":"Microsoft.DBforPostgreSQL.Databases","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.beginCreate":"Microsoft.DBforPostgreSQL.Databases.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.beginCreateAsync":"Microsoft.DBforPostgreSQL.Databases.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.beginDelete":"Microsoft.DBforPostgreSQL.Databases.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.beginDeleteAsync":"Microsoft.DBforPostgreSQL.Databases.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.create":"Microsoft.DBforPostgreSQL.Databases.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.createAsync":"Microsoft.DBforPostgreSQL.Databases.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.createWithResponseAsync":"Microsoft.DBforPostgreSQL.Databases.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.delete":"Microsoft.DBforPostgreSQL.Databases.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.deleteAsync":"Microsoft.DBforPostgreSQL.Databases.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.deleteWithResponseAsync":"Microsoft.DBforPostgreSQL.Databases.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.get":"Microsoft.DBforPostgreSQL.Databases.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.getAsync":"Microsoft.DBforPostgreSQL.Databases.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.getWithResponse":"Microsoft.DBforPostgreSQL.Databases.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.getWithResponseAsync":"Microsoft.DBforPostgreSQL.Databases.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.listByServer":"Microsoft.DBforPostgreSQL.Databases.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.DatabasesClient.listByServerAsync":"Microsoft.DBforPostgreSQL.Databases.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient":"Microsoft.DBforPostgreSQL.FirewallRules","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.beginCreateOrUpdate":"Microsoft.DBforPostgreSQL.FirewallRules.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.beginCreateOrUpdateAsync":"Microsoft.DBforPostgreSQL.FirewallRules.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.beginDelete":"Microsoft.DBforPostgreSQL.FirewallRules.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.beginDeleteAsync":"Microsoft.DBforPostgreSQL.FirewallRules.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.createOrUpdate":"Microsoft.DBforPostgreSQL.FirewallRules.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.createOrUpdateAsync":"Microsoft.DBforPostgreSQL.FirewallRules.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.createOrUpdateWithResponseAsync":"Microsoft.DBforPostgreSQL.FirewallRules.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.delete":"Microsoft.DBforPostgreSQL.FirewallRules.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.deleteAsync":"Microsoft.DBforPostgreSQL.FirewallRules.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.deleteWithResponseAsync":"Microsoft.DBforPostgreSQL.FirewallRules.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.get":"Microsoft.DBforPostgreSQL.FirewallRules.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.getAsync":"Microsoft.DBforPostgreSQL.FirewallRules.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.getWithResponse":"Microsoft.DBforPostgreSQL.FirewallRules.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.getWithResponseAsync":"Microsoft.DBforPostgreSQL.FirewallRules.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.listByServer":"Microsoft.DBforPostgreSQL.FirewallRules.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.FirewallRulesClient.listByServerAsync":"Microsoft.DBforPostgreSQL.FirewallRules.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient":"Microsoft.DBforPostgreSQL.Migrations","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.cancel":"Microsoft.DBforPostgreSQL.Migrations.cancel","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.cancelAsync":"Microsoft.DBforPostgreSQL.Migrations.cancel","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.cancelWithResponse":"Microsoft.DBforPostgreSQL.Migrations.cancel","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.cancelWithResponseAsync":"Microsoft.DBforPostgreSQL.Migrations.cancel","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.checkNameAvailability":"Microsoft.DBforPostgreSQL.Servers.checkNameAvailability","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.checkNameAvailabilityAsync":"Microsoft.DBforPostgreSQL.Servers.checkNameAvailability","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.checkNameAvailabilityWithResponse":"Microsoft.DBforPostgreSQL.Servers.checkNameAvailability","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.checkNameAvailabilityWithResponseAsync":"Microsoft.DBforPostgreSQL.Servers.checkNameAvailability","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.create":"Microsoft.DBforPostgreSQL.Migrations.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.createAsync":"Microsoft.DBforPostgreSQL.Migrations.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.createWithResponse":"Microsoft.DBforPostgreSQL.Migrations.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.createWithResponseAsync":"Microsoft.DBforPostgreSQL.Migrations.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.get":"Microsoft.DBforPostgreSQL.Migrations.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.getAsync":"Microsoft.DBforPostgreSQL.Migrations.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.getWithResponse":"Microsoft.DBforPostgreSQL.Migrations.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.getWithResponseAsync":"Microsoft.DBforPostgreSQL.Migrations.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.listByTargetServer":"Microsoft.DBforPostgreSQL.Migrations.listByTargetServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.listByTargetServerAsync":"Microsoft.DBforPostgreSQL.Migrations.listByTargetServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.update":"Microsoft.DBforPostgreSQL.Migrations.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.updateAsync":"Microsoft.DBforPostgreSQL.Migrations.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.updateWithResponse":"Microsoft.DBforPostgreSQL.Migrations.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.MigrationsClient.updateWithResponseAsync":"Microsoft.DBforPostgreSQL.Migrations.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient":"Microsoft.DBforPostgreSQL","com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient.checkGlobally":"Microsoft.DBforPostgreSQL.NameAvailabilityOperationGroup.checkGlobally","com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient.checkGloballyAsync":"Microsoft.DBforPostgreSQL.NameAvailabilityOperationGroup.checkGlobally","com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient.checkGloballyWithResponse":"Microsoft.DBforPostgreSQL.NameAvailabilityOperationGroup.checkGlobally","com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient.checkGloballyWithResponseAsync":"Microsoft.DBforPostgreSQL.NameAvailabilityOperationGroup.checkGlobally","com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient.checkWithLocation":"Microsoft.DBforPostgreSQL.NameAvailabilityOperationGroup.checkWithLocation","com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient.checkWithLocationAsync":"Microsoft.DBforPostgreSQL.NameAvailabilityOperationGroup.checkWithLocation","com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient.checkWithLocationWithResponse":"Microsoft.DBforPostgreSQL.NameAvailabilityOperationGroup.checkWithLocation","com.azure.resourcemanager.postgresqlflexibleserver.fluent.NameAvailabilitiesClient.checkWithLocationWithResponseAsync":"Microsoft.DBforPostgreSQL.NameAvailabilityOperationGroup.checkWithLocation","com.azure.resourcemanager.postgresqlflexibleserver.fluent.OperationsClient":"Microsoft.DBforPostgreSQL.Operations","com.azure.resourcemanager.postgresqlflexibleserver.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.postgresqlflexibleserver.fluent.OperationsClient.listAsync":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PostgreSqlManagementClient":"Microsoft.DBforPostgreSQL","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient":"Microsoft.DBforPostgreSQL","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient.get":"Microsoft.DBforPostgreSQL.PrivateDnsZoneSuffixOperationGroup.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient.getAsync":"Microsoft.DBforPostgreSQL.PrivateDnsZoneSuffixOperationGroup.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient.getWithResponse":"Microsoft.DBforPostgreSQL.PrivateDnsZoneSuffixOperationGroup.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateDnsZoneSuffixesClient.getWithResponseAsync":"Microsoft.DBforPostgreSQL.PrivateDnsZoneSuffixOperationGroup.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.beginDelete":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.beginDeleteAsync":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.beginUpdate":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.beginUpdateAsync":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.delete":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.deleteAsync":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.deleteWithResponseAsync":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.get":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.getAsync":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.getWithResponse":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.getWithResponseAsync":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.listByServer":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.listByServerAsync":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.update":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.updateAsync":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateEndpointConnectionsClient.updateWithResponseAsync":"Microsoft.DBforPostgreSQL.PrivateEndpointConnections.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient":"Microsoft.DBforPostgreSQL.PrivateLinkResources","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient.get":"Microsoft.DBforPostgreSQL.PrivateLinkResources.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient.getAsync":"Microsoft.DBforPostgreSQL.PrivateLinkResources.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient.getWithResponse":"Microsoft.DBforPostgreSQL.PrivateLinkResources.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient.getWithResponseAsync":"Microsoft.DBforPostgreSQL.PrivateLinkResources.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient.listByServer":"Microsoft.DBforPostgreSQL.PrivateLinkResources.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.PrivateLinkResourcesClient.listByServerAsync":"Microsoft.DBforPostgreSQL.PrivateLinkResources.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.QuotaUsagesClient":"Microsoft.DBforPostgreSQL","com.azure.resourcemanager.postgresqlflexibleserver.fluent.QuotaUsagesClient.list":"Microsoft.DBforPostgreSQL.QuotaUsagesOperationGroup.list","com.azure.resourcemanager.postgresqlflexibleserver.fluent.QuotaUsagesClient.listAsync":"Microsoft.DBforPostgreSQL.QuotaUsagesOperationGroup.list","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ReplicasClient":"Microsoft.DBforPostgreSQL","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ReplicasClient.listByServer":"Microsoft.DBforPostgreSQL.Servers.replicasListByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ReplicasClient.listByServerAsync":"Microsoft.DBforPostgreSQL.Servers.replicasListByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient":"Microsoft.DBforPostgreSQL","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient.beginCreateOrUpdate":"Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient.beginCreateOrUpdateAsync":"Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient.createOrUpdate":"Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient.createOrUpdateAsync":"Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServerThreatProtectionSettingsClient.createOrUpdateWithResponseAsync":"Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModels.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient":"Microsoft.DBforPostgreSQL.Servers","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginCreateOrUpdate":"Microsoft.DBforPostgreSQL.Servers.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginCreateOrUpdateAsync":"Microsoft.DBforPostgreSQL.Servers.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginDelete":"Microsoft.DBforPostgreSQL.Servers.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginDeleteAsync":"Microsoft.DBforPostgreSQL.Servers.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginMigrateNetworkMode":"Microsoft.DBforPostgreSQL.Servers.migrateNetworkMode","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginMigrateNetworkModeAsync":"Microsoft.DBforPostgreSQL.Servers.migrateNetworkMode","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginRestart":"Microsoft.DBforPostgreSQL.Servers.restart","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginRestartAsync":"Microsoft.DBforPostgreSQL.Servers.restart","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginStart":"Microsoft.DBforPostgreSQL.Servers.serversStart","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginStartAsync":"Microsoft.DBforPostgreSQL.Servers.serversStart","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginStop":"Microsoft.DBforPostgreSQL.Servers.stop","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginStopAsync":"Microsoft.DBforPostgreSQL.Servers.stop","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginUpdate":"Microsoft.DBforPostgreSQL.Servers.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.beginUpdateAsync":"Microsoft.DBforPostgreSQL.Servers.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.createOrUpdate":"Microsoft.DBforPostgreSQL.Servers.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.createOrUpdateAsync":"Microsoft.DBforPostgreSQL.Servers.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.createOrUpdateWithResponseAsync":"Microsoft.DBforPostgreSQL.Servers.createOrUpdate","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.delete":"Microsoft.DBforPostgreSQL.Servers.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.deleteAsync":"Microsoft.DBforPostgreSQL.Servers.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.deleteWithResponseAsync":"Microsoft.DBforPostgreSQL.Servers.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.getByResourceGroup":"Microsoft.DBforPostgreSQL.Servers.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.getByResourceGroupAsync":"Microsoft.DBforPostgreSQL.Servers.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.getByResourceGroupWithResponse":"Microsoft.DBforPostgreSQL.Servers.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.getByResourceGroupWithResponseAsync":"Microsoft.DBforPostgreSQL.Servers.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.list":"Microsoft.DBforPostgreSQL.Servers.listBySubscription","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.listAsync":"Microsoft.DBforPostgreSQL.Servers.listBySubscription","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.listByResourceGroup":"Microsoft.DBforPostgreSQL.Servers.listByResourceGroup","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.listByResourceGroupAsync":"Microsoft.DBforPostgreSQL.Servers.listByResourceGroup","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.migrateNetworkMode":"Microsoft.DBforPostgreSQL.Servers.migrateNetworkMode","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.migrateNetworkModeAsync":"Microsoft.DBforPostgreSQL.Servers.migrateNetworkMode","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.migrateNetworkModeWithResponseAsync":"Microsoft.DBforPostgreSQL.Servers.migrateNetworkMode","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.restart":"Microsoft.DBforPostgreSQL.Servers.restart","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.restartAsync":"Microsoft.DBforPostgreSQL.Servers.restart","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.restartWithResponseAsync":"Microsoft.DBforPostgreSQL.Servers.restart","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.start":"Microsoft.DBforPostgreSQL.Servers.serversStart","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.startAsync":"Microsoft.DBforPostgreSQL.Servers.serversStart","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.startWithResponseAsync":"Microsoft.DBforPostgreSQL.Servers.serversStart","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.stop":"Microsoft.DBforPostgreSQL.Servers.stop","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.stopAsync":"Microsoft.DBforPostgreSQL.Servers.stop","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.stopWithResponseAsync":"Microsoft.DBforPostgreSQL.Servers.stop","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.update":"Microsoft.DBforPostgreSQL.Servers.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.updateAsync":"Microsoft.DBforPostgreSQL.Servers.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.ServersClient.updateWithResponseAsync":"Microsoft.DBforPostgreSQL.Servers.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient":"Microsoft.DBforPostgreSQL","com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient.get":"Microsoft.DBforPostgreSQL.TuningOptionsOperationGroup.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient.getAsync":"Microsoft.DBforPostgreSQL.TuningOptionsOperationGroup.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient.getWithResponse":"Microsoft.DBforPostgreSQL.TuningOptionsOperationGroup.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient.getWithResponseAsync":"Microsoft.DBforPostgreSQL.TuningOptionsOperationGroup.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient.listByServer":"Microsoft.DBforPostgreSQL.TuningOptionsOperationGroup.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient.listByServerAsync":"Microsoft.DBforPostgreSQL.TuningOptionsOperationGroup.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient.listRecommendations":"Microsoft.DBforPostgreSQL.TuningOptionsOperationGroup.listRecommendations","com.azure.resourcemanager.postgresqlflexibleserver.fluent.TuningOptionsOperationsClient.listRecommendationsAsync":"Microsoft.DBforPostgreSQL.TuningOptionsOperationGroup.listRecommendations","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient":"Microsoft.DBforPostgreSQL.VirtualEndpoints","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.beginCreate":"Microsoft.DBforPostgreSQL.VirtualEndpoints.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.beginCreateAsync":"Microsoft.DBforPostgreSQL.VirtualEndpoints.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.beginDelete":"Microsoft.DBforPostgreSQL.VirtualEndpoints.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.beginDeleteAsync":"Microsoft.DBforPostgreSQL.VirtualEndpoints.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.beginUpdate":"Microsoft.DBforPostgreSQL.VirtualEndpoints.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.beginUpdateAsync":"Microsoft.DBforPostgreSQL.VirtualEndpoints.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.create":"Microsoft.DBforPostgreSQL.VirtualEndpoints.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.createAsync":"Microsoft.DBforPostgreSQL.VirtualEndpoints.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.createWithResponseAsync":"Microsoft.DBforPostgreSQL.VirtualEndpoints.create","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.delete":"Microsoft.DBforPostgreSQL.VirtualEndpoints.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.deleteAsync":"Microsoft.DBforPostgreSQL.VirtualEndpoints.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.deleteWithResponseAsync":"Microsoft.DBforPostgreSQL.VirtualEndpoints.delete","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.get":"Microsoft.DBforPostgreSQL.VirtualEndpoints.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.getAsync":"Microsoft.DBforPostgreSQL.VirtualEndpoints.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.getWithResponse":"Microsoft.DBforPostgreSQL.VirtualEndpoints.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.getWithResponseAsync":"Microsoft.DBforPostgreSQL.VirtualEndpoints.get","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.listByServer":"Microsoft.DBforPostgreSQL.VirtualEndpoints.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.listByServerAsync":"Microsoft.DBforPostgreSQL.VirtualEndpoints.listByServer","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.update":"Microsoft.DBforPostgreSQL.VirtualEndpoints.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.updateAsync":"Microsoft.DBforPostgreSQL.VirtualEndpoints.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualEndpointsClient.updateWithResponseAsync":"Microsoft.DBforPostgreSQL.VirtualEndpoints.update","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient":"Microsoft.DBforPostgreSQL","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient.list":"Microsoft.DBforPostgreSQL.VirtualNetworkSubnetUsageOperationGroup.list","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient.listAsync":"Microsoft.DBforPostgreSQL.VirtualNetworkSubnetUsageOperationGroup.list","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient.listWithResponse":"Microsoft.DBforPostgreSQL.VirtualNetworkSubnetUsageOperationGroup.list","com.azure.resourcemanager.postgresqlflexibleserver.fluent.VirtualNetworkSubnetUsagesClient.listWithResponseAsync":"Microsoft.DBforPostgreSQL.VirtualNetworkSubnetUsageOperationGroup.list","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntra","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraProperties":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntraProperties","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraPropertiesForAdd":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntraPropertiesForAdd","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsModelInner":"Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsModel","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdvancedThreatProtectionSettingsProperties":"Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsProperties","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemand","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandProperties":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemandProperties","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionOperationInner":"Microsoft.DBforPostgreSQL.BackupsLongTermRetentionOperation","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseInner":"Microsoft.DBforPostgreSQL.BackupsLongTermRetentionResponse","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupsLongTermRetentionResponseProperties":"Microsoft.DBforPostgreSQL.BackupsLongTermRetentionResponseProperties","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapabilityInner":"Microsoft.DBforPostgreSQL.Capability","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner":"Microsoft.DBforPostgreSQL.CapturedLog","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogProperties":"Microsoft.DBforPostgreSQL.CapturedLogProperties","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationInner":"Microsoft.DBforPostgreSQL.Configuration","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationProperties":"Microsoft.DBforPostgreSQL.ConfigurationProperties","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.DatabaseInner":"Microsoft.DBforPostgreSQL.Database","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.DatabaseProperties":"Microsoft.DBforPostgreSQL.DatabaseProperties","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleInner":"Microsoft.DBforPostgreSQL.FirewallRule","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleProperties":"Microsoft.DBforPostgreSQL.FirewallRuleProperties","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrBackupOperationResponseProperties":"Microsoft.DBforPostgreSQL.LtrBackupOperationResponseProperties","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.LtrPreBackupResponseInner":"Microsoft.DBforPostgreSQL.LtrPreBackupResponse","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrateNetworkStatusInner":"Microsoft.DBforPostgreSQL.MigrateNetworkStatus","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationInner":"Microsoft.DBforPostgreSQL.Migration","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationNameAvailabilityInner":"Microsoft.DBforPostgreSQL.MigrationNameAvailability","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationProperties":"Microsoft.DBforPostgreSQL.MigrationProperties","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrationPropertiesForPatch":"Microsoft.DBforPostgreSQL.MigrationPropertiesForPatch","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.NameAvailabilityModelInner":"Microsoft.DBforPostgreSQL.NameAvailabilityModel","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner":"Microsoft.DBforPostgreSQL.ObjectRecommendation","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationProperties":"Microsoft.DBforPostgreSQL.ObjectRecommendationProperties","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.OperationInner":"Microsoft.DBforPostgreSQL.Operation","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner":"Microsoft.DBforPostgreSQL.PrivateEndpointConnection","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionProperties":"Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateLinkResourceInner":"Microsoft.DBforPostgreSQL.PrivateLinkResource","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateLinkResourceProperties":"Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.QuotaUsageInner":"Microsoft.DBforPostgreSQL.QuotaUsage","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerInner":"Microsoft.DBforPostgreSQL.Server","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerProperties":"Microsoft.DBforPostgreSQL.ServerProperties","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ServerPropertiesForPatch":"Microsoft.DBforPostgreSQL.ServerPropertiesForPatch","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner":"Microsoft.DBforPostgreSQL.TuningOptions","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner":"Microsoft.DBforPostgreSQL.VirtualEndpoint","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointResourceProperties":"Microsoft.DBforPostgreSQL.VirtualEndpointResourceProperties","com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageModelInner":"Microsoft.DBforPostgreSQL.VirtualNetworkSubnetUsageModel","com.azure.resourcemanager.postgresqlflexibleserver.implementation.PostgreSqlManagementClientBuilder":"Microsoft.DBforPostgreSQL","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.AdministratorMicrosoftEntraList":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntraList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.AdvancedThreatProtectionSettingsList":"Microsoft.DBforPostgreSQL.AdvancedThreatProtectionSettingsList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.BackupAutomaticAndOnDemandList":"Microsoft.DBforPostgreSQL.BackupAutomaticAndOnDemandList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.CapabilityList":"Microsoft.DBforPostgreSQL.CapabilityList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.CapturedLogList":"Microsoft.DBforPostgreSQL.CapturedLogList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.ConfigurationList":"Microsoft.DBforPostgreSQL.ConfigurationList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.DatabaseList":"Microsoft.DBforPostgreSQL.DatabaseList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.FirewallRuleList":"Microsoft.DBforPostgreSQL.FirewallRuleList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.LtrServerBackupOperationList":"Microsoft.DBforPostgreSQL.LtrServerBackupOperationList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.MigrationList":"Microsoft.DBforPostgreSQL.MigrationList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.ObjectRecommendationList":"Microsoft.DBforPostgreSQL.ObjectRecommendationList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.OperationList":"Microsoft.DBforPostgreSQL.OperationList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.PrivateEndpointConnectionList":"Microsoft.DBforPostgreSQL.PrivateEndpointConnectionList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.PrivateLinkResourceList":"Microsoft.DBforPostgreSQL.PrivateLinkResourceList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.QuotaUsageList":"Microsoft.DBforPostgreSQL.QuotaUsageList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.ServerList":"Microsoft.DBforPostgreSQL.ServerList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.TuningOptionsList":"Microsoft.DBforPostgreSQL.TuningOptionsList","com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.VirtualEndpointsList":"Microsoft.DBforPostgreSQL.VirtualEndpointsList","com.azure.resourcemanager.postgresqlflexibleserver.models.AdminCredentials":"Microsoft.DBforPostgreSQL.AdminCredentials","com.azure.resourcemanager.postgresqlflexibleserver.models.AdminCredentialsForPatch":"Microsoft.DBforPostgreSQL.AdminCredentialsForPatch","com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraAdd":"Microsoft.DBforPostgreSQL.AdministratorMicrosoftEntraAdd","com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfig":"Microsoft.DBforPostgreSQL.AuthConfig","com.azure.resourcemanager.postgresqlflexibleserver.models.AuthConfigForPatch":"Microsoft.DBforPostgreSQL.AuthConfigForPatch","com.azure.resourcemanager.postgresqlflexibleserver.models.AzureManagedDiskPerformanceTier":"Microsoft.DBforPostgreSQL.AzureManagedDiskPerformanceTier","com.azure.resourcemanager.postgresqlflexibleserver.models.Backup":"Microsoft.DBforPostgreSQL.Backup","com.azure.resourcemanager.postgresqlflexibleserver.models.BackupForPatch":"Microsoft.DBforPostgreSQL.BackupForPatch","com.azure.resourcemanager.postgresqlflexibleserver.models.BackupRequestBase":"Microsoft.DBforPostgreSQL.BackupRequestBase","com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings":"Microsoft.DBforPostgreSQL.BackupSettings","com.azure.resourcemanager.postgresqlflexibleserver.models.BackupStoreDetails":"Microsoft.DBforPostgreSQL.BackupStoreDetails","com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType":"Microsoft.DBforPostgreSQL.BackupType","com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionRequest":"Microsoft.DBforPostgreSQL.BackupsLongTermRetentionRequest","com.azure.resourcemanager.postgresqlflexibleserver.models.BackupsLongTermRetentionsCheckPrerequisitesHeaders":null,"com.azure.resourcemanager.postgresqlflexibleserver.models.Cancel":"Microsoft.DBforPostgreSQL.Cancel","com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityBase":"Microsoft.DBforPostgreSQL.CapabilityBase","com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityStatus":"Microsoft.DBforPostgreSQL.CapabilityStatus","com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityReason":"Azure.ResourceManager.CommonTypes.CheckNameAvailabilityReason","com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityRequest":"Azure.ResourceManager.CommonTypes.CheckNameAvailabilityRequest","com.azure.resourcemanager.postgresqlflexibleserver.models.CheckNameAvailabilityResponse":"Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse","com.azure.resourcemanager.postgresqlflexibleserver.models.Cluster":"Microsoft.DBforPostgreSQL.Cluster","com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationDataType":"Microsoft.DBforPostgreSQL.ConfigurationDataType","com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationForUpdate":"Microsoft.DBforPostgreSQL.ConfigurationForUpdate","com.azure.resourcemanager.postgresqlflexibleserver.models.CreateMode":"Microsoft.DBforPostgreSQL.CreateMode","com.azure.resourcemanager.postgresqlflexibleserver.models.CreateModeForPatch":"Microsoft.DBforPostgreSQL.CreateModeForPatch","com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryption":"Microsoft.DBforPostgreSQL.DataEncryption","com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryptionType":"Microsoft.DBforPostgreSQL.DataEncryptionType","com.azure.resourcemanager.postgresqlflexibleserver.models.DatabaseMigrationState":"Microsoft.DBforPostgreSQL.DatabaseMigrationState","com.azure.resourcemanager.postgresqlflexibleserver.models.DbLevelValidationStatus":"Microsoft.DBforPostgreSQL.DbLevelValidationStatus","com.azure.resourcemanager.postgresqlflexibleserver.models.DbServerMetadata":"Microsoft.DBforPostgreSQL.DbServerMetadata","com.azure.resourcemanager.postgresqlflexibleserver.models.DelegatedSubnetUsage":"Microsoft.DBforPostgreSQL.DelegatedSubnetUsage","com.azure.resourcemanager.postgresqlflexibleserver.models.EncryptionKeyStatus":"Microsoft.DBforPostgreSQL.EncryptionKeyStatus","com.azure.resourcemanager.postgresqlflexibleserver.models.ExecutionStatus":"Microsoft.DBforPostgreSQL.ExecutionStatus","com.azure.resourcemanager.postgresqlflexibleserver.models.FailoverMode":"Microsoft.DBforPostgreSQL.FailoverMode","com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningEditionCapability":"Microsoft.DBforPostgreSQL.FastProvisioningEditionCapability","com.azure.resourcemanager.postgresqlflexibleserver.models.FastProvisioningSupport":"Microsoft.DBforPostgreSQL.FastProvisioningSupport","com.azure.resourcemanager.postgresqlflexibleserver.models.FeatureStatus":"Microsoft.DBforPostgreSQL.FeatureStatus","com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackup":"Microsoft.DBforPostgreSQL.GeographicallyRedundantBackup","com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackupSupport":"Microsoft.DBforPostgreSQL.GeographicallyRedundantBackupSupport","com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability":"Microsoft.DBforPostgreSQL.HighAvailability","com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityForPatch":"Microsoft.DBforPostgreSQL.HighAvailabilityForPatch","com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode":"Microsoft.DBforPostgreSQL.HighAvailabilityMode","com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityState":"Microsoft.DBforPostgreSQL.HighAvailabilityState","com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType":"Microsoft.DBforPostgreSQL.IdentityType","com.azure.resourcemanager.postgresqlflexibleserver.models.ImpactRecord":"Microsoft.DBforPostgreSQL.ImpactRecord","com.azure.resourcemanager.postgresqlflexibleserver.models.LocationRestricted":"Microsoft.DBforPostgreSQL.LocationRestricted","com.azure.resourcemanager.postgresqlflexibleserver.models.LogicalReplicationOnSourceServer":"Microsoft.DBforPostgreSQL.LogicalReplicationOnSourceServer","com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest":"Microsoft.DBforPostgreSQL.LtrPreBackupRequest","com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindow":"Microsoft.DBforPostgreSQL.MaintenanceWindow","com.azure.resourcemanager.postgresqlflexibleserver.models.MaintenanceWindowForPatch":"Microsoft.DBforPostgreSQL.MaintenanceWindowForPatch","com.azure.resourcemanager.postgresqlflexibleserver.models.MicrosoftEntraAuth":"Microsoft.DBforPostgreSQL.MicrosoftEntraAuth","com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateRolesAndPermissions":"Microsoft.DBforPostgreSQL.MigrateRolesAndPermissions","com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationDatabaseState":"Microsoft.DBforPostgreSQL.MigrationDatabaseState","com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationListFilter":"Microsoft.DBforPostgreSQL.MigrationListFilter","com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationMode":"Microsoft.DBforPostgreSQL.MigrationMode","com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationNameAvailabilityReason":"Microsoft.DBforPostgreSQL.MigrationNameAvailabilityReason","com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationOption":"Microsoft.DBforPostgreSQL.MigrationOption","com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationResourceForPatch":"Microsoft.DBforPostgreSQL.MigrationResourceForPatch","com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParameters":"Microsoft.DBforPostgreSQL.MigrationSecretParameters","com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParametersForPatch":"Microsoft.DBforPostgreSQL.MigrationSecretParametersForPatch","com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationState":"Microsoft.DBforPostgreSQL.MigrationState","com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationStatus":"Microsoft.DBforPostgreSQL.MigrationStatus","com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSubstate":"Microsoft.DBforPostgreSQL.MigrationSubstate","com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSubstateDetails":"Microsoft.DBforPostgreSQL.MigrationSubstateDetails","com.azure.resourcemanager.postgresqlflexibleserver.models.NameProperty":"Microsoft.DBforPostgreSQL.NameProperty","com.azure.resourcemanager.postgresqlflexibleserver.models.Network":"Microsoft.DBforPostgreSQL.Network","com.azure.resourcemanager.postgresqlflexibleserver.models.NetworkMigrationState":"Microsoft.DBforPostgreSQL.NetworkMigrationState","com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationDetails":"Microsoft.DBforPostgreSQL.ObjectRecommendationDetails","com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesAnalyzedWorkload":"Microsoft.DBforPostgreSQL.ObjectRecommendationPropertiesAnalyzedWorkload","com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesImplementationDetails":"Microsoft.DBforPostgreSQL.ObjectRecommendationPropertiesImplementationDetails","com.azure.resourcemanager.postgresqlflexibleserver.models.OnlineStorageResizeSupport":"Microsoft.DBforPostgreSQL.OnlineStorageResizeSupport","com.azure.resourcemanager.postgresqlflexibleserver.models.OperationDisplay":"Microsoft.DBforPostgreSQL.OperationDisplay","com.azure.resourcemanager.postgresqlflexibleserver.models.OperationOrigin":"Microsoft.DBforPostgreSQL.OperationOrigin","com.azure.resourcemanager.postgresqlflexibleserver.models.OverwriteDatabasesOnTargetServer":"Microsoft.DBforPostgreSQL.OverwriteDatabasesOnTargetServer","com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordBasedAuth":"Microsoft.DBforPostgreSQL.PasswordBasedAuth","com.azure.resourcemanager.postgresqlflexibleserver.models.PostgreSqlFlexibleServerHighAvailabilityMode":"Microsoft.DBforPostgreSQL.PostgreSqlFlexibleServerHighAvailabilityMode","com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion":"Microsoft.DBforPostgreSQL.PostgresMajorVersion","com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType":"Microsoft.DBforPostgreSQL.PrincipalType","com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpoint":"Azure.ResourceManager.CommonTypes.PrivateEndpoint","com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionProvisioningState":"Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProvisioningState","com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointServiceConnectionStatus":"Azure.ResourceManager.CommonTypes.PrivateEndpointServiceConnectionStatus","com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState":"Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState","com.azure.resourcemanager.postgresqlflexibleserver.models.ReadReplicaPromoteMode":"Microsoft.DBforPostgreSQL.ReadReplicaPromoteMode","com.azure.resourcemanager.postgresqlflexibleserver.models.ReadReplicaPromoteOption":"Microsoft.DBforPostgreSQL.ReadReplicaPromoteOption","com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeEnum":"Microsoft.DBforPostgreSQL.RecommendationTypeEnum","com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeParameterEnum":"Microsoft.DBforPostgreSQL.RecommendationTypeParameterEnum","com.azure.resourcemanager.postgresqlflexibleserver.models.Replica":"Microsoft.DBforPostgreSQL.Replica","com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationRole":"Microsoft.DBforPostgreSQL.ReplicationRole","com.azure.resourcemanager.postgresqlflexibleserver.models.ReplicationState":"Microsoft.DBforPostgreSQL.ReplicationState","com.azure.resourcemanager.postgresqlflexibleserver.models.RestartParameter":"Microsoft.DBforPostgreSQL.RestartParameter","com.azure.resourcemanager.postgresqlflexibleserver.models.ServerEditionCapability":"Microsoft.DBforPostgreSQL.ServerEditionCapability","com.azure.resourcemanager.postgresqlflexibleserver.models.ServerForPatch":"Microsoft.DBforPostgreSQL.ServerForPatch","com.azure.resourcemanager.postgresqlflexibleserver.models.ServerPublicNetworkAccessState":"Microsoft.DBforPostgreSQL.ServerPublicNetworkAccessState","com.azure.resourcemanager.postgresqlflexibleserver.models.ServerSku":"Microsoft.DBforPostgreSQL.ServerSku","com.azure.resourcemanager.postgresqlflexibleserver.models.ServerSkuCapability":"Microsoft.DBforPostgreSQL.ServerSkuCapability","com.azure.resourcemanager.postgresqlflexibleserver.models.ServerState":"Microsoft.DBforPostgreSQL.ServerState","com.azure.resourcemanager.postgresqlflexibleserver.models.ServerVersionCapability":"Microsoft.DBforPostgreSQL.ServerVersionCapability","com.azure.resourcemanager.postgresqlflexibleserver.models.Sku":"Microsoft.DBforPostgreSQL.Sku","com.azure.resourcemanager.postgresqlflexibleserver.models.SkuForPatch":"Microsoft.DBforPostgreSQL.SkuForPatch","com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier":"Microsoft.DBforPostgreSQL.SkuTier","com.azure.resourcemanager.postgresqlflexibleserver.models.SourceType":"Microsoft.DBforPostgreSQL.SourceType","com.azure.resourcemanager.postgresqlflexibleserver.models.SslMode":"Microsoft.DBforPostgreSQL.SslMode","com.azure.resourcemanager.postgresqlflexibleserver.models.StartDataMigration":"Microsoft.DBforPostgreSQL.StartDataMigration","com.azure.resourcemanager.postgresqlflexibleserver.models.Storage":"Microsoft.DBforPostgreSQL.Storage","com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrow":"Microsoft.DBforPostgreSQL.StorageAutoGrow","com.azure.resourcemanager.postgresqlflexibleserver.models.StorageAutoGrowthSupport":"Microsoft.DBforPostgreSQL.StorageAutoGrowthSupport","com.azure.resourcemanager.postgresqlflexibleserver.models.StorageEditionCapability":"Microsoft.DBforPostgreSQL.StorageEditionCapability","com.azure.resourcemanager.postgresqlflexibleserver.models.StorageMbCapability":"Microsoft.DBforPostgreSQL.StorageMbCapability","com.azure.resourcemanager.postgresqlflexibleserver.models.StorageTierCapability":"Microsoft.DBforPostgreSQL.StorageTierCapability","com.azure.resourcemanager.postgresqlflexibleserver.models.StorageType":"Microsoft.DBforPostgreSQL.StorageType","com.azure.resourcemanager.postgresqlflexibleserver.models.SupportedFeature":"Microsoft.DBforPostgreSQL.SupportedFeature","com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName":"Microsoft.DBforPostgreSQL.ThreatProtectionName","com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState":"Microsoft.DBforPostgreSQL.ThreatProtectionState","com.azure.resourcemanager.postgresqlflexibleserver.models.TriggerCutover":"Microsoft.DBforPostgreSQL.TriggerCutover","com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionParameterEnum":"Microsoft.DBforPostgreSQL.TuningOptionParameterEnum","com.azure.resourcemanager.postgresqlflexibleserver.models.UserAssignedIdentity":"Microsoft.DBforPostgreSQL.UserAssignedIdentity","com.azure.resourcemanager.postgresqlflexibleserver.models.UserIdentity":"Microsoft.DBforPostgreSQL.UserIdentity","com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationDetails":"Microsoft.DBforPostgreSQL.ValidationDetails","com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage":"Microsoft.DBforPostgreSQL.ValidationMessage","com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationState":"Microsoft.DBforPostgreSQL.ValidationState","com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationSummaryItem":"Microsoft.DBforPostgreSQL.ValidationSummaryItem","com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointResourceForPatch":"Microsoft.DBforPostgreSQL.VirtualEndpointResourceForPatch","com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType":"Microsoft.DBforPostgreSQL.VirtualEndpointType","com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageParameter":"Microsoft.DBforPostgreSQL.VirtualNetworkSubnetUsageParameter","com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport":"Microsoft.DBforPostgreSQL.ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport","com.azure.resourcemanager.postgresqlflexibleserver.models.ZoneRedundantHighAvailabilitySupport":"Microsoft.DBforPostgreSQL.ZoneRedundantHighAvailabilitySupport"},"generatedFiles":["src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/PostgreSqlManager.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdministratorsMicrosoftEntrasClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/AdvancedThreatProtectionSettingsClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsAutomaticAndOnDemandsClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/BackupsLongTermRetentionsClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByLocationsClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapabilitiesByServersClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/CapturedLogsClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/DatabasesClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/FirewallRulesClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/MigrationsClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/NameAvailabilitiesClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PostgreSqlManagementClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateDnsZoneSuffixesClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/QuotaUsagesClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ReplicasClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServerThreatProtectionSettingsClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ServersClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/TuningOptionsOperationsClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualEndpointsClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/VirtualNetworkSubnetUsagesClient.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraProperties.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdministratorMicrosoftEntraPropertiesForAdd.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsModelInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/AdvancedThreatProtectionSettingsProperties.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupAutomaticAndOnDemandProperties.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionOperationInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/BackupsLongTermRetentionResponseProperties.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapabilityInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/CapturedLogProperties.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ConfigurationProperties.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/DatabaseProperties.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/FirewallRuleProperties.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrBackupOperationResponseProperties.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/LtrPreBackupResponseInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrateNetworkStatusInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationNameAvailabilityInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationProperties.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/MigrationPropertiesForPatch.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/NameAvailabilityModelInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ObjectRecommendationProperties.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/QuotaUsageInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerProperties.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/ServerPropertiesForPatch.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/TuningOptionsInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageModelInner.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/package-info.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorMicrosoftEntraImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdministratorsMicrosoftEntrasImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/AdvancedThreatProtectionSettingsModelImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupAutomaticAndOnDemandImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsAutomaticAndOnDemandsImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionOperationImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionResponseImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/BackupsLongTermRetentionsImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByLocationsImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilitiesByServersImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapabilityImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/CapturedLogsImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabaseImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/DatabasesImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRuleImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/FirewallRulesImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/LtrPreBackupResponseImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrateNetworkStatusImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationNameAvailabilityImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/MigrationsImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilitiesImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/NameAvailabilityModelImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ObjectRecommendationImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PostgreSqlManagementClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateDnsZoneSuffixesImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateEndpointConnectionsImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourceImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/PrivateLinkResourcesImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsageImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsagesClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/QuotaUsagesImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ReplicasImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServerThreatProtectionSettingsImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/ServersImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/TuningOptionsOperationsImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualEndpointsImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsageModelImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesClientImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/VirtualNetworkSubnetUsagesImpl.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/AdministratorMicrosoftEntraList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/AdvancedThreatProtectionSettingsList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/BackupAutomaticAndOnDemandList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/CapabilityList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/CapturedLogList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/ConfigurationList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/DatabaseList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/FirewallRuleList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/LtrServerBackupOperationList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/MigrationList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/ObjectRecommendationList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/OperationList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/PrivateEndpointConnectionList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/PrivateLinkResourceList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/QuotaUsageList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/ServerList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/TuningOptionsList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/models/VirtualEndpointsList.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/implementation/package-info.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentials.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdminCredentialsForPatch.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntra.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorMicrosoftEntraAdd.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdministratorsMicrosoftEntras.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettings.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AdvancedThreatProtectionSettingsModel.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfig.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AuthConfigForPatch.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/AzureManagedDiskPerformanceTier.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Backup.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupAutomaticAndOnDemand.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupForPatch.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupRequestBase.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupSettings.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupStoreDetails.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupType.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsAutomaticAndOnDemands.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionOperation.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionRequest.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionResponse.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentions.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesHeaders.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/BackupsLongTermRetentionsCheckPrerequisitesResponse.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cancel.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByLocations.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilitiesByServers.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Capability.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityBase.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapabilityStatus.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLog.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CapturedLogs.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityReason.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CheckNameAvailabilityResponse.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Cluster.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configuration.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationDataType.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ConfigurationForUpdate.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Configurations.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateMode.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/CreateModeForPatch.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryption.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DataEncryptionType.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Database.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DatabaseMigrationState.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Databases.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbLevelValidationStatus.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DbServerMetadata.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/DelegatedSubnetUsage.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/EncryptionKeyStatus.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ExecutionStatus.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FailoverMode.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningEditionCapability.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FastProvisioningSupport.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FeatureStatus.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRule.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/FirewallRules.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackup.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/GeographicallyRedundantBackupSupport.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailability.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityForPatch.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityMode.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/HighAvailabilityState.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/IdentityType.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ImpactRecord.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LocationRestricted.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LogicalReplicationOnSourceServer.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrPreBackupRequest.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/LtrPreBackupResponse.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindow.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MaintenanceWindowForPatch.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MicrosoftEntraAuth.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateNetworkStatus.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrateRolesAndPermissions.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migration.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationDatabaseState.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationListFilter.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationMode.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailability.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationNameAvailabilityReason.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationOption.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationResourceForPatch.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParameters.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSecretParametersForPatch.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationState.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationStatus.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubstate.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/MigrationSubstateDetails.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Migrations.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilities.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameAvailabilityModel.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NameProperty.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Network.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/NetworkMigrationState.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendation.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationDetails.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesAnalyzedWorkload.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ObjectRecommendationPropertiesImplementationDetails.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OnlineStorageResizeSupport.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operation.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OperationOrigin.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Operations.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/OverwriteDatabasesOnTargetServer.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PasswordBasedAuth.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgreSqlFlexibleServerHighAvailabilityMode.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PostgresMajorVersion.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrincipalType.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateDnsZoneSuffixes.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointConnections.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkResources.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsage.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/QuotaUsages.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteMode.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReadReplicaPromoteOption.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeEnum.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RecommendationTypeParameterEnum.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replica.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Replicas.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationRole.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ReplicationState.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/RestartParameter.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Server.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerEditionCapability.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerForPatch.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerPublicNetworkAccessState.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSku.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerSkuCapability.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerState.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerThreatProtectionSettings.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ServerVersionCapability.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Servers.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Sku.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuForPatch.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SkuTier.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SourceType.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SslMode.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StartDataMigration.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/Storage.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrow.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageAutoGrowthSupport.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageEditionCapability.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageMbCapability.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageTierCapability.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/StorageType.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/SupportedFeature.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ThreatProtectionName.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ThreatProtectionState.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TriggerCutover.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionParameterEnum.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptions.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/TuningOptionsOperations.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/UserIdentity.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationDetails.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationMessage.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationState.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ValidationSummaryItem.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoint.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointResourceForPatch.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpointType.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualEndpoints.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageModel.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsageParameter.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/VirtualNetworkSubnetUsages.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilityAndGeographicallyRedundantBackupSupport.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/ZoneRedundantHighAvailabilitySupport.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/models/package-info.java","src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraCreateOrUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraCreateOrUpdateSamples.java index 6b8b765b74bc..4ac3cb789c64 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraCreateOrUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,9 +11,7 @@ */ public final class AdministratorsMicrosoftEntraCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * AdministratorsMicrosoftEntraAdd.json + * x-ms-original-file: 2026-01-01-preview/AdministratorsMicrosoftEntraAdd.json */ /** * Sample code: Add a server administrator associated to a Microsoft Entra principal. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraDeleteSamples.java index 6544d969ec34..76627ce9f357 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class AdministratorsMicrosoftEntraDeleteSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * AdministratorsMicrosoftEntraDelete.json + * x-ms-original-file: 2026-01-01-preview/AdministratorsMicrosoftEntraDelete.json */ /** * Sample code: Delete a server administrator associated to a Microsoft Entra principal. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraGetSamples.java index 0c59c058f589..e602fb6e8d77 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class AdministratorsMicrosoftEntraGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * AdministratorsMicrosoftEntraGet.json + * x-ms-original-file: 2026-01-01-preview/AdministratorsMicrosoftEntraGet.json */ /** * Sample code: Get information about a server administrator associated to a Microsoft Entra principal. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraListByServerSamples.java index d4eb4fcc22f9..05d8b105b180 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntraListByServerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class AdministratorsMicrosoftEntraListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * AdministratorsMicrosoftEntraListByServer.json + * x-ms-original-file: 2026-01-01-preview/AdministratorsMicrosoftEntraListByServer.json */ /** * Sample code: List information about all server administrators associated to Microsoft Entra principals. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetSamples.java index dac7d747c178..8beffbc7a9fc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,9 +11,7 @@ */ public final class AdvancedThreatProtectionSettingsGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * AdvancedThreatProtectionSettingsGet.json + * x-ms-original-file: 2026-01-01-preview/AdvancedThreatProtectionSettingsGet.json */ /** * Sample code: Get state of advanced threat protection settings for a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerSamples.java index 05251efe6118..d87f1255237b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class AdvancedThreatProtectionSettingsListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * AdvancedThreatProtectionSettingsListByServer.json + * x-ms-original-file: 2026-01-01-preview/AdvancedThreatProtectionSettingsListByServer.json */ /** * Sample code: List state of advanced threat protection settings for a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandCreateSamples.java index a4600bab59b2..7b73923630f0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandCreateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class BackupsAutomaticAndOnDemandCreateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * BackupsAutomaticAndOnDemandCreate.json + * x-ms-original-file: 2026-01-01-preview/BackupsAutomaticAndOnDemandCreate.json */ /** * Sample code: Create an on demand backup of a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandDeleteSamples.java index 7360f2d62277..7c038872299f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class BackupsAutomaticAndOnDemandDeleteSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * BackupsAutomaticAndOnDemandDelete.json + * x-ms-original-file: 2026-01-01-preview/BackupsAutomaticAndOnDemandDelete.json */ /** * Sample code: Delete an on demand backup, given its name. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandGetSamples.java index 7ddf221053f9..faaf75936b92 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class BackupsAutomaticAndOnDemandGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * BackupsAutomaticAndOnDemandGet.json + * x-ms-original-file: 2026-01-01-preview/BackupsAutomaticAndOnDemandGet.json */ /** * Sample code: Get an on demand backup, given its name. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandListByServerSamples.java index 3d0880157955..c761d2950fae 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandListByServerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class BackupsAutomaticAndOnDemandListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * BackupsAutomaticAndOnDemandListByServer.json + * x-ms-original-file: 2026-01-01-preview/BackupsAutomaticAndOnDemandListByServer.json */ /** * Sample code: List all available backups of a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionCheckPrerequisitesSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionCheckPrerequisitesSamples.java index 9d9c5113cebf..46915e2e9ed1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionCheckPrerequisitesSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionCheckPrerequisitesSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,9 +12,7 @@ */ public final class BackupsLongTermRetentionCheckPrerequisitesSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * BackupsLongTermRetentionCheckPrerequisites.json + * x-ms-original-file: 2026-01-01-preview/BackupsLongTermRetentionCheckPrerequisites.json */ /** * Sample code: Perform all checks required for a long term retention backup operation to succeed. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionGetSamples.java index 2c53f4c4b5ee..92209fdeeeff 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class BackupsLongTermRetentionGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * BackupsLongTermRetentionGet.json + * x-ms-original-file: 2026-01-01-preview/BackupsLongTermRetentionGet.json */ /** * Sample code: Get the results of a long retention backup operation for a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionListByServerSamples.java index 74d93de9e121..051d17cc5dd3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionListByServerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class BackupsLongTermRetentionListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * BackupsLongTermRetentionListByServer.json + * x-ms-original-file: 2026-01-01-preview/BackupsLongTermRetentionListByServer.json */ /** * Sample code: List the results of the long term retention backup operations for a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionStartSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionStartSamples.java index 9d0c6ab9ab1b..14ca3d683f7b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionStartSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionStartSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -14,9 +14,7 @@ */ public final class BackupsLongTermRetentionStartSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * BackupsLongTermRetentionStart.json + * x-ms-original-file: 2026-01-01-preview/BackupsLongTermRetentionStart.json */ /** * Sample code: Initiate a long term retention backup. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationListSamples.java index 2be7ee86c9ea..b117d97697cf 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationListSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class CapabilitiesByLocationListSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * CapabilitiesByLocationList.json + * x-ms-original-file: 2026-01-01-preview/CapabilitiesByLocationList.json */ /** * Sample code: List the capabilities available in a given location for a specific subscription. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServerListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServerListSamples.java index e863118ce555..a420e554ae65 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServerListSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServerListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class CapabilitiesByServerListSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * CapabilitiesByServerList.json + * x-ms-original-file: 2026-01-01-preview/CapabilitiesByServerList.json */ /** * Sample code: List the capabilities available for a given server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerSamples.java index 96eb7dda0e4b..d05ab4d1f033 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class CapturedLogsListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * CapturedLogsListByServer.json + * x-ms-original-file: 2026-01-01-preview/CapturedLogsListByServer.json */ /** * Sample code: List all captured logs for download in a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetSamples.java index 7bb881bdac61..559989e50f93 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class ConfigurationsGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ConfigurationsGet. - * json + * x-ms-original-file: 2026-01-01-preview/ConfigurationsGet.json */ /** * Sample code: Get information about a specific configuration (also known as server parameter) of a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerSamples.java index 9a2356cb2c07..4d4154374902 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class ConfigurationsListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ConfigurationsListByServer.json + * x-ms-original-file: 2026-01-01-preview/ConfigurationsListByServer.json */ /** * Sample code: List all configurations (also known as server parameters) of a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutSamples.java index 9466687d8135..db95bb65e214 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class ConfigurationsPutSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ConfigurationsUpdateUsingPut.json + * x-ms-original-file: 2026-01-01-preview/ConfigurationsUpdateUsingPut.json */ /** * Sample code: Update, using Put verb, the value assigned to a specific modifiable configuration (also known as diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsUpdateSamples.java index c75988cff7a3..5c8df82edaa8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,9 +11,7 @@ */ public final class ConfigurationsUpdateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ConfigurationsUpdate.json + * x-ms-original-file: 2026-01-01-preview/ConfigurationsUpdate.json */ /** * Sample code: Update the value assigned to a specific modifiable configuration (also known as server parameter) of diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateSamples.java index 054e0a36a2e7..31818f819158 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class DatabasesCreateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesCreate. - * json + * x-ms-original-file: 2026-01-01-preview/DatabasesCreate.json */ /** * Sample code: Create a database. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteSamples.java index 6a36d90fc658..ab7995b19b46 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class DatabasesDeleteSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesDelete. - * json + * x-ms-original-file: 2026-01-01-preview/DatabasesDelete.json */ /** * Sample code: Delete an existing database. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetSamples.java index f2b8ec1d1e9f..75372d8ac140 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,8 +9,7 @@ */ public final class DatabasesGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/DatabasesGet.json + * x-ms-original-file: 2026-01-01-preview/DatabasesGet.json */ /** * Sample code: Get information about an existing database. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerSamples.java index d7f2436ea5c7..86c27d9c51aa 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class DatabasesListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * DatabasesListByServer.json + * x-ms-original-file: 2026-01-01-preview/DatabasesListByServer.json */ /** * Sample code: List all databases in a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateSamples.java index 9d48148ab60f..6f9cd17e9f39 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class FirewallRulesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * FirewallRulesCreateOrUpdate.json + * x-ms-original-file: 2026-01-01-preview/FirewallRulesCreateOrUpdate.json */ /** * Sample code: Create a new firewall rule or update an existing firewall rule. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteSamples.java index d336fdfa0846..53fea4737a22 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class FirewallRulesDeleteSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * FirewallRulesDelete.json + * x-ms-original-file: 2026-01-01-preview/FirewallRulesDelete.json */ /** * Sample code: Delete an existing firewall rule. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetSamples.java index b611392bcafe..343792be0dec 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class FirewallRulesGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/FirewallRulesGet. - * json + * x-ms-original-file: 2026-01-01-preview/FirewallRulesGet.json */ /** * Sample code: Get information about a firewall rule in a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerSamples.java index 514d36ebe14b..c1fd0ac0c44a 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class FirewallRulesListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * FirewallRulesListByServer.json + * x-ms-original-file: 2026-01-01-preview/FirewallRulesListByServer.json */ /** * Sample code: List information about all firewall rules in a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCancelSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCancelSamples.java index 39ae8ac0aca5..7cc082925047 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCancelSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCancelSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class MigrationsCancelSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsCancel. - * json + * x-ms-original-file: 2026-01-01-preview/MigrationsCancel.json */ /** * Sample code: Cancel an active migration. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilitySamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilitySamples.java index 2e6e0169c251..2abb56c887ff 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilitySamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilitySamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,9 +11,7 @@ */ public final class MigrationsCheckNameAvailabilitySamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsCheckNameAvailability.json + * x-ms-original-file: 2026-01-01-preview/MigrationsCheckNameAvailability.json */ /** * Sample code: Check the validity and availability of the given name, to assign it to a new migration. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCreateSamples.java index d4c73c668391..0efe21028827 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCreateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -19,9 +19,7 @@ */ public final class MigrationsCreateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsCreateWithOtherUsers.json + * x-ms-original-file: 2026-01-01-preview/MigrationsCreateWithOtherUsers.json */ /** * Sample code: Create a migration specifying user names. @@ -48,9 +46,7 @@ public static void createAMigrationSpecifyingUserNames( } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsCreateOtherSourceTypesValidateMigrate.json + * x-ms-original-file: 2026-01-01-preview/MigrationsCreateOtherSourceTypesValidateMigrate.json */ /** * Sample code: Create a migration with other source type for validating and migrating. @@ -78,9 +74,7 @@ public static void createAMigrationWithOtherSourceTypeForValidatingAndMigrating( } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsCreateWithPrivateEndpointServers.json + * x-ms-original-file: 2026-01-01-preview/MigrationsCreateWithPrivateEndpointServers.json */ /** * Sample code: Create a migration with private endpoint. @@ -108,9 +102,7 @@ public static void createAMigrationWithPrivateEndpoint( } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsCreate. - * json + * x-ms-original-file: 2026-01-01-preview/MigrationsCreate.json */ /** * Sample code: Create a migration. @@ -135,9 +127,7 @@ public static void createAMigration(com.azure.resourcemanager.postgresqlflexible } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsCreateWithRoles.json + * x-ms-original-file: 2026-01-01-preview/MigrationsCreateWithRoles.json */ /** * Sample code: Create a migration with roles. @@ -164,9 +154,7 @@ public static void createAMigration(com.azure.resourcemanager.postgresqlflexible } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsCreateWithFullyQualifiedDomainName.json + * x-ms-original-file: 2026-01-01-preview/MigrationsCreateWithFullyQualifiedDomainName.json */ /** * Sample code: Create a migration with fully qualified domain names for source and target servers. @@ -194,9 +182,7 @@ public static void createAMigrationWithFullyQualifiedDomainNamesForSourceAndTarg } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsCreateValidateOnly.json + * x-ms-original-file: 2026-01-01-preview/MigrationsCreateValidateOnly.json */ /** * Sample code: Create a migration for validating only. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsGetSamples.java index b030aa579d2c..c525e2db45ae 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class MigrationsGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsGetMigrationWithSuccessfulValidationOnly.json + * x-ms-original-file: 2026-01-01-preview/MigrationsGetMigrationWithSuccessfulValidationOnly.json */ /** * Sample code: Get information about a migration with successful validation only. @@ -26,9 +24,7 @@ public static void getInformationAboutAMigrationWithSuccessfulValidationOnly( } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsGetMigrationWithSuccessfulValidationAndMigration.json + * x-ms-original-file: 2026-01-01-preview/MigrationsGetMigrationWithSuccessfulValidationAndMigration.json */ /** * Sample code: Get information about a migration with successful validation and successful migration. @@ -43,9 +39,7 @@ public static void getInformationAboutAMigrationWithSuccessfulValidationAndSucce } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsGetMigrationWithSuccessfulValidationButMigrationFailure.json + * x-ms-original-file: 2026-01-01-preview/MigrationsGetMigrationWithSuccessfulValidationButMigrationFailure.json */ /** * Sample code: Get information about a migration with successful validation but failed migration. @@ -60,9 +54,7 @@ public static void getInformationAboutAMigrationWithSuccessfulValidationButFaile } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsGetMigrationWithValidationFailures.json + * x-ms-original-file: 2026-01-01-preview/MigrationsGetMigrationWithValidationFailures.json */ /** * Sample code: Get information about a migration with validation failures. @@ -77,8 +69,7 @@ public static void getInformationAboutAMigrationWithValidationFailures( } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsGet.json + * x-ms-original-file: 2026-01-01-preview/MigrationsGet.json */ /** * Sample code: Get information about a migration. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsListByTargetServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsListByTargetServerSamples.java index becd7ce3531e..1d94f6e68816 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsListByTargetServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsListByTargetServerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,9 +11,7 @@ */ public final class MigrationsListByTargetServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * MigrationsListByTargetServer.json + * x-ms-original-file: 2026-01-01-preview/MigrationsListByTargetServer.json */ /** * Sample code: List all migrations of a target flexible server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsUpdateSamples.java index bc56196e44ca..5284dcac08fd 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,9 +12,7 @@ */ public final class MigrationsUpdateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/MigrationsUpdate. - * json + * x-ms-original-file: 2026-01-01-preview/MigrationsUpdate.json */ /** * Sample code: Update an existing migration. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckGloballySamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckGloballySamples.java index a727ee61a817..db4456c3d89e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckGloballySamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckGloballySamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,9 +11,7 @@ */ public final class NameAvailabilityCheckGloballySamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * NameAvailabilityCheckGlobally.json + * x-ms-original-file: 2026-01-01-preview/NameAvailabilityCheckGlobally.json */ /** * Sample code: Check the validity and availability of the given name, to assign it to a new server or to use it as diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckWithLocationSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckWithLocationSamples.java index 0a461b63149b..0a827dd4d874 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckWithLocationSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityCheckWithLocationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,9 +11,7 @@ */ public final class NameAvailabilityCheckWithLocationSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * NameAvailabilityCheckWithLocation.json + * x-ms-original-file: 2026-01-01-preview/NameAvailabilityCheckWithLocation.json */ /** * Sample code: Check the validity and availability of the given name, in the given location, to assign it to a new diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListSamples.java index ed926e36d4b0..c5251a32a6fe 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/OperationsList. - * json + * x-ms-original-file: 2026-01-01-preview/OperationsList.json */ /** * Sample code: List all available REST API operations. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixGetSamples.java index 70b453043d90..61515b0f8614 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class PrivateDnsZoneSuffixGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * PrivateDnsZoneSuffixGet.json + * x-ms-original-file: 2026-01-01-preview/PrivateDnsZoneSuffixGet.json */ /** * Sample code: Get the private DNS suffix. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsDeleteSamples.java index a2d54858b036..d181a41a7e6e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * PrivateEndpointConnectionsDelete.json + * x-ms-original-file: 2026-01-01-preview/PrivateEndpointConnectionsDelete.json */ /** * Sample code: Delete a private endpoint connection. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetSamples.java index bb26636d82af..55f6337f9847 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * PrivateEndpointConnectionsGet.json + * x-ms-original-file: 2026-01-01-preview/PrivateEndpointConnectionsGet.json */ /** * Sample code: Get a private endpoint connection. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerSamples.java index 44338ecc7ae7..ac1ca3edf8c3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class PrivateEndpointConnectionsListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * PrivateEndpointConnectionsList.json + * x-ms-original-file: 2026-01-01-preview/PrivateEndpointConnectionsList.json */ /** * Sample code: List all private endpoint connections on a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateSamples.java index f49499e80907..c8a94910965d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,9 +13,7 @@ */ public final class PrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * PrivateEndpointConnectionsUpdate.json + * x-ms-original-file: 2026-01-01-preview/PrivateEndpointConnectionsUpdate.json */ /** * Sample code: Approve or reject a private endpoint connection. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetSamples.java index 06b363803049..b75178e26c97 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * PrivateLinkResourcesGet.json + * x-ms-original-file: 2026-01-01-preview/PrivateLinkResourcesGet.json */ /** * Sample code: Gets a private link resource for PostgreSQL. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerSamples.java index 09df133a3368..6b3180c16de9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class PrivateLinkResourcesListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * PrivateLinkResourcesList.json + * x-ms-original-file: 2026-01-01-preview/PrivateLinkResourcesList.json */ /** * Sample code: Gets private link resources for PostgreSQL. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListSamples.java index 160a52278faf..434ebcbc3313 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class QuotaUsagesListSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * QuotaUsagesForFlexibleServers.json + * x-ms-original-file: 2026-01-01-preview/QuotaUsagesForFlexibleServers.json */ /** * Sample code: List of quota usages for servers. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicasListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicasListByServerSamples.java index ccd67ee28ee5..fce68f274133 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicasListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicasListByServerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class ReplicasListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ReplicasListByServer.json + * x-ms-original-file: 2026-01-01-preview/ReplicasListByServer.json */ /** * Sample code: List all read replicas of a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateOrUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateOrUpdateSamples.java index 54da2b76e959..4c4903f58ce9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateOrUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,11 +13,11 @@ import com.azure.resourcemanager.postgresqlflexibleserver.models.DataEncryptionType; import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackup; import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode; import com.azure.resourcemanager.postgresqlflexibleserver.models.IdentityType; import com.azure.resourcemanager.postgresqlflexibleserver.models.MicrosoftEntraAuth; import com.azure.resourcemanager.postgresqlflexibleserver.models.Network; import com.azure.resourcemanager.postgresqlflexibleserver.models.PasswordBasedAuth; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgreSqlFlexibleServerHighAvailabilityMode; import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgresMajorVersion; import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerPublicNetworkAccessState; import com.azure.resourcemanager.postgresqlflexibleserver.models.Sku; @@ -35,9 +35,7 @@ */ public final class ServersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateReviveDropped.json + * x-ms-original-file: 2026-01-01-preview/ServersCreateReviveDropped.json */ /** * Sample code: Create a new server using a backup of a server that was deleted or dropped recently. @@ -59,8 +57,7 @@ public static void createANewServerUsingABackupOfAServerThatWasDeletedOrDroppedR /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateInMicrosoftOwnedVirtualNetworkWithZoneRedundantHighAvailability.json + * 2026-01-01-preview/ServersCreateInMicrosoftOwnedVirtualNetworkWithZoneRedundantHighAvailability.json */ /** * Sample code: Create a new server in Microsoft owned virtual network with zone redundant high availability. @@ -84,16 +81,15 @@ public static void createANewServerInMicrosoftOwnedVirtualNetworkWithZoneRedunda .withBackup( new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.ENABLED)) .withNetwork(new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.ENABLED)) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) + .withHighAvailability( + new HighAvailability().withMode(PostgreSqlFlexibleServerHighAvailabilityMode.ZONE_REDUNDANT)) .withAvailabilityZone("1") .withCreateMode(CreateMode.CREATE) .create(); } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateGeoRestoreWithDataEncryptionEnabledAutoUpdate.json + * x-ms-original-file: 2026-01-01-preview/ServersCreateGeoRestoreWithDataEncryptionEnabledAutoUpdate.json */ /** * Sample code: Create a new server using a restore of a geographically redundant backup of an existing server, with @@ -128,9 +124,7 @@ public static void createANewServerInMicrosoftOwnedVirtualNetworkWithZoneRedunda } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateWithDataEncryptionEnabled.json + * x-ms-original-file: 2026-01-01-preview/ServersCreateWithDataEncryptionEnabled.json */ /** * Sample code: Create a new server with data encryption based on customer managed key. @@ -165,16 +159,15 @@ public static void createANewServerWithDataEncryptionBasedOnCustomerManagedKey( "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") .withPrivateDnsZoneArmResourceId( "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) + .withHighAvailability( + new HighAvailability().withMode(PostgreSqlFlexibleServerHighAvailabilityMode.ZONE_REDUNDANT)) .withAvailabilityZone("1") .withCreateMode(CreateMode.CREATE) .create(); } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateGeoRestoreWithDataEncryptionEnabled.json + * x-ms-original-file: 2026-01-01-preview/ServersCreateGeoRestoreWithDataEncryptionEnabled.json */ /** * Sample code: Create a new server using a restore of a geographically redundant backup of an existing server, with @@ -209,9 +202,7 @@ public static void createANewServerWithDataEncryptionBasedOnCustomerManagedKey( } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateReplica.json + * x-ms-original-file: 2026-01-01-preview/ServersCreateReplica.json */ /** * Sample code: Create a read replica of an existing server. @@ -241,9 +232,7 @@ public static void createAReadReplicaOfAnExistingServer( } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateInYourOwnVirtualNetworkWithSameZoneHighAvailability.json + * x-ms-original-file: 2026-01-01-preview/ServersCreateInYourOwnVirtualNetworkWithSameZoneHighAvailability.json */ /** * Sample code: Create a new server in your own virtual network with same zone high availability. @@ -270,16 +259,15 @@ public static void createANewServerInYourOwnVirtualNetworkWithSameZoneHighAvaila "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") .withPrivateDnsZoneArmResourceId( "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.private.postgres.database")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.SAME_ZONE)) + .withHighAvailability( + new HighAvailability().withMode(PostgreSqlFlexibleServerHighAvailabilityMode.SAME_ZONE)) .withAvailabilityZone("1") .withCreateMode(CreateMode.CREATE) .create(); } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersClusterCreate.json + * x-ms-original-file: 2026-01-01-preview/ServersClusterCreate.json */ /** * Sample code: Create a new elastic cluster. @@ -302,16 +290,15 @@ public static void createANewServerInYourOwnVirtualNetworkWithSameZoneHighAvaila .withBackup( new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED)) .withNetwork(new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.DISABLED)) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.fromString("Disabled"))) + .withHighAvailability( + new HighAvailability().withMode(PostgreSqlFlexibleServerHighAvailabilityMode.DISABLED)) .withCreateMode(CreateMode.CREATE) .withCluster(new Cluster().withClusterSize(2).withDefaultDatabaseName("clusterdb")) .create(); } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreatePointInTimeRestore.json + * x-ms-original-file: 2026-01-01-preview/ServersCreatePointInTimeRestore.json */ /** * Sample code: Create a new server using a point in time restore of a backup of an existing server. @@ -333,8 +320,7 @@ public static void createANewServerUsingAPointInTimeRestoreOfABackupOfAnExisting /* * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateWithMicrosoftEntraEnabledInYourOwnVirtualNetworkWithoutHighAvailability.json + * 2026-01-01-preview/ServersCreateWithMicrosoftEntraEnabledInYourOwnVirtualNetworkWithoutHighAvailability.json */ /** * Sample code: Create a new server with Microsoft Entra authentication enabled in your own virtual network and @@ -366,16 +352,15 @@ public static void createANewServerUsingAPointInTimeRestoreOfABackupOfAnExisting "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") .withPrivateDnsZoneArmResourceId( "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.fromString("Disabled"))) + .withHighAvailability( + new HighAvailability().withMode(PostgreSqlFlexibleServerHighAvailabilityMode.DISABLED)) .withAvailabilityZone("1") .withCreateMode(CreateMode.CREATE) .create(); } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersCreateWithDataEncryptionEnabledAutoUpdate.json + * x-ms-original-file: 2026-01-01-preview/ServersCreateWithDataEncryptionEnabledAutoUpdate.json */ /** * Sample code: Create a new server with data encryption based on customer managed key with automatic key version @@ -411,7 +396,8 @@ public static void createANewServerWithDataEncryptionBasedOnCustomerManagedKeyWi "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.Network/virtualNetworks/examplevirtualnetwork/subnets/examplesubnet") .withPrivateDnsZoneArmResourceId( "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/exampleresourcegroup/providers/Microsoft.Network/privateDnsZones/exampleprivatednszone.postgres.database.azure.com")) - .withHighAvailability(new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT)) + .withHighAvailability( + new HighAvailability().withMode(PostgreSqlFlexibleServerHighAvailabilityMode.ZONE_REDUNDANT)) .withAvailabilityZone("1") .withCreateMode(CreateMode.CREATE) .create(); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteSamples.java index 829ca4139aed..838f177548db 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,8 +9,7 @@ */ public final class ServersDeleteSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersDelete.json + * x-ms-original-file: 2026-01-01-preview/ServersDelete.json */ /** * Sample code: Delete or drop an existing server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersGetByResourceGroupSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersGetByResourceGroupSamples.java index 79042f4faeee..c0b0dc0eb09c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersGetByResourceGroupSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class ServersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersGetWithPrivateEndpoints.json + * x-ms-original-file: 2026-01-01-preview/ServersGetWithPrivateEndpoints.json */ /** * Sample code: Get information about an existing server that isn't integrated into a virtual network provided by @@ -27,9 +25,7 @@ public final class ServersGetByResourceGroupSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersGetWithVnet - * .json + * x-ms-original-file: 2026-01-01-preview/ServersGetWithVnet.json */ /** * Sample code: Get information about an existing server that is integrated into a virtual network provided by @@ -44,8 +40,7 @@ public static void getInformationAboutAnExistingServerThatIsIntegratedIntoAVirtu } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersGet.json + * x-ms-original-file: 2026-01-01-preview/ServersGet.json */ /** * Sample code: Get information about an existing server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListByResourceGroupSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListByResourceGroupSamples.java index c7864f1a402d..878c64189595 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListByResourceGroupSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class ServersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersListByResourceGroup.json + * x-ms-original-file: 2026-01-01-preview/ServersListByResourceGroup.json */ /** * Sample code: List all servers in a resource group. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListSamples.java index e715d1df9820..cce4196ca5a7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class ServersListSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersListBySubscription.json + * x-ms-original-file: 2026-01-01-preview/ServersListBySubscription.json */ /** * Sample code: List all servers in a subscription. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersMigrateNetworkModeSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersMigrateNetworkModeSamples.java new file mode 100644 index 000000000000..86800f96372e --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersMigrateNetworkModeSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +/** + * Samples for Servers MigrateNetworkMode. + */ +public final class ServersMigrateNetworkModeSamples { + /* + * x-ms-original-file: 2026-01-01-preview/ServersMigrateNetworkMode.json + */ + /** + * Sample code: Migrate server network configuration. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void migrateServerNetworkConfiguration( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + manager.servers().migrateNetworkMode("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartSamples.java index 4caca8d0d288..eb81210d1aa9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersRestartSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,9 +12,7 @@ */ public final class ServersRestartSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersRestartWithFailover.json + * x-ms-original-file: 2026-01-01-preview/ServersRestartWithFailover.json */ /** * Sample code: Restart PostgreSQL database engine in a server with a forced failover to standby server. @@ -30,9 +28,7 @@ public static void restartPostgreSQLDatabaseEngineInAServerWithAForcedFailoverTo } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersRestart. - * json + * x-ms-original-file: 2026-01-01-preview/ServersRestart.json */ /** * Sample code: Restart PostgreSQL database engine in a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartSamples.java index 693846408651..90a9a32c91f7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStartSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,8 +9,7 @@ */ public final class ServersStartSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersStart.json + * x-ms-original-file: 2026-01-01-preview/ServersStart.json */ /** * Sample code: Start a stopped server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopSamples.java index 80f6564cd943..55cf372ea1ac 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersStopSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,8 +9,7 @@ */ public final class ServersStopSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersStop.json + * x-ms-original-file: 2026-01-01-preview/ServersStop.json */ /** * Sample code: Stop a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersUpdateSamples.java index f77a1378a4ed..15788467f558 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -33,9 +33,7 @@ */ public final class ServersUpdateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersPromoteReplicaAsForcedSwitchover.json + * x-ms-original-file: 2026-01-01-preview/ServersPromoteReplicaAsForcedSwitchover.json */ /** * Sample code: Switch over a read replica to primary server with forced data synchronization. Meaning that it @@ -57,9 +55,7 @@ public final class ServersUpdateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersPromoteReplicaAsPlannedSwitchover.json + * x-ms-original-file: 2026-01-01-preview/ServersPromoteReplicaAsPlannedSwitchover.json */ /** * Sample code: Switch over a read replica to primary server with planned data synchronization. Meaning that it @@ -81,38 +77,7 @@ public final class ServersUpdateSamples { } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersUpdateWithMicrosoftEntraEnabled.json - */ - /** - * Sample code: Update an existing server with Microsoft Entra authentication enabled. - * - * @param manager Entry point to PostgreSqlManager. - */ - public static void updateAnExistingServerWithMicrosoftEntraAuthenticationEnabled( - com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { - Server resource = manager.servers() - .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) - .withAdministratorLoginPassword("examplenewpassword") - .withStorage(new Storage().withStorageSizeGB(1024) - .withAutoGrow(StorageAutoGrow.DISABLED) - .withTier(AzureManagedDiskPerformanceTier.P30)) - .withBackup(new BackupForPatch().withBackupRetentionDays(20)) - .withAuthConfig(new AuthConfigForPatch().withActiveDirectoryAuth(MicrosoftEntraAuth.ENABLED) - .withPasswordAuth(PasswordBasedAuth.ENABLED) - .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) - .withCreateMode(CreateModeForPatch.UPDATE) - .apply(); - } - - /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersUpdateWithDataEncryptionEnabledAutoUpdate.json + * x-ms-original-file: 2026-01-01-preview/ServersUpdateWithDataEncryptionEnabledAutoUpdate.json */ /** * Sample code: Update an existing server with data encryption based on customer managed key with automatic key @@ -146,27 +111,34 @@ public static void updateAnExistingServerWithDataEncryptionBasedOnCustomerManage } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersUpdateWithMajorVersionUpgrade.json + * x-ms-original-file: 2026-01-01-preview/ServersUpdateWithMicrosoftEntraEnabled.json */ /** - * Sample code: Update an existing server to upgrade the major version of PostgreSQL database engine. + * Sample code: Update an existing server with Microsoft Entra authentication enabled. * * @param manager Entry point to PostgreSqlManager. */ - public static void updateAnExistingServerToUpgradeTheMajorVersionOfPostgreSQLDatabaseEngine( + public static void updateAnExistingServerWithMicrosoftEntraAuthenticationEnabled( com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { Server resource = manager.servers() .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withVersion(PostgresMajorVersion.ONE_SEVEN).withCreateMode(CreateModeForPatch.UPDATE).apply(); + resource.update() + .withSku(new SkuForPatch().withName("Standard_D8s_v3").withTier(SkuTier.GENERAL_PURPOSE)) + .withAdministratorLoginPassword("examplenewpassword") + .withStorage(new Storage().withStorageSizeGB(1024) + .withAutoGrow(StorageAutoGrow.DISABLED) + .withTier(AzureManagedDiskPerformanceTier.P30)) + .withBackup(new BackupForPatch().withBackupRetentionDays(20)) + .withAuthConfig(new AuthConfigForPatch().withActiveDirectoryAuth(MicrosoftEntraAuth.ENABLED) + .withPasswordAuth(PasswordBasedAuth.ENABLED) + .withTenantId("tttttt-tttt-tttt-tttt-tttttttttttt")) + .withCreateMode(CreateModeForPatch.UPDATE) + .apply(); } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersUpdateWithCustomMaintenanceWindow.json + * x-ms-original-file: 2026-01-01-preview/ServersUpdateWithCustomMaintenanceWindow.json */ /** * Sample code: Update an existing server with custom maintenance window. @@ -188,9 +160,7 @@ public static void updateAnExistingServerWithCustomMaintenanceWindow( } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersUpdateWithDataEncryptionEnabled.json + * x-ms-original-file: 2026-01-01-preview/ServersUpdateWithDataEncryptionEnabled.json */ /** * Sample code: Update an existing server with data encryption based on customer managed key. @@ -223,8 +193,23 @@ public static void updateAnExistingServerWithDataEncryptionBasedOnCustomerManage } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ServersUpdate.json + * x-ms-original-file: 2026-01-01-preview/ServersUpdateWithMajorVersionUpgrade.json + */ + /** + * Sample code: Update an existing server to upgrade the major version of PostgreSQL database engine. + * + * @param manager Entry point to PostgreSqlManager. + */ + public static void updateAnExistingServerToUpgradeTheMajorVersionOfPostgreSQLDatabaseEngine( + com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) { + Server resource = manager.servers() + .getByResourceGroupWithResponse("exampleresourcegroup", "exampleserver", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withVersion(PostgresMajorVersion.ONE_SEVEN).withCreateMode(CreateModeForPatch.UPDATE).apply(); + } + + /* + * x-ms-original-file: 2026-01-01-preview/ServersUpdate.json */ /** * Sample code: Update an existing server. @@ -248,9 +233,7 @@ public static void updateAnExistingServerWithDataEncryptionBasedOnCustomerManage } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersPromoteReplicaAsForcedStandaloneServer.json + * x-ms-original-file: 2026-01-01-preview/ServersPromoteReplicaAsForcedStandaloneServer.json */ /** * Sample code: Promote a read replica to a standalone server with forced data synchronization. Meaning that it @@ -272,9 +255,7 @@ public static void updateAnExistingServerWithDataEncryptionBasedOnCustomerManage } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * ServersPromoteReplicaAsPlannedStandaloneServer.json + * x-ms-original-file: 2026-01-01-preview/ServersPromoteReplicaAsPlannedStandaloneServer.json */ /** * Sample code: Promote a read replica to a standalone server with planned data synchronization. Meaning that it diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationGetSamples.java index 084e694e58e8..8d49fb0cee7f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,9 +11,7 @@ */ public final class TuningOptionsOperationGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/TuningOptionsGet. - * json + * x-ms-original-file: 2026-01-01-preview/TuningOptionsGet.json */ /** * Sample code: Get the tuning options of a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListByServerSamples.java index 4cab630713c1..41055f5e511d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListByServerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class TuningOptionsOperationListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * TuningOptionsListByServer.json + * x-ms-original-file: 2026-01-01-preview/TuningOptionsListByServer.json */ /** * Sample code: List the tuning options of a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListRecommendationsSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListRecommendationsSamples.java index 5d281d530cdf..825c3e256e7d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListRecommendationsSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationListRecommendationsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,9 +12,7 @@ */ public final class TuningOptionsOperationListRecommendationsSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * TuningOptionsListIndexRecommendations.json + * x-ms-original-file: 2026-01-01-preview/TuningOptionsListIndexRecommendations.json */ /** * Sample code: List available index recommendations. @@ -29,9 +27,7 @@ public static void listAvailableIndexRecommendations( } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * TuningOptionsListTableRecommendations.json + * x-ms-original-file: 2026-01-01-preview/TuningOptionsListTableRecommendations.json */ /** * Sample code: List available table recommendations. @@ -46,9 +42,7 @@ public static void listAvailableTableRecommendations( } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * TuningOptionsListIndexRecommendationsFilteredForCreateIndex.json + * x-ms-original-file: 2026-01-01-preview/TuningOptionsListIndexRecommendationsFilteredForCreateIndex.json */ /** * Sample code: List available index recommendations, filtered to exclusively get those of CREATE INDEX type. @@ -63,9 +57,7 @@ public static void listAvailableIndexRecommendationsFilteredToExclusivelyGetThos } /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * TuningOptionsListTableRecommendationsFilteredForAnalyzeTable.json + * x-ms-original-file: 2026-01-01-preview/TuningOptionsListTableRecommendationsFilteredForAnalyzeTable.json */ /** * Sample code: List available table recommendations, filtered to exclusively get those of ANALYZE TABLE type. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateSamples.java index eef8520b25e5..867936974430 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,9 +12,7 @@ */ public final class VirtualEndpointsCreateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * VirtualEndpointCreate.json + * x-ms-original-file: 2026-01-01-preview/VirtualEndpointCreate.json */ /** * Sample code: Create a pair of virtual endpoints for a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsDeleteSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsDeleteSamples.java index 4ce11332d8b2..c4d2067eebdb 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsDeleteSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class VirtualEndpointsDeleteSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * VirtualEndpointDelete.json + * x-ms-original-file: 2026-01-01-preview/VirtualEndpointDelete.json */ /** * Sample code: Delete a pair of virtual endpoints. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetSamples.java index 4ec2297e6715..2c4a2d6074a6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class VirtualEndpointsGetSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * VirtualEndpointsGet.json + * x-ms-original-file: 2026-01-01-preview/VirtualEndpointsGet.json */ /** * Sample code: Get information about a pair of virtual endpoints. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerSamples.java index b3bad9315212..8fc717a11a26 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -9,9 +9,7 @@ */ public final class VirtualEndpointsListByServerSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * VirtualEndpointsListByServer.json + * x-ms-original-file: 2026-01-01-preview/VirtualEndpointsListByServer.json */ /** * Sample code: List pair of virtual endpoints associated to a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsUpdateSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsUpdateSamples.java index 363f44e1ae17..dc25f22aa9d0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsUpdateSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,9 +13,7 @@ */ public final class VirtualEndpointsUpdateSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * VirtualEndpointUpdate.json + * x-ms-original-file: 2026-01-01-preview/VirtualEndpointUpdate.json */ /** * Sample code: Update a pair of virtual endpoints for a server. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageListSamples.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageListSamples.java index e8bcce758553..8c538cad0f45 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageListSamples.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/samples/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,9 +11,7 @@ */ public final class VirtualNetworkSubnetUsageListSamples { /* - * x-ms-original-file: - * specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2025-08-01/examples/ - * VirtualNetworkSubnetUsageList.json + * x-ms-original-file: 2026-01-01-preview/VirtualNetworkSubnetUsageList.json */ /** * Sample code: List the virtual network subnet usage for a given virtual network. diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraAddTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraAddTests.java index 5bf630cde256..fd428a8c4f1e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraAddTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraAddTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,24 +12,23 @@ public final class AdministratorMicrosoftEntraAddTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AdministratorMicrosoftEntraAdd model = BinaryData - .fromString( - "{\"properties\":{\"principalType\":\"Unknown\",\"principalName\":\"uv\",\"tenantId\":\"xpyb\"}}") + AdministratorMicrosoftEntraAdd model = BinaryData.fromString( + "{\"properties\":{\"principalType\":\"User\",\"principalName\":\"kywggxkallatmel\",\"tenantId\":\"ipicc\"}}") .toObject(AdministratorMicrosoftEntraAdd.class); - Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); - Assertions.assertEquals("uv", model.principalName()); - Assertions.assertEquals("xpyb", model.tenantId()); + Assertions.assertEquals(PrincipalType.USER, model.principalType()); + Assertions.assertEquals("kywggxkallatmel", model.principalName()); + Assertions.assertEquals("ipicc", model.tenantId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AdministratorMicrosoftEntraAdd model - = new AdministratorMicrosoftEntraAdd().withPrincipalType(PrincipalType.UNKNOWN) - .withPrincipalName("uv") - .withTenantId("xpyb"); + = new AdministratorMicrosoftEntraAdd().withPrincipalType(PrincipalType.USER) + .withPrincipalName("kywggxkallatmel") + .withTenantId("ipicc"); model = BinaryData.fromObject(model).toObject(AdministratorMicrosoftEntraAdd.class); - Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); - Assertions.assertEquals("uv", model.principalName()); - Assertions.assertEquals("xpyb", model.tenantId()); + Assertions.assertEquals(PrincipalType.USER, model.principalType()); + Assertions.assertEquals("kywggxkallatmel", model.principalName()); + Assertions.assertEquals("ipicc", model.tenantId()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraInnerTests.java index 845bbf348fe2..bf9c910ffdc8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,25 +13,11 @@ public final class AdministratorMicrosoftEntraInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AdministratorMicrosoftEntraInner model = BinaryData.fromString( - "{\"properties\":{\"principalType\":\"Unknown\",\"principalName\":\"msxaobhd\",\"objectId\":\"mtqio\",\"tenantId\":\"zehtbmu\"},\"id\":\"ownoizhw\",\"name\":\"rxybqsoq\",\"type\":\"jgkdmbpazlobcu\"}") + "{\"properties\":{\"principalType\":\"Group\",\"principalName\":\"mypyynpcdpu\",\"objectId\":\"zgmwznmabikns\",\"tenantId\":\"gj\"},\"id\":\"bldtlww\",\"name\":\"lkdmtncvokotllxd\",\"type\":\"h\"}") .toObject(AdministratorMicrosoftEntraInner.class); - Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); - Assertions.assertEquals("msxaobhd", model.principalName()); - Assertions.assertEquals("mtqio", model.objectId()); - Assertions.assertEquals("zehtbmu", model.tenantId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdministratorMicrosoftEntraInner model - = new AdministratorMicrosoftEntraInner().withPrincipalType(PrincipalType.UNKNOWN) - .withPrincipalName("msxaobhd") - .withObjectId("mtqio") - .withTenantId("zehtbmu"); - model = BinaryData.fromObject(model).toObject(AdministratorMicrosoftEntraInner.class); - Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); - Assertions.assertEquals("msxaobhd", model.principalName()); - Assertions.assertEquals("mtqio", model.objectId()); - Assertions.assertEquals("zehtbmu", model.tenantId()); + Assertions.assertEquals(PrincipalType.GROUP, model.principalType()); + Assertions.assertEquals("mypyynpcdpu", model.principalName()); + Assertions.assertEquals("zgmwznmabikns", model.objectId()); + Assertions.assertEquals("gj", model.tenantId()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraListTests.java index 4b5d83469b18..760bb50848bf 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraListTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraListTests.java @@ -1,54 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.AdministratorMicrosoftEntraInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntraList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.AdministratorMicrosoftEntraList; import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class AdministratorMicrosoftEntraListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AdministratorMicrosoftEntraList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"principalType\":\"User\",\"principalName\":\"xrifkwmrvkts\",\"objectId\":\"nt\",\"tenantId\":\"ipa\"},\"id\":\"ajpsquc\",\"name\":\"poyfdkfogkn\",\"type\":\"gjofjd\"},{\"properties\":{\"principalType\":\"Unknown\",\"principalName\":\"rd\",\"objectId\":\"pewnw\",\"tenantId\":\"itjz\"},\"id\":\"lusarh\",\"name\":\"ofcqhsm\",\"type\":\"urkdtmlx\"},{\"properties\":{\"principalType\":\"Group\",\"principalName\":\"k\",\"objectId\":\"txukcdmp\",\"tenantId\":\"cryuan\"},\"id\":\"uxzdxtay\",\"name\":\"lhmwhfpmrqobm\",\"type\":\"u\"},{\"properties\":{\"principalType\":\"User\",\"principalName\":\"yrtih\",\"objectId\":\"tijbpzvgnwzsymgl\",\"tenantId\":\"fcyzkohdbihanufh\"},\"id\":\"bj\",\"name\":\"s\",\"type\":\"git\"}],\"nextLink\":\"qhabifpikxwcz\"}") + "{\"value\":[{\"properties\":{\"principalType\":\"Group\",\"principalName\":\"rdvstkwqqtch\",\"objectId\":\"lmfmtdaay\",\"tenantId\":\"v\"},\"id\":\"gpiohgwxrtfudxe\",\"name\":\"xg\",\"type\":\"qagvrvm\"},{\"properties\":{\"principalType\":\"Unknown\",\"principalName\":\"kghimdblxgwimfnj\",\"objectId\":\"j\",\"tenantId\":\"mszkkfo\"},\"id\":\"eyfkzikfja\",\"name\":\"n\",\"type\":\"a\"}],\"nextLink\":\"xwczelpcire\"}") .toObject(AdministratorMicrosoftEntraList.class); - Assertions.assertEquals(PrincipalType.USER, model.value().get(0).principalType()); - Assertions.assertEquals("xrifkwmrvkts", model.value().get(0).principalName()); - Assertions.assertEquals("nt", model.value().get(0).objectId()); - Assertions.assertEquals("ipa", model.value().get(0).tenantId()); - Assertions.assertEquals("qhabifpikxwcz", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdministratorMicrosoftEntraList model = new AdministratorMicrosoftEntraList().withValue(Arrays.asList( - new AdministratorMicrosoftEntraInner().withPrincipalType(PrincipalType.USER) - .withPrincipalName("xrifkwmrvkts") - .withObjectId("nt") - .withTenantId("ipa"), - new AdministratorMicrosoftEntraInner().withPrincipalType(PrincipalType.UNKNOWN) - .withPrincipalName("rd") - .withObjectId("pewnw") - .withTenantId("itjz"), - new AdministratorMicrosoftEntraInner().withPrincipalType(PrincipalType.GROUP) - .withPrincipalName("k") - .withObjectId("txukcdmp") - .withTenantId("cryuan"), - new AdministratorMicrosoftEntraInner().withPrincipalType(PrincipalType.USER) - .withPrincipalName("yrtih") - .withObjectId("tijbpzvgnwzsymgl") - .withTenantId("fcyzkohdbihanufh"))) - .withNextLink("qhabifpikxwcz"); - model = BinaryData.fromObject(model).toObject(AdministratorMicrosoftEntraList.class); - Assertions.assertEquals(PrincipalType.USER, model.value().get(0).principalType()); - Assertions.assertEquals("xrifkwmrvkts", model.value().get(0).principalName()); - Assertions.assertEquals("nt", model.value().get(0).objectId()); - Assertions.assertEquals("ipa", model.value().get(0).tenantId()); - Assertions.assertEquals("qhabifpikxwcz", model.nextLink()); + Assertions.assertEquals(PrincipalType.GROUP, model.value().get(0).principalType()); + Assertions.assertEquals("rdvstkwqqtch", model.value().get(0).principalName()); + Assertions.assertEquals("lmfmtdaay", model.value().get(0).objectId()); + Assertions.assertEquals("v", model.value().get(0).tenantId()); + Assertions.assertEquals("xwczelpcire", model.nextLink()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesForAddTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesForAddTests.java index 9a518322d7bf..32eed5a400fb 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesForAddTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesForAddTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -14,22 +14,22 @@ public final class AdministratorMicrosoftEntraPropertiesForAddTests { public void testDeserialize() throws Exception { AdministratorMicrosoftEntraPropertiesForAdd model = BinaryData .fromString( - "{\"principalType\":\"Unknown\",\"principalName\":\"hmtzopbsphrup\",\"tenantId\":\"gsybbejhp\"}") + "{\"principalType\":\"ServicePrincipal\",\"principalName\":\"ivgvvcna\",\"tenantId\":\"hyrnxxmu\"}") .toObject(AdministratorMicrosoftEntraPropertiesForAdd.class); - Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); - Assertions.assertEquals("hmtzopbsphrup", model.principalName()); - Assertions.assertEquals("gsybbejhp", model.tenantId()); + Assertions.assertEquals(PrincipalType.SERVICE_PRINCIPAL, model.principalType()); + Assertions.assertEquals("ivgvvcna", model.principalName()); + Assertions.assertEquals("hyrnxxmu", model.tenantId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AdministratorMicrosoftEntraPropertiesForAdd model - = new AdministratorMicrosoftEntraPropertiesForAdd().withPrincipalType(PrincipalType.UNKNOWN) - .withPrincipalName("hmtzopbsphrup") - .withTenantId("gsybbejhp"); + = new AdministratorMicrosoftEntraPropertiesForAdd().withPrincipalType(PrincipalType.SERVICE_PRINCIPAL) + .withPrincipalName("ivgvvcna") + .withTenantId("hyrnxxmu"); model = BinaryData.fromObject(model).toObject(AdministratorMicrosoftEntraPropertiesForAdd.class); - Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); - Assertions.assertEquals("hmtzopbsphrup", model.principalName()); - Assertions.assertEquals("gsybbejhp", model.tenantId()); + Assertions.assertEquals(PrincipalType.SERVICE_PRINCIPAL, model.principalType()); + Assertions.assertEquals("ivgvvcna", model.principalName()); + Assertions.assertEquals("hyrnxxmu", model.tenantId()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesTests.java index c97133beb0b5..909f253b6f9b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorMicrosoftEntraPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,25 +13,11 @@ public final class AdministratorMicrosoftEntraPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AdministratorMicrosoftEntraProperties model = BinaryData.fromString( - "{\"principalType\":\"Group\",\"principalName\":\"nrbtcqqjnq\",\"objectId\":\"hqgnufooojywif\",\"tenantId\":\"esaagdfm\"}") + "{\"principalType\":\"Unknown\",\"principalName\":\"cogjltdtbn\",\"objectId\":\"adoocrkvc\",\"tenantId\":\"hnvpamqgxq\"}") .toObject(AdministratorMicrosoftEntraProperties.class); - Assertions.assertEquals(PrincipalType.GROUP, model.principalType()); - Assertions.assertEquals("nrbtcqqjnq", model.principalName()); - Assertions.assertEquals("hqgnufooojywif", model.objectId()); - Assertions.assertEquals("esaagdfm", model.tenantId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdministratorMicrosoftEntraProperties model - = new AdministratorMicrosoftEntraProperties().withPrincipalType(PrincipalType.GROUP) - .withPrincipalName("nrbtcqqjnq") - .withObjectId("hqgnufooojywif") - .withTenantId("esaagdfm"); - model = BinaryData.fromObject(model).toObject(AdministratorMicrosoftEntraProperties.class); - Assertions.assertEquals(PrincipalType.GROUP, model.principalType()); - Assertions.assertEquals("nrbtcqqjnq", model.principalName()); - Assertions.assertEquals("hqgnufooojywif", model.objectId()); - Assertions.assertEquals("esaagdfm", model.tenantId()); + Assertions.assertEquals(PrincipalType.UNKNOWN, model.principalType()); + Assertions.assertEquals("cogjltdtbn", model.principalName()); + Assertions.assertEquals("adoocrkvc", model.objectId()); + Assertions.assertEquals("hnvpamqgxq", model.tenantId()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasCreateOrUpdateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasCreateOrUpdateMockTests.java deleted file mode 100644 index 34dca5f9eff5..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasCreateOrUpdateMockTests.java +++ /dev/null @@ -1,47 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AdministratorMicrosoftEntra; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrincipalType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AdministratorsMicrosoftEntrasCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"principalType\":\"Group\",\"principalName\":\"eaahhvjhhn\",\"objectId\":\"zybbj\",\"tenantId\":\"dj\"},\"id\":\"yxkyxvx\",\"name\":\"vblbjednljlageua\",\"type\":\"lxunsmjbnkppxy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - AdministratorMicrosoftEntra response = manager.administratorsMicrosoftEntras() - .define("xakjsqzhzb") - .withExistingFlexibleServer("omfaj", "wasqvdaeyyg") - .withPrincipalType(PrincipalType.UNKNOWN) - .withPrincipalName("msidxasicddyvv") - .withTenantId("kgfmocwahpq") - .create(); - - Assertions.assertEquals(PrincipalType.GROUP, response.principalType()); - Assertions.assertEquals("eaahhvjhhn", response.principalName()); - Assertions.assertEquals("zybbj", response.objectId()); - Assertions.assertEquals("dj", response.tenantId()); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasGetWithResponseMockTests.java index a423ac18ec27..1857b7633ee7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -22,7 +22,7 @@ public final class AdministratorsMicrosoftEntrasGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"principalType\":\"User\",\"principalName\":\"iv\",\"objectId\":\"oyzunbixxr\",\"tenantId\":\"kvcpwpgclr\"},\"id\":\"vtsoxf\",\"name\":\"kenx\",\"type\":\"m\"}"; + = "{\"properties\":{\"principalType\":\"Unknown\",\"principalName\":\"ophzfylsgcrp\",\"objectId\":\"cunezzcezelfw\",\"tenantId\":\"wl\"},\"id\":\"jwetnpsihcla\",\"name\":\"zvaylptrsqqw\",\"type\":\"tcmwqkchc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AdministratorMicrosoftEntra response = manager.administratorsMicrosoftEntras() - .getWithResponse("qzdz", "tilaxh", "fhqlyvi", com.azure.core.util.Context.NONE) + .getWithResponse("nlvxbcuii", "nktwfansnvpdibmi", "ostbzbkiwb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(PrincipalType.USER, response.principalType()); - Assertions.assertEquals("iv", response.principalName()); - Assertions.assertEquals("oyzunbixxr", response.objectId()); - Assertions.assertEquals("kvcpwpgclr", response.tenantId()); + Assertions.assertEquals(PrincipalType.UNKNOWN, response.principalType()); + Assertions.assertEquals("ophzfylsgcrp", response.principalName()); + Assertions.assertEquals("cunezzcezelfw", response.objectId()); + Assertions.assertEquals("wl", response.tenantId()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasListByServerMockTests.java index 6242a523c14e..4521859097ee 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdministratorsMicrosoftEntrasListByServerMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -23,7 +23,7 @@ public final class AdministratorsMicrosoftEntrasListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"principalType\":\"Group\",\"principalName\":\"bnpqfrtqlkzme\",\"objectId\":\"itgvkx\",\"tenantId\":\"yqdrf\"},\"id\":\"cealzxwh\",\"name\":\"ansym\",\"type\":\"yqhlwigdivbkbx\"}]}"; + = "{\"value\":[{\"properties\":{\"principalType\":\"Unknown\",\"principalName\":\"kbffmbmx\",\"objectId\":\"rgywwp\",\"tenantId\":\"xs\"},\"id\":\"tf\",\"name\":\"jgicgaao\",\"type\":\"pttaqutd\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,11 +33,11 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.administratorsMicrosoftEntras() - .listByServer("yefrpmpdnqqska", "ao", com.azure.core.util.Context.NONE); + .listByServer("waxfewzjkj", "xfdeqvhpsyl", com.azure.core.util.Context.NONE); - Assertions.assertEquals(PrincipalType.GROUP, response.iterator().next().principalType()); - Assertions.assertEquals("bnpqfrtqlkzme", response.iterator().next().principalName()); - Assertions.assertEquals("itgvkx", response.iterator().next().objectId()); - Assertions.assertEquals("yqdrf", response.iterator().next().tenantId()); + Assertions.assertEquals(PrincipalType.UNKNOWN, response.iterator().next().principalType()); + Assertions.assertEquals("kbffmbmx", response.iterator().next().principalName()); + Assertions.assertEquals("rgywwp", response.iterator().next().objectId()); + Assertions.assertEquals("xs", response.iterator().next().tenantId()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetWithResponseMockTests.java index 2291983321cb..294a3636e2d6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -23,7 +23,7 @@ public final class AdvancedThreatProtectionSettingsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-06-22T06:39:41Z\"},\"id\":\"ibabxvititvtzeex\",\"name\":\"vo\",\"type\":\"tfgle\"}"; + = "{\"properties\":{\"state\":\"Disabled\",\"creationTime\":\"2021-01-26T03:37:20Z\"},\"id\":\"gb\",\"name\":\"c\",\"type\":\"uahokq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,9 +33,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AdvancedThreatProtectionSettingsModel response = manager.advancedThreatProtectionSettings() - .getWithResponse("eesvecu", "jpxtxsuwprtuj", ThreatProtectionName.DEFAULT, com.azure.core.util.Context.NONE) + .getWithResponse("ttaboidvmfqh", "pubowsepdfg", ThreatProtectionName.DEFAULT, + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(ThreatProtectionState.ENABLED, response.state()); + Assertions.assertEquals(ThreatProtectionState.DISABLED, response.state()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerMockTests.java index f3f16f405260..fff723555bf1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListByServerMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -23,7 +23,7 @@ public final class AdvancedThreatProtectionSettingsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-06-20T13:46:53Z\"},\"id\":\"ymerteeammxq\",\"name\":\"ekkkzd\",\"type\":\"rtkgdojbmxvavref\"}]}"; + = "{\"value\":[{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-06-24T13:04:54Z\"},\"id\":\"koj\",\"name\":\"llndnpd\",\"type\":\"rpqaf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,7 +33,7 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.advancedThreatProtectionSettings() - .listByServer("enlsvxeizzgwkln", "rmffeyc", com.azure.core.util.Context.NONE); + .listByServer("obkauxofsh", "phwpnulaiywzej", com.azure.core.util.Context.NONE); Assertions.assertEquals(ThreatProtectionState.ENABLED, response.iterator().next().state()); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListTests.java index 31106f8a6ba6..26ee2d44bfcf 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsListTests.java @@ -1,26 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.AdvancedThreatProtectionSettingsList; import org.junit.jupiter.api.Assertions; public final class AdvancedThreatProtectionSettingsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AdvancedThreatProtectionSettingsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-02-24T21:11:33Z\"},\"id\":\"uhivyqniw\",\"name\":\"ybrk\",\"type\":\"vd\"},{\"properties\":{\"state\":\"Disabled\",\"creationTime\":\"2021-10-08T05:03:40Z\"},\"id\":\"fwvuk\",\"name\":\"gaudcc\",\"type\":\"nhsjcnyej\"},{\"properties\":{\"state\":\"Disabled\",\"creationTime\":\"2021-10-13T18:09:40Z\"},\"id\":\"napczwlokjy\",\"name\":\"mkkvnip\",\"type\":\"oxzjnchgejspod\"}],\"nextLink\":\"ilzyd\"}") + "{\"value\":[{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-06-25T19:45:47Z\"},\"id\":\"nhxmsi\",\"name\":\"fomiloxgg\",\"type\":\"ufiqndieuzaof\"},{\"properties\":{\"state\":\"Disabled\",\"creationTime\":\"2021-06-01T02:29:17Z\"},\"id\":\"yysfgdot\",\"name\":\"ubiipuipwoqonma\",\"type\":\"jeknizshq\"},{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-02-12T06:14:38Z\"},\"id\":\"vfgmblrrilby\",\"name\":\"dxsm\",\"type\":\"ccwr\"},{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2020-12-30T05:48:12Z\"},\"id\":\"n\",\"name\":\"nszqujiz\",\"type\":\"voqyt\"}],\"nextLink\":\"yo\"}") .toObject(AdvancedThreatProtectionSettingsList.class); - Assertions.assertEquals("ilzyd", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdvancedThreatProtectionSettingsList model = new AdvancedThreatProtectionSettingsList().withNextLink("ilzyd"); - model = BinaryData.fromObject(model).toObject(AdvancedThreatProtectionSettingsList.class); - Assertions.assertEquals("ilzyd", model.nextLink()); + Assertions.assertEquals("yo", model.nextLink()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsModelInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsModelInnerTests.java index 8128cb3ea365..521ad69a2988 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsModelInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsModelInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,16 +13,16 @@ public final class AdvancedThreatProtectionSettingsModelInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AdvancedThreatProtectionSettingsModelInner model = BinaryData.fromString( - "{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-01-09T01:59:33Z\"},\"id\":\"ahuxinpm\",\"name\":\"njaqwixjspro\",\"type\":\"vcputegj\"}") + "{\"properties\":{\"state\":\"Disabled\",\"creationTime\":\"2021-05-07T19:54:08Z\"},\"id\":\"mnnrwr\",\"name\":\"i\",\"type\":\"rk\"}") .toObject(AdvancedThreatProtectionSettingsModelInner.class); - Assertions.assertEquals(ThreatProtectionState.ENABLED, model.state()); + Assertions.assertEquals(ThreatProtectionState.DISABLED, model.state()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AdvancedThreatProtectionSettingsModelInner model - = new AdvancedThreatProtectionSettingsModelInner().withState(ThreatProtectionState.ENABLED); + = new AdvancedThreatProtectionSettingsModelInner().withState(ThreatProtectionState.DISABLED); model = BinaryData.fromObject(model).toObject(AdvancedThreatProtectionSettingsModelInner.class); - Assertions.assertEquals(ThreatProtectionState.ENABLED, model.state()); + Assertions.assertEquals(ThreatProtectionState.DISABLED, model.state()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsPropertiesTests.java index fe5af36aec36..4dd00f40e087 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsPropertiesTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/AdvancedThreatProtectionSettingsPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,7 +13,7 @@ public final class AdvancedThreatProtectionSettingsPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AdvancedThreatProtectionSettingsProperties model - = BinaryData.fromString("{\"state\":\"Disabled\",\"creationTime\":\"2021-06-23T09:15:06Z\"}") + = BinaryData.fromString("{\"state\":\"Disabled\",\"creationTime\":\"2021-08-10T02:45:15Z\"}") .toObject(AdvancedThreatProtectionSettingsProperties.class); Assertions.assertEquals(ThreatProtectionState.DISABLED, model.state()); } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandInnerTests.java index 0e466aff4ea8..758d0f1d83b6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -14,21 +14,10 @@ public final class BackupAutomaticAndOnDemandInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupAutomaticAndOnDemandInner model = BinaryData.fromString( - "{\"properties\":{\"backupType\":\"Full\",\"completedTime\":\"2021-09-13T14:44:26Z\",\"source\":\"dvpjhulsuuvmk\"},\"id\":\"zkrwfn\",\"name\":\"iodjp\",\"type\":\"lwejdpv\"}") + "{\"properties\":{\"backupType\":\"Full\",\"completedTime\":\"2021-04-29T06:10:08Z\",\"source\":\"vutpthjoxo\"},\"id\":\"msksbp\",\"name\":\"mlqoljx\",\"type\":\"cgxxlxs\"}") .toObject(BackupAutomaticAndOnDemandInner.class); Assertions.assertEquals(BackupType.FULL, model.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T14:44:26Z"), model.completedTime()); - Assertions.assertEquals("dvpjhulsuuvmk", model.source()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupAutomaticAndOnDemandInner model = new BackupAutomaticAndOnDemandInner().withBackupType(BackupType.FULL) - .withCompletedTime(OffsetDateTime.parse("2021-09-13T14:44:26Z")) - .withSource("dvpjhulsuuvmk"); - model = BinaryData.fromObject(model).toObject(BackupAutomaticAndOnDemandInner.class); - Assertions.assertEquals(BackupType.FULL, model.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T14:44:26Z"), model.completedTime()); - Assertions.assertEquals("dvpjhulsuuvmk", model.source()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-29T06:10:08Z"), model.completedTime()); + Assertions.assertEquals("vutpthjoxo", model.source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandListTests.java index f149153d8b18..ce76f6d7f167 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandListTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandListTests.java @@ -1,40 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.BackupAutomaticAndOnDemandInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemandList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.BackupAutomaticAndOnDemandList; import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; import java.time.OffsetDateTime; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class BackupAutomaticAndOnDemandListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupAutomaticAndOnDemandList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"backupType\":\"Full\",\"completedTime\":\"2021-10-01T21:39:25Z\",\"source\":\"fdfdosygexpa\"},\"id\":\"akhmsbzjhcrz\",\"name\":\"vdphlxaolthqtr\",\"type\":\"qjbpfzfsin\"}],\"nextLink\":\"v\"}") + "{\"value\":[{\"properties\":{\"backupType\":\"Customer On-Demand\",\"completedTime\":\"2021-10-22T00:54:52Z\",\"source\":\"fgfb\"},\"id\":\"ubdyhgk\",\"name\":\"minsgowzf\",\"type\":\"tsttktlahbq\"},{\"properties\":{\"backupType\":\"Customer On-Demand\",\"completedTime\":\"2021-10-13T12:53:05Z\",\"source\":\"ukxit\"},\"id\":\"qtgqqqxhrnxr\",\"name\":\"cpjuisa\",\"type\":\"okqdzfvaz\"}],\"nextLink\":\"jlfrq\"}") .toObject(BackupAutomaticAndOnDemandList.class); - Assertions.assertEquals(BackupType.FULL, model.value().get(0).backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-01T21:39:25Z"), model.value().get(0).completedTime()); - Assertions.assertEquals("fdfdosygexpa", model.value().get(0).source()); - Assertions.assertEquals("v", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupAutomaticAndOnDemandList model = new BackupAutomaticAndOnDemandList() - .withValue(Arrays.asList(new BackupAutomaticAndOnDemandInner().withBackupType(BackupType.FULL) - .withCompletedTime(OffsetDateTime.parse("2021-10-01T21:39:25Z")) - .withSource("fdfdosygexpa"))) - .withNextLink("v"); - model = BinaryData.fromObject(model).toObject(BackupAutomaticAndOnDemandList.class); - Assertions.assertEquals(BackupType.FULL, model.value().get(0).backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-01T21:39:25Z"), model.value().get(0).completedTime()); - Assertions.assertEquals("fdfdosygexpa", model.value().get(0).source()); - Assertions.assertEquals("v", model.nextLink()); + Assertions.assertEquals(BackupType.CUSTOMER_ON_DEMAND, model.value().get(0).backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-22T00:54:52Z"), model.value().get(0).completedTime()); + Assertions.assertEquals("fgfb", model.value().get(0).source()); + Assertions.assertEquals("jlfrq", model.nextLink()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandPropertiesTests.java index c065ac61d19a..06250d8a8d83 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandPropertiesTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupAutomaticAndOnDemandPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -14,22 +14,10 @@ public final class BackupAutomaticAndOnDemandPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupAutomaticAndOnDemandProperties model = BinaryData.fromString( - "{\"backupType\":\"Customer On-Demand\",\"completedTime\":\"2021-02-03T13:19:32Z\",\"source\":\"soacctazakl\"}") + "{\"backupType\":\"Customer On-Demand\",\"completedTime\":\"2021-09-08T02:34:48Z\",\"source\":\"zqzdw\"}") .toObject(BackupAutomaticAndOnDemandProperties.class); Assertions.assertEquals(BackupType.CUSTOMER_ON_DEMAND, model.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-03T13:19:32Z"), model.completedTime()); - Assertions.assertEquals("soacctazakl", model.source()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupAutomaticAndOnDemandProperties model - = new BackupAutomaticAndOnDemandProperties().withBackupType(BackupType.CUSTOMER_ON_DEMAND) - .withCompletedTime(OffsetDateTime.parse("2021-02-03T13:19:32Z")) - .withSource("soacctazakl"); - model = BinaryData.fromObject(model).toObject(BackupAutomaticAndOnDemandProperties.class); - Assertions.assertEquals(BackupType.CUSTOMER_ON_DEMAND, model.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-03T13:19:32Z"), model.completedTime()); - Assertions.assertEquals("soacctazakl", model.source()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-08T02:34:48Z"), model.completedTime()); + Assertions.assertEquals("zqzdw", model.source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupForPatchTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupForPatchTests.java index 96ab7bdc0a6a..522c7004a015 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupForPatchTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupForPatchTests.java @@ -1,30 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupForPatch; -import com.azure.resourcemanager.postgresqlflexibleserver.models.GeographicallyRedundantBackup; import org.junit.jupiter.api.Assertions; public final class BackupForPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupForPatch model = BinaryData.fromString( - "{\"backupRetentionDays\":704877183,\"geoRedundantBackup\":\"Disabled\",\"earliestRestoreDate\":\"2021-01-17T07:38:08Z\"}") + "{\"backupRetentionDays\":1907592616,\"geoRedundantBackup\":\"Enabled\",\"earliestRestoreDate\":\"2021-04-14T06:41:24Z\"}") .toObject(BackupForPatch.class); - Assertions.assertEquals(704877183, model.backupRetentionDays()); - Assertions.assertEquals(GeographicallyRedundantBackup.DISABLED, model.geoRedundantBackup()); + Assertions.assertEquals(1907592616, model.backupRetentionDays()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupForPatch model = new BackupForPatch().withBackupRetentionDays(704877183) - .withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED); + BackupForPatch model = new BackupForPatch().withBackupRetentionDays(1907592616); model = BinaryData.fromObject(model).toObject(BackupForPatch.class); - Assertions.assertEquals(704877183, model.backupRetentionDays()); - Assertions.assertEquals(GeographicallyRedundantBackup.DISABLED, model.geoRedundantBackup()); + Assertions.assertEquals(1907592616, model.backupRetentionDays()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupRequestBaseTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupRequestBaseTests.java index 395ff65bc1e6..aaa04e2f88ac 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupRequestBaseTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupRequestBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,16 +12,16 @@ public final class BackupRequestBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BackupRequestBase model = BinaryData.fromString("{\"backupSettings\":{\"backupName\":\"kbogqxndlkzgx\"}}") + BackupRequestBase model = BinaryData.fromString("{\"backupSettings\":{\"backupName\":\"uwrbehwagoh\"}}") .toObject(BackupRequestBase.class); - Assertions.assertEquals("kbogqxndlkzgx", model.backupSettings().backupName()); + Assertions.assertEquals("uwrbehwagoh", model.backupSettings().backupName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BackupRequestBase model - = new BackupRequestBase().withBackupSettings(new BackupSettings().withBackupName("kbogqxndlkzgx")); + = new BackupRequestBase().withBackupSettings(new BackupSettings().withBackupName("uwrbehwagoh")); model = BinaryData.fromObject(model).toObject(BackupRequestBase.class); - Assertions.assertEquals("kbogqxndlkzgx", model.backupSettings().backupName()); + Assertions.assertEquals("uwrbehwagoh", model.backupSettings().backupName()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupSettingsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupSettingsTests.java index 7941c85d35e6..e8306ea75448 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupSettingsTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,14 +12,14 @@ public final class BackupSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupSettings model - = BinaryData.fromString("{\"backupName\":\"uriplbpodxunkb\"}").toObject(BackupSettings.class); - Assertions.assertEquals("uriplbpodxunkb", model.backupName()); + = BinaryData.fromString("{\"backupName\":\"uffkmrqemvvh\"}").toObject(BackupSettings.class); + Assertions.assertEquals("uffkmrqemvvh", model.backupName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupSettings model = new BackupSettings().withBackupName("uriplbpodxunkb"); + BackupSettings model = new BackupSettings().withBackupName("uffkmrqemvvh"); model = BinaryData.fromObject(model).toObject(BackupSettings.class); - Assertions.assertEquals("uriplbpodxunkb", model.backupName()); + Assertions.assertEquals("uffkmrqemvvh", model.backupName()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupStoreDetailsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupStoreDetailsTests.java index 8318533b93f5..9381cce2128d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupStoreDetailsTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupStoreDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,14 +13,14 @@ public final class BackupStoreDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupStoreDetails model - = BinaryData.fromString("{\"sasUriList\":[\"wlauwzizxbmpg\"]}").toObject(BackupStoreDetails.class); - Assertions.assertEquals("wlauwzizxbmpg", model.sasUriList().get(0)); + = BinaryData.fromString("{\"sasUriList\":[\"m\",\"cpmguaadraufact\"]}").toObject(BackupStoreDetails.class); + Assertions.assertEquals("m", model.sasUriList().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupStoreDetails model = new BackupStoreDetails().withSasUriList(Arrays.asList("wlauwzizxbmpg")); + BackupStoreDetails model = new BackupStoreDetails().withSasUriList(Arrays.asList("m", "cpmguaadraufact")); model = BinaryData.fromObject(model).toObject(BackupStoreDetails.class); - Assertions.assertEquals("wlauwzizxbmpg", model.sasUriList().get(0)); + Assertions.assertEquals("m", model.sasUriList().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupTests.java index dfd8ee9ac090..88c7ca4836fe 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,18 +13,18 @@ public final class BackupTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Backup model = BinaryData.fromString( - "{\"backupRetentionDays\":1112510482,\"geoRedundantBackup\":\"Disabled\",\"earliestRestoreDate\":\"2021-10-31T10:15:37Z\"}") + "{\"backupRetentionDays\":195417612,\"geoRedundantBackup\":\"Enabled\",\"earliestRestoreDate\":\"2021-12-10T22:06:33Z\"}") .toObject(Backup.class); - Assertions.assertEquals(1112510482, model.backupRetentionDays()); - Assertions.assertEquals(GeographicallyRedundantBackup.DISABLED, model.geoRedundantBackup()); + Assertions.assertEquals(195417612, model.backupRetentionDays()); + Assertions.assertEquals(GeographicallyRedundantBackup.ENABLED, model.geoRedundantBackup()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Backup model = new Backup().withBackupRetentionDays(1112510482) - .withGeoRedundantBackup(GeographicallyRedundantBackup.DISABLED); + Backup model = new Backup().withBackupRetentionDays(195417612) + .withGeoRedundantBackup(GeographicallyRedundantBackup.ENABLED); model = BinaryData.fromObject(model).toObject(Backup.class); - Assertions.assertEquals(1112510482, model.backupRetentionDays()); - Assertions.assertEquals(GeographicallyRedundantBackup.DISABLED, model.geoRedundantBackup()); + Assertions.assertEquals(195417612, model.backupRetentionDays()); + Assertions.assertEquals(GeographicallyRedundantBackup.ENABLED, model.geoRedundantBackup()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsCreateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsCreateMockTests.java deleted file mode 100644 index ddee7d2f3fa9..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsCreateMockTests.java +++ /dev/null @@ -1,41 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupAutomaticAndOnDemand; -import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupsAutomaticAndOnDemandsCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"backupType\":\"Customer On-Demand\",\"completedTime\":\"2021-11-19T03:35:41Z\",\"source\":\"nrzvuljraaer\"},\"id\":\"okqgukkjq\",\"name\":\"vbroylaxxu\",\"type\":\"cdisd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - BackupAutomaticAndOnDemand response - = manager.backupsAutomaticAndOnDemands().create("nac", "cc", "knh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(BackupType.CUSTOMER_ON_DEMAND, response.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-19T03:35:41Z"), response.completedTime()); - Assertions.assertEquals("nrzvuljraaer", response.source()); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsGetWithResponseMockTests.java index e3220c47c8df..cd6e741a3308 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -22,7 +22,7 @@ public final class BackupsAutomaticAndOnDemandsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"backupType\":\"Customer On-Demand\",\"completedTime\":\"2021-02-24T21:00:57Z\",\"source\":\"ttzaefed\"},\"id\":\"hchrphkmcrjdqn\",\"name\":\"dfzpbgtgkylkdg\",\"type\":\"rjeuut\"}"; + = "{\"properties\":{\"backupType\":\"Full\",\"completedTime\":\"2021-06-05T04:34:50Z\",\"source\":\"rmlmuowo\"},\"id\":\"au\",\"name\":\"ropions\",\"type\":\"onwpnga\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupAutomaticAndOnDemand response = manager.backupsAutomaticAndOnDemands() - .getWithResponse("sfjbjsvg", "rwhryvycytd", "lxgccknfnwmbtm", com.azure.core.util.Context.NONE) + .getWithResponse("fugsnnfhyetefy", "oc", "ctfjgtixr", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(BackupType.CUSTOMER_ON_DEMAND, response.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-24T21:00:57Z"), response.completedTime()); - Assertions.assertEquals("ttzaefed", response.source()); + Assertions.assertEquals(BackupType.FULL, response.backupType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-05T04:34:50Z"), response.completedTime()); + Assertions.assertEquals("rmlmuowo", response.source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsListByServerMockTests.java index d4036ec44a1f..aa417dadd0a1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsAutomaticAndOnDemandsListByServerMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -23,7 +23,7 @@ public final class BackupsAutomaticAndOnDemandsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"backupType\":\"Full\",\"completedTime\":\"2021-03-11T01:19:47Z\",\"source\":\"pifhpfeoajvgcxtx\"},\"id\":\"sheafid\",\"name\":\"tugsresmkssjh\",\"type\":\"iftxfkf\"}]}"; + = "{\"value\":[{\"properties\":{\"backupType\":\"Full\",\"completedTime\":\"2021-04-08T00:55:38Z\",\"source\":\"nlusfnrd\"},\"id\":\"xtxrdcqtjvidt\",\"name\":\"gepuslvyjtc\",\"type\":\"uwkasiz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,11 +33,11 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.backupsAutomaticAndOnDemands() - .listByServer("wxezwzhok", "bwnhhtql", com.azure.core.util.Context.NONE); + .listByServer("innixjawrtmjfj", "yccxlzhcox", com.azure.core.util.Context.NONE); Assertions.assertEquals(BackupType.FULL, response.iterator().next().backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-11T01:19:47Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-04-08T00:55:38Z"), response.iterator().next().completedTime()); - Assertions.assertEquals("pifhpfeoajvgcxtx", response.iterator().next().source()); + Assertions.assertEquals("nlusfnrd", response.iterator().next().source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionRequestTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionRequestTests.java index d89d35905bc9..9db3db92908f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionRequestTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -14,20 +14,21 @@ public final class BackupsLongTermRetentionRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BackupsLongTermRetentionRequest model = BinaryData.fromString( - "{\"targetDetails\":{\"sasUriList\":[\"ubyyntw\",\"rbqtkoie\"]},\"backupSettings\":{\"backupName\":\"seotgqrllt\"}}") + BackupsLongTermRetentionRequest model = BinaryData + .fromString( + "{\"targetDetails\":{\"sasUriList\":[\"rjfut\"]},\"backupSettings\":{\"backupName\":\"coebjvewzcj\"}}") .toObject(BackupsLongTermRetentionRequest.class); - Assertions.assertEquals("seotgqrllt", model.backupSettings().backupName()); - Assertions.assertEquals("ubyyntw", model.targetDetails().sasUriList().get(0)); + Assertions.assertEquals("coebjvewzcj", model.backupSettings().backupName()); + Assertions.assertEquals("rjfut", model.targetDetails().sasUriList().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BackupsLongTermRetentionRequest model = new BackupsLongTermRetentionRequest() - .withBackupSettings(new BackupSettings().withBackupName("seotgqrllt")) - .withTargetDetails(new BackupStoreDetails().withSasUriList(Arrays.asList("ubyyntw", "rbqtkoie"))); + .withBackupSettings(new BackupSettings().withBackupName("coebjvewzcj")) + .withTargetDetails(new BackupStoreDetails().withSasUriList(Arrays.asList("rjfut"))); model = BinaryData.fromObject(model).toObject(BackupsLongTermRetentionRequest.class); - Assertions.assertEquals("seotgqrllt", model.backupSettings().backupName()); - Assertions.assertEquals("ubyyntw", model.targetDetails().sasUriList().get(0)); + Assertions.assertEquals("coebjvewzcj", model.backupSettings().backupName()); + Assertions.assertEquals("rjfut", model.targetDetails().sasUriList().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionResponsePropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionResponsePropertiesTests.java index a9b6ecfd14c3..7a9f27bd4b05 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionResponsePropertiesTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionResponsePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,16 +11,8 @@ public final class BackupsLongTermRetentionResponsePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BackupsLongTermRetentionResponseProperties model = BinaryData.fromString("{\"numberOfContainers\":1097302991}") + BackupsLongTermRetentionResponseProperties model = BinaryData.fromString("{\"numberOfContainers\":1109693907}") .toObject(BackupsLongTermRetentionResponseProperties.class); - Assertions.assertEquals(1097302991, model.numberOfContainers()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupsLongTermRetentionResponseProperties model - = new BackupsLongTermRetentionResponseProperties().withNumberOfContainers(1097302991); - model = BinaryData.fromObject(model).toObject(BackupsLongTermRetentionResponseProperties.class); - Assertions.assertEquals(1097302991, model.numberOfContainers()); + Assertions.assertEquals(1109693907, model.numberOfContainers()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionsCheckPrerequisitesWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionsCheckPrerequisitesWithResponseMockTests.java index 2aa46b41b80d..7567ef7c4793 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionsCheckPrerequisitesWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/BackupsLongTermRetentionsCheckPrerequisitesWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -22,7 +22,7 @@ public final class BackupsLongTermRetentionsCheckPrerequisitesWithResponseMockTests { @Test public void testCheckPrerequisitesWithResponse() throws Exception { - String responseStr = "{\"properties\":{\"numberOfContainers\":1706604371}}"; + String responseStr = "{\"properties\":{\"numberOfContainers\":1129614200}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,11 @@ public void testCheckPrerequisitesWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); LtrPreBackupResponse response = manager.backupsLongTermRetentions() - .checkPrerequisitesWithResponse("lrohkpig", "fusuckzmkwklsno", - new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("axmqeqal")), + .checkPrerequisitesWithResponse("vmribiat", "gplucfotangcfhny", + new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("zcugswvxwlmzqw")), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(1706604371, response.numberOfContainers()); + Assertions.assertEquals(1129614200, response.numberOfContainers()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationsListMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationsListMockTests.java index 20ccc42a3c6d..2afaf0d3a5b4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationsListMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByLocationsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -22,7 +22,7 @@ public final class CapabilitiesByLocationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"cbiqtgdqoh\",\"supportedServerEditions\":[{\"name\":\"ldrizetpwbra\",\"defaultSkuName\":\"libph\",\"supportedStorageEditions\":[{\"name\":\"izakak\",\"defaultStorageSizeMb\":2736442030278845624,\"supportedStorageMb\":[{},{}],\"status\":\"Available\",\"reason\":\"ha\"},{\"name\":\"ylhjlm\",\"defaultStorageSizeMb\":1077522990830391189,\"supportedStorageMb\":[{},{}],\"status\":\"Available\",\"reason\":\"sopteecj\"},{\"name\":\"islstv\",\"defaultStorageSizeMb\":2601870801725359637,\"supportedStorageMb\":[{}],\"status\":\"Visible\",\"reason\":\"umweoohguufuzboy\"}],\"supportedServerSkus\":[{\"name\":\"wtzolbaemwmdxmeb\",\"vCores\":8048243,\"supportedIops\":120953176,\"supportedMemoryPerVcoreMb\":4829986004787621888,\"supportedZones\":[\"veabfqxnmwmqtib\",\"yijddtvqcttad\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"sieekpndzaapm\",\"status\":\"Disabled\",\"reason\":\"eqw\"},{\"name\":\"pibudqwyxebeybpm\",\"vCores\":11524370,\"supportedIops\":1945693134,\"supportedMemoryPerVcoreMb\":7788648309029183931,\"supportedZones\":[\"itmhhei\",\"qaqhvseufu\",\"yrxpdlcgqls\",\"smjqfrddgam\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"uivfcdis\",\"status\":\"Available\",\"reason\":\"xzhczexrxz\"}],\"status\":\"Default\",\"reason\":\"trhqvw\"},{\"name\":\"vk\",\"defaultSkuName\":\"nlnzonzlrpi\",\"supportedStorageEditions\":[{\"name\":\"cvjtszcofiz\",\"defaultStorageSizeMb\":4146962922880294634,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Visible\",\"reason\":\"vreljea\"},{\"name\":\"rvzmlovuana\",\"defaultStorageSizeMb\":1138155605453758000,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Disabled\",\"reason\":\"rbdkelvidiz\"},{\"name\":\"sdbccxjmonfdgnwn\",\"defaultStorageSizeMb\":4527807456286813914,\"supportedStorageMb\":[{}],\"status\":\"Visible\",\"reason\":\"v\"},{\"name\":\"jctzenkei\",\"defaultStorageSizeMb\":3883485074610487115,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Visible\",\"reason\":\"vflyhbxcu\"}],\"supportedServerSkus\":[{\"name\":\"gsrboldforobw\",\"vCores\":2116230034,\"supportedIops\":447073477,\"supportedMemoryPerVcoreMb\":6875255372638477871,\"supportedZones\":[\"vvacqpb\",\"uodxesza\",\"belawumuaslzkwr\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"wyh\",\"status\":\"Disabled\",\"reason\":\"mdr\"},{\"name\":\"wuhpsvfuur\",\"vCores\":1702145471,\"supportedIops\":1783251204,\"supportedMemoryPerVcoreMb\":6951866972489132006,\"supportedZones\":[\"lniexz\",\"rzpgep\",\"tybbwwpgda\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"nrkcxkj\",\"status\":\"Visible\",\"reason\":\"mysu\"},{\"name\":\"wq\",\"vCores\":1550616862,\"supportedIops\":790882759,\"supportedMemoryPerVcoreMb\":7173540378190876196,\"supportedZones\":[\"ttexoqqpwcyyufmh\",\"uncuw\"],\"supportedHaMode\":[\"SameZone\",\"SameZone\"],\"supportedFeatures\":[{}],\"securityProfile\":\"zhlctddunqndyfpc\",\"status\":\"Visible\",\"reason\":\"njjrcgegydcwbox\"}],\"status\":\"Available\",\"reason\":\"qqoli\"},{\"name\":\"raiouaubrjtl\",\"defaultSkuName\":\"xfuojrn\",\"supportedStorageEditions\":[{\"name\":\"rzpasccbiuimzdly\",\"defaultStorageSizeMb\":2207814252603311282,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Default\",\"reason\":\"qufdvruzslzojh\"},{\"name\":\"tfnmdx\",\"defaultStorageSizeMb\":9149647349466202254,\"supportedStorageMb\":[{}],\"status\":\"Disabled\",\"reason\":\"eyzihgrky\"}],\"supportedServerSkus\":[{\"name\":\"bsnmfpph\",\"vCores\":917571686,\"supportedIops\":474168225,\"supportedMemoryPerVcoreMb\":3280820966134981534,\"supportedZones\":[\"gzfc\",\"bgomfgbegl\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\",\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"nlu\",\"status\":\"Available\",\"reason\":\"rfxeeebtij\"}],\"status\":\"Available\",\"reason\":\"bmqzbqqxlajrnwx\"},{\"name\":\"evehjkuyxoaf\",\"defaultSkuName\":\"oqltfae\",\"supportedStorageEditions\":[{\"name\":\"mfgvxirpghriypo\",\"defaultStorageSizeMb\":7116262338386252749,\"supportedStorageMb\":[{},{},{}],\"status\":\"Default\",\"reason\":\"prlpy\"},{\"name\":\"uciqdsme\",\"defaultStorageSizeMb\":4627205265824000180,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Default\",\"reason\":\"yasiibmiy\"},{\"name\":\"nustgnljh\",\"defaultStorageSizeMb\":430611531006551205,\"supportedStorageMb\":[{},{},{}],\"status\":\"Available\",\"reason\":\"vmqfoud\"}],\"supportedServerSkus\":[{\"name\":\"gyyprotwy\",\"vCores\":677853893,\"supportedIops\":915134983,\"supportedMemoryPerVcoreMb\":6016947306008941575,\"supportedZones\":[\"cmjkavlgorbmftpm\",\"tzfjltf\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{}],\"securityProfile\":\"tpvopvpbdb\",\"status\":\"Default\",\"reason\":\"q\"},{\"name\":\"edsvqwthmk\",\"vCores\":1468707412,\"supportedIops\":669264341,\"supportedMemoryPerVcoreMb\":4975334479567653005,\"supportedZones\":[\"qcwdhoh\",\"dtmcd\",\"sufco\",\"dxbzlmcmuap\"],\"supportedHaMode\":[\"SameZone\",\"SameZone\",\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"xeyskonqzinkfkbg\",\"status\":\"Available\",\"reason\":\"wxeqocljmygvkzqk\"},{\"name\":\"eokbze\",\"vCores\":50022372,\"supportedIops\":2083826558,\"supportedMemoryPerVcoreMb\":8813876269554898921,\"supportedZones\":[\"tleipqxbkw\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"d\",\"status\":\"Disabled\",\"reason\":\"q\"}],\"status\":\"Disabled\",\"reason\":\"awopqh\"}],\"supportedServerVersions\":[{\"name\":\"tmcg\",\"supportedVersionsToUpgrade\":[\"stzelndlatut\",\"zlbiojlvfhrbbpn\",\"qvcww\"],\"supportedFeatures\":[{\"name\":\"mochpprprsnmok\",\"status\":\"Enabled\"},{\"name\":\"jnhlbkpbzpcpiljh\",\"status\":\"Enabled\"},{\"name\":\"echndbnwieholew\",\"status\":\"Disabled\"}],\"status\":\"Available\",\"reason\":\"wefqsfapaqtferr\"},{\"name\":\"ex\",\"supportedVersionsToUpgrade\":[\"fxapjwogqqnobpu\",\"cdabtqwpwya\",\"bzasqbucljgkyexa\",\"guyaip\"],\"supportedFeatures\":[{\"name\":\"ault\",\"status\":\"Enabled\"},{\"name\":\"um\",\"status\":\"Enabled\"},{\"name\":\"z\",\"status\":\"Disabled\"}],\"status\":\"Visible\",\"reason\":\"jng\"},{\"name\":\"dqxtbjwgnyf\",\"supportedVersionsToUpgrade\":[\"zsvtuikzhajqgl\",\"fh\",\"l\"],\"supportedFeatures\":[{\"name\":\"xynqnz\",\"status\":\"Enabled\"},{\"name\":\"ovw\",\"status\":\"Disabled\"},{\"name\":\"tgoe\",\"status\":\"Enabled\"}],\"status\":\"Available\",\"reason\":\"pfhvfslk\"}],\"supportedFeatures\":[{\"name\":\"lrigjkskyri\",\"status\":\"Disabled\"},{\"name\":\"idsxwaabzmifry\",\"status\":\"Disabled\"},{\"name\":\"maxriz\",\"status\":\"Enabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"lhslnelxieixyn\",\"supportedSku\":\"xecwcro\",\"supportedStorageGb\":1356428247,\"supportedServerVersions\":\"lhc\",\"serverCount\":1923192565,\"status\":\"Default\",\"reason\":\"fdwfmvigorqj\"}],\"geoBackupSupported\":\"Enabled\",\"zoneRedundantHaSupported\":\"Enabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Enabled\",\"restricted\":\"Disabled\",\"status\":\"Visible\",\"reason\":\"juj\"}]}"; + = "{\"value\":[{\"name\":\"un\",\"supportedServerEditions\":[{\"name\":\"czvvit\",\"defaultSkuName\":\"gx\",\"supportedStorageEditions\":[{\"name\":\"serxht\",\"defaultStorageSizeMb\":5001400957863030853,\"supportedStorageMb\":[{},{},{}],\"status\":\"Visible\",\"reason\":\"sjgqrsxyp\"},{\"name\":\"uuybnchrsz\",\"defaultStorageSizeMb\":651317351695168525,\"supportedStorageMb\":[{},{},{}],\"status\":\"Available\",\"reason\":\"tn\"}],\"supportedServerSkus\":[{\"name\":\"qyggagfl\",\"vCores\":472068918,\"supportedIops\":1829348584,\"supportedMemoryPerVcoreMb\":5620660103328476240,\"supportedZones\":[\"jmucftby\",\"plrohkpigq\",\"usuckzmkwklsno\",\"axmqeqal\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"yynfsvkhgbv\",\"status\":\"Disabled\",\"reason\":\"arfdlpukhpyrnei\"}],\"status\":\"Disabled\",\"reason\":\"eogkhnmgbro\"},{\"name\":\"ddbhf\",\"defaultSkuName\":\"fpazjzoywjxhpd\",\"supportedStorageEditions\":[{\"name\":\"tacnpqwtehtuev\",\"defaultStorageSizeMb\":6535440745984953627,\"supportedStorageMb\":[{},{}],\"status\":\"Disabled\",\"reason\":\"wxhn\"},{\"name\":\"uug\",\"defaultStorageSizeMb\":5164563630289510273,\"supportedStorageMb\":[{},{},{}],\"status\":\"Default\",\"reason\":\"kfuarenlv\"}],\"supportedServerSkus\":[{\"name\":\"lnvnafvvkyfedev\",\"vCores\":972204015,\"supportedIops\":222208753,\"supportedMemoryPerVcoreMb\":4356166093987253792,\"supportedZones\":[\"okkhminq\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{}],\"securityProfile\":\"bdxxe\",\"status\":\"Disabled\",\"reason\":\"nvudbchaqdtvqecr\"},{\"name\":\"tmxxdtddmflhuy\",\"vCores\":297911426,\"supportedIops\":1148214254,\"supportedMemoryPerVcoreMb\":3117767040904980283,\"supportedZones\":[\"bannovvoxczytp\",\"wnwvroevytlyokr\",\"rouuxvnsasbcry\"],\"supportedHaMode\":[\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"klobdxnazpmk\",\"status\":\"Visible\",\"reason\":\"evfxzopjhbzxlioh\"},{\"name\":\"dd\",\"vCores\":255752990,\"supportedIops\":1848154538,\"supportedMemoryPerVcoreMb\":5352821957045618888,\"supportedZones\":[\"bbnz\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\",\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"yuicdhzbdy\",\"status\":\"Disabled\",\"reason\":\"bdvibidmhmwffpl\"},{\"name\":\"u\",\"vCores\":881600617,\"supportedIops\":65481812,\"supportedMemoryPerVcoreMb\":8872639253607342449,\"supportedZones\":[\"weyoxoy\"],\"supportedHaMode\":[\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"mmoiroqboshbra\",\"status\":\"Available\",\"reason\":\"yrmfsvbpav\"}],\"status\":\"Available\",\"reason\":\"ppdbwnupgahxkum\"},{\"name\":\"jcaacfdmmcpugm\",\"defaultSkuName\":\"qepvufhbzeh\",\"supportedStorageEditions\":[{\"name\":\"qhnlbqnbld\",\"defaultStorageSizeMb\":3824885841170020184,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Default\",\"reason\":\"orim\"},{\"name\":\"srrm\",\"defaultStorageSizeMb\":2486083532353292193,\"supportedStorageMb\":[{},{},{}],\"status\":\"Available\",\"reason\":\"uviyfcaabeo\"}],\"supportedServerSkus\":[{\"name\":\"lvbmxuqibsxtkcu\",\"vCores\":197421079,\"supportedIops\":1338254513,\"supportedMemoryPerVcoreMb\":2424147973889144435,\"supportedZones\":[\"owlkjxnqpv\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"SameZone\",\"SameZone\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"izmdksa\",\"status\":\"Available\",\"reason\":\"luqvoxmycjimryv\"}],\"status\":\"Visible\",\"reason\":\"wpbmzgwesydsxwef\"},{\"name\":\"ecb\",\"defaultSkuName\":\"pwndyqlea\",\"supportedStorageEditions\":[{\"name\":\"mtkhlowkxxpvbr\",\"defaultStorageSizeMb\":9054823478144085075,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Available\",\"reason\":\"hotlhikcyychunsj\"},{\"name\":\"jrtwsz\",\"defaultStorageSizeMb\":5032130100101663187,\"supportedStorageMb\":[{}],\"status\":\"Disabled\",\"reason\":\"trrmhwrb\"},{\"name\":\"pyf\",\"defaultStorageSizeMb\":7015052364013684166,\"supportedStorageMb\":[{}],\"status\":\"Default\",\"reason\":\"ocu\"}],\"supportedServerSkus\":[{\"name\":\"hhmemhooclutnp\",\"vCores\":705217940,\"supportedIops\":563116604,\"supportedMemoryPerVcoreMb\":1458732087320397006,\"supportedZones\":[\"ykyujxsg\",\"hsrrryejylmbkz\",\"dnigrfihot\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"jgnrefqyhqoto\",\"status\":\"Default\",\"reason\":\"akydiwfbrkwpz\"}],\"status\":\"Available\",\"reason\":\"hcspo\"}],\"supportedServerVersions\":[{\"name\":\"xsi\",\"supportedVersionsToUpgrade\":[\"tgbebj\",\"ulbmoichdlp\",\"fpubntnbatz\"],\"supportedFeatures\":[{\"name\":\"owsaaelcattcjuh\",\"status\":\"Disabled\"}],\"status\":\"Visible\",\"reason\":\"jcwmjvlgfggcvk\"},{\"name\":\"lizrzbjpsfxsfuz\",\"supportedVersionsToUpgrade\":[\"tmvag\",\"w\"],\"supportedFeatures\":[{\"name\":\"vhuk\",\"status\":\"Enabled\"}],\"status\":\"Visible\",\"reason\":\"zrvjfnmjmvlwyzgi\"},{\"name\":\"kujrllfojui\",\"supportedVersionsToUpgrade\":[\"uuyjucejikz\",\"eovvtzej\",\"tjklntikyjuzk\"],\"supportedFeatures\":[{\"name\":\"o\",\"status\":\"Enabled\"},{\"name\":\"vhqjwtrhtgvg\",\"status\":\"Enabled\"},{\"name\":\"rkolawjm\",\"status\":\"Disabled\"}],\"status\":\"Disabled\",\"reason\":\"kcdxfzzzw\"},{\"name\":\"afitlhguynuchlg\",\"supportedVersionsToUpgrade\":[\"xd\"],\"supportedFeatures\":[{\"name\":\"zusg\",\"status\":\"Enabled\"},{\"name\":\"snnjzfpafolpym\",\"status\":\"Enabled\"},{\"name\":\"qzr\",\"status\":\"Enabled\"},{\"name\":\"dphtv\",\"status\":\"Enabled\"}],\"status\":\"Available\",\"reason\":\"lejchcsr\"}],\"supportedFeatures\":[{\"name\":\"mzlanru\",\"status\":\"Enabled\"},{\"name\":\"nphcnzqtpjhmqrh\",\"status\":\"Enabled\"},{\"name\":\"aiwdcxsmlzzhz\",\"status\":\"Disabled\"},{\"name\":\"tlgy\",\"status\":\"Disabled\"}],\"fastProvisioningSupported\":\"Enabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"pxy\",\"supportedSku\":\"fiqgeaar\",\"supportedStorageGb\":1031040752,\"supportedServerVersions\":\"kglklbyulidwcw\",\"serverCount\":1795651624,\"status\":\"Visible\",\"reason\":\"o\"}],\"geoBackupSupported\":\"Enabled\",\"zoneRedundantHaSupported\":\"Disabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Enabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Enabled\",\"restricted\":\"Enabled\",\"status\":\"Disabled\",\"reason\":\"spzhzmtksjc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.capabilitiesByLocations().list("egprhptil", com.azure.core.util.Context.NONE); + = manager.capabilitiesByLocations().list("guaucmfdjwnla", com.azure.core.util.Context.NONE); - Assertions.assertEquals("cbiqtgdqoh", response.iterator().next().name()); + Assertions.assertEquals("un", response.iterator().next().name()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServersListMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServersListMockTests.java index c1dd72f96086..f8a2dbe06869 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServersListMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilitiesByServersListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -22,7 +22,7 @@ public final class CapabilitiesByServersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"clt\",\"supportedServerEditions\":[{\"name\":\"ex\",\"defaultSkuName\":\"lfmk\",\"supportedStorageEditions\":[{\"name\":\"zuawxtzxpuamwa\",\"defaultStorageSizeMb\":5681353698337068642,\"supportedStorageMb\":[{},{}],\"status\":\"Available\",\"reason\":\"hsphaivmxyas\"},{\"name\":\"vgsgzwywakoihkn\",\"defaultStorageSizeMb\":3757192969147775574,\"supportedStorageMb\":[{}],\"status\":\"Disabled\",\"reason\":\"lnymzotqy\"}],\"supportedServerSkus\":[{\"name\":\"cbm\",\"vCores\":1331204401,\"supportedIops\":351004258,\"supportedMemoryPerVcoreMb\":3776684670219420412,\"supportedZones\":[\"ayxonsupeujl\"],\"supportedHaMode\":[\"SameZone\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"ql\",\"status\":\"Available\",\"reason\":\"ibg\"},{\"name\":\"gnxf\",\"vCores\":570995057,\"supportedIops\":1604903119,\"supportedMemoryPerVcoreMb\":4786688185160172368,\"supportedZones\":[\"dofdbxiqx\",\"iiqbi\",\"htmwwinh\"],\"supportedHaMode\":[\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"vwbcblembnkbwv\",\"status\":\"Visible\",\"reason\":\"divqi\"}],\"status\":\"Visible\",\"reason\":\"tswbzuwfmd\"},{\"name\":\"agegiz\",\"defaultSkuName\":\"jfelisdjubggbqig\",\"supportedStorageEditions\":[{\"name\":\"sazgakgacyrcmj\",\"defaultStorageSizeMb\":3103718277552317709,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Visible\",\"reason\":\"uhrylniofr\"},{\"name\":\"bzjedmstk\",\"defaultStorageSizeMb\":110896961983578283,\"supportedStorageMb\":[{},{}],\"status\":\"Disabled\",\"reason\":\"iznk\"}],\"supportedServerSkus\":[{\"name\":\"nsnvpd\",\"vCores\":671836726,\"supportedIops\":115574776,\"supportedMemoryPerVcoreMb\":4456554415141615101,\"supportedZones\":[\"bkiw\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"fy\",\"status\":\"Default\",\"reason\":\"rpfbcunezz\"}],\"status\":\"Default\",\"reason\":\"lfwyfwlwxjwetn\"},{\"name\":\"ihclafzv\",\"defaultSkuName\":\"lpt\",\"supportedStorageEditions\":[{\"name\":\"wztcmwqkchc\",\"defaultStorageSizeMb\":4460871614096839788,\"supportedStorageMb\":[{},{},{}],\"status\":\"Default\",\"reason\":\"kjexfdeqvhp\"},{\"name\":\"lkkshkbffmbmx\",\"defaultStorageSizeMb\":6471426075457466306,\"supportedStorageMb\":[{}],\"status\":\"Disabled\",\"reason\":\"jx\"}],\"supportedServerSkus\":[{\"name\":\"fujg\",\"vCores\":1062138693,\"supportedIops\":1279529449,\"supportedMemoryPerVcoreMb\":6918440632186080085,\"supportedZones\":[\"aqutdewemxswvruu\",\"zzjgehkfki\",\"rtixokff\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"whixmonstsh\",\"status\":\"Disabled\",\"reason\":\"velfcldu\"},{\"name\":\"birdsvuwcobiegs\",\"vCores\":1923237132,\"supportedIops\":2099523600,\"supportedMemoryPerVcoreMb\":2784649228663949858,\"supportedZones\":[\"i\",\"nghgshej\",\"tbxqmuluxlxq\",\"vnersbycucrw\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{},{}],\"securityProfile\":\"rqbsmswziq\",\"status\":\"Visible\",\"reason\":\"okzrus\"},{\"name\":\"vhczznvfby\",\"vCores\":1906628483,\"supportedIops\":728305495,\"supportedMemoryPerVcoreMb\":2787720683354183168,\"supportedZones\":[\"vumwmxqh\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"sehaohdjhhflzok\",\"status\":\"Visible\",\"reason\":\"pelnjetag\"},{\"name\":\"sxoa\",\"vCores\":1674614666,\"supportedIops\":2037643049,\"supportedMemoryPerVcoreMb\":4444044351696890783,\"supportedZones\":[\"wvefloccsrmoz\",\"hmipgawtxxpkyjc\",\"cjxgrytf\",\"pcycilrmcaykg\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\",\"SameZone\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"sxwpndfcpfnznthj\",\"status\":\"Default\",\"reason\":\"aosrxuz\"}],\"status\":\"Disabled\",\"reason\":\"ktcqio\"}],\"supportedServerVersions\":[{\"name\":\"zah\",\"supportedVersionsToUpgrade\":[\"dl\",\"rtltla\"],\"supportedFeatures\":[{\"name\":\"zkatb\",\"status\":\"Disabled\"},{\"name\":\"nnbsoqeqa\",\"status\":\"Disabled\"},{\"name\":\"lagun\",\"status\":\"Enabled\"},{\"name\":\"ebwlnbmhyreeudzq\",\"status\":\"Disabled\"}],\"status\":\"Available\",\"reason\":\"mjxlyyzglgouw\"},{\"name\":\"mjjyuojq\",\"supportedVersionsToUpgrade\":[\"axkjeytunlbfjk\"],\"supportedFeatures\":[{\"name\":\"nkqbhsyrq\",\"status\":\"Enabled\"}],\"status\":\"Default\",\"reason\":\"enx\"},{\"name\":\"l\",\"supportedVersionsToUpgrade\":[\"kdk\",\"fmjnnawtqa\",\"pxuckpggq\",\"wey\"],\"supportedFeatures\":[{\"name\":\"lisn\",\"status\":\"Enabled\"},{\"name\":\"qqmpizruwnpqx\",\"status\":\"Disabled\"},{\"name\":\"fcngjsa\",\"status\":\"Enabled\"},{\"name\":\"xtmkzjvkviir\",\"status\":\"Disabled\"}],\"status\":\"Available\",\"reason\":\"sdp\"}],\"supportedFeatures\":[{\"name\":\"zvzbglbyv\",\"status\":\"Disabled\"}],\"fastProvisioningSupported\":\"Enabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"kjzwrgxf\",\"supportedSku\":\"shkwfbkgozxwopd\",\"supportedStorageGb\":1179999545,\"supportedServerVersions\":\"izqaclnapxbiyg\",\"serverCount\":966053961,\"status\":\"Disabled\",\"reason\":\"fsmfcttuxuuyi\"},{\"supportedTier\":\"lq\",\"supportedSku\":\"quvre\",\"supportedStorageGb\":2121197417,\"supportedServerVersions\":\"jhvsujztczyt\",\"serverCount\":178479099,\"status\":\"Visible\",\"reason\":\"uunfprnjletlxsm\"},{\"supportedTier\":\"ddoui\",\"supportedSku\":\"mowaziynknlqwzdv\",\"supportedStorageGb\":39952136,\"supportedServerVersions\":\"xqszdtmaajquh\",\"serverCount\":578758071,\"status\":\"Disabled\",\"reason\":\"vmtygj\"},{\"supportedTier\":\"zyos\",\"supportedSku\":\"p\",\"supportedStorageGb\":26175151,\"supportedServerVersions\":\"fkyjpmspbpssdfpp\",\"serverCount\":386298045,\"status\":\"Available\",\"reason\":\"yujtvczkcnyx\"}],\"geoBackupSupported\":\"Disabled\",\"zoneRedundantHaSupported\":\"Disabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Enabled\",\"storageAutoGrowthSupported\":\"Enabled\",\"onlineResizeSupported\":\"Enabled\",\"restricted\":\"Enabled\",\"status\":\"Visible\",\"reason\":\"xpaglqivbgkc\"}]}"; + = "{\"value\":[{\"name\":\"inljqepqwhixmo\",\"supportedServerEditions\":[{\"name\":\"hiyxgvelfclduc\",\"defaultSkuName\":\"irdsvuwcob\",\"supportedStorageEditions\":[{\"name\":\"tmninw\",\"defaultStorageSizeMb\":9022679316760749990,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Disabled\",\"reason\":\"gshejjtbxqmulux\"},{\"name\":\"qzvnersbycucr\",\"defaultStorageSizeMb\":4313993225236997368,\"supportedStorageMb\":[{},{},{}],\"status\":\"Disabled\",\"reason\":\"rqbsmswziq\"},{\"name\":\"uhok\",\"defaultStorageSizeMb\":8103562899959904004,\"supportedStorageMb\":[{},{}],\"status\":\"Available\",\"reason\":\"zznvfbyc\"},{\"name\":\"xjww\",\"defaultStorageSizeMb\":794565730593140555,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Disabled\",\"reason\":\"qhndvnoam\"}],\"supportedServerSkus\":[{\"name\":\"haohdjhhflzokxc\",\"vCores\":94741475,\"supportedIops\":220709617,\"supportedMemoryPerVcoreMb\":5958311403338730339,\"supportedZones\":[\"gltsxoat\",\"tgzpnpb\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\",\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{}],\"securityProfile\":\"rmozihmipgawt\",\"status\":\"Disabled\",\"reason\":\"y\"},{\"name\":\"xcjxgrytfmpcy\",\"vCores\":1979879685,\"supportedIops\":1106517654,\"supportedMemoryPerVcoreMb\":659478827292314568,\"supportedZones\":[\"gnoxuztrksx\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"nznthjtw\",\"status\":\"Available\",\"reason\":\"srxuzvoam\"},{\"name\":\"cqiosmgbza\",\"vCores\":1221237045,\"supportedIops\":348009513,\"supportedMemoryPerVcoreMb\":7353682627301565777,\"supportedZones\":[\"tlaprltzkatb\",\"jm\",\"nnbsoqeqa\",\"arvlagunbt\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\",\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"yreeudz\",\"status\":\"Disabled\",\"reason\":\"pdqmjxlyyzglgouw\"},{\"name\":\"mjjyuojq\",\"vCores\":816836256,\"supportedIops\":856009937,\"supportedMemoryPerVcoreMb\":287770145708812927,\"supportedZones\":[\"unlbfjkwr\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{}],\"securityProfile\":\"rqunjq\",\"status\":\"Visible\",\"reason\":\"xaulkpakdkifmjnn\"}],\"status\":\"Default\",\"reason\":\"abpxuc\"}],\"supportedServerVersions\":[{\"name\":\"qoweyirdhl\",\"supportedVersionsToUpgrade\":[\"gwflq\",\"mpizru\",\"n\",\"qxpxiwfcngjsaa\"],\"supportedFeatures\":[{\"name\":\"tmkzjvkviirhgfgr\",\"status\":\"Enabled\"},{\"name\":\"gratzvzbglbyvict\",\"status\":\"Enabled\"},{\"name\":\"xkjzwrgxffm\",\"status\":\"Enabled\"},{\"name\":\"fbkgozxwopdby\",\"status\":\"Disabled\"}],\"status\":\"Default\",\"reason\":\"clnapxbiygnugjkn\"},{\"name\":\"mfcttux\",\"supportedVersionsToUpgrade\":[\"i\",\"flqo\",\"quvre\",\"mrnjh\"],\"supportedFeatures\":[{\"name\":\"ztczytq\",\"status\":\"Enabled\"},{\"name\":\"auunfprnjletlx\",\"status\":\"Disabled\"}],\"status\":\"Available\",\"reason\":\"ou\"}],\"supportedFeatures\":[{\"name\":\"owa\",\"status\":\"Enabled\"},{\"name\":\"knlqwzdvpiwhxqsz\",\"status\":\"Disabled\"},{\"name\":\"ajquhuxylrjvmtyg\",\"status\":\"Disabled\"},{\"name\":\"yospspshc\",\"status\":\"Disabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"pbpssdfpp\",\"supportedSku\":\"gt\",\"supportedStorageGb\":857144221,\"supportedServerVersions\":\"jtvczkcnyxrxmun\",\"serverCount\":630868038,\"status\":\"Default\",\"reason\":\"nkvxlxpaglqi\"},{\"supportedTier\":\"gkcvkhpzvuq\",\"supportedSku\":\"lvoniy\",\"supportedStorageGb\":1712367838,\"supportedServerVersions\":\"bcpzgpxtivh\",\"serverCount\":281745669,\"status\":\"Disabled\",\"reason\":\"bgqjxgpnrhgo\"},{\"supportedTier\":\"gpikqmh\",\"supportedSku\":\"owjrmzvuporqz\",\"supportedStorageGb\":1356794202,\"supportedServerVersions\":\"dzvkfvxcnqmxq\",\"serverCount\":714588328,\"status\":\"Available\",\"reason\":\"vkhlggdhbemz\"}],\"geoBackupSupported\":\"Disabled\",\"zoneRedundantHaSupported\":\"Enabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Enabled\",\"onlineResizeSupported\":\"Disabled\",\"restricted\":\"Disabled\",\"status\":\"Available\",\"reason\":\"jfpgpicrmn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.capabilitiesByServers().list("ickpz", "cpopmxel", com.azure.core.util.Context.NONE); + PagedIterable response = manager.capabilitiesByServers() + .list("wemxswvruunzz", "gehkfkimrtixokff", com.azure.core.util.Context.NONE); - Assertions.assertEquals("clt", response.iterator().next().name()); + Assertions.assertEquals("inljqepqwhixmo", response.iterator().next().name()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityBaseTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityBaseTests.java index 95ea79ceb249..a843a7b70759 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityBaseTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -10,13 +10,7 @@ public final class CapabilityBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CapabilityBase model = BinaryData.fromString("{\"status\":\"Disabled\",\"reason\":\"twrupqsxvnm\"}") + CapabilityBase model = BinaryData.fromString("{\"status\":\"Disabled\",\"reason\":\"ygvjayvblmh\"}") .toObject(CapabilityBase.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapabilityBase model = new CapabilityBase(); - model = BinaryData.fromObject(model).toObject(CapabilityBase.class); - } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityInnerTests.java index 4103f11972d9..7a06375d8f18 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,15 +12,8 @@ public final class CapabilityInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityInner model = BinaryData.fromString( - "{\"name\":\"fqpte\",\"supportedServerEditions\":[{\"name\":\"vypyqrimzinpv\",\"defaultSkuName\":\"jdkirsoodqx\",\"supportedStorageEditions\":[{\"name\":\"nohjt\",\"defaultStorageSizeMb\":2935021461506555781,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Disabled\",\"reason\":\"iy\"},{\"name\":\"jxsqwpgrjbz\",\"defaultStorageSizeMb\":6117195169735305207,\"supportedStorageMb\":[{}],\"status\":\"Visible\",\"reason\":\"byxqabn\"}],\"supportedServerSkus\":[{\"name\":\"cyshurzafbljjgp\",\"vCores\":293333183,\"supportedIops\":71717444,\"supportedMemoryPerVcoreMb\":7458924632572162672,\"supportedZones\":[\"a\",\"bqidtqaj\",\"yulpkudjkr\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"pgzgq\",\"status\":\"Visible\",\"reason\":\"ocxscpaierhhbcs\"}],\"status\":\"Default\",\"reason\":\"majtjaod\"},{\"name\":\"bnbdxkqpxokajion\",\"defaultSkuName\":\"mexgstxgcp\",\"supportedStorageEditions\":[{\"name\":\"aajrm\",\"defaultStorageSizeMb\":5608732709320879366,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Disabled\",\"reason\":\"mcl\"},{\"name\":\"ijcoejctb\",\"defaultStorageSizeMb\":4652283960591475965,\"supportedStorageMb\":[{},{}],\"status\":\"Available\",\"reason\":\"kbfkg\"}],\"supportedServerSkus\":[{\"name\":\"exxppofmxaxcfjp\",\"vCores\":1240813814,\"supportedIops\":1410609059,\"supportedMemoryPerVcoreMb\":8556120198731757598,\"supportedZones\":[\"vpmouexhdzxib\",\"eojnxqbzvddn\"],\"supportedHaMode\":[\"SameZone\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"btwnpzaoqvuhrhcf\",\"status\":\"Visible\",\"reason\":\"dglmjthjqkwp\"},{\"name\":\"icxm\",\"vCores\":1686193188,\"supportedIops\":102046613,\"supportedMemoryPerVcoreMb\":3455031391724056303,\"supportedZones\":[\"xuigdtopbobj\",\"ghmewuam\",\"uhrzayvvt\",\"gvdfgiotkftutq\"],\"supportedHaMode\":[\"SameZone\",\"SameZone\",\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{}],\"securityProfile\":\"gnxkrxdqmidtth\",\"status\":\"Available\",\"reason\":\"drabhjybige\"},{\"name\":\"qfbow\",\"vCores\":1200482188,\"supportedIops\":974943815,\"supportedMemoryPerVcoreMb\":6101929070226653978,\"supportedZones\":[\"u\",\"y\",\"gqywgndrv\"],\"supportedHaMode\":[\"SameZone\",\"SameZone\",\"SameZone\",\"SameZone\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"gyncocpecfvmmc\",\"status\":\"Disabled\",\"reason\":\"xlzevgbmqjqabcy\"}],\"status\":\"Disabled\",\"reason\":\"kwlzuvccfwnfn\"},{\"name\":\"cfionl\",\"defaultSkuName\":\"x\",\"supportedStorageEditions\":[{\"name\":\"tzxdpnqbqqwx\",\"defaultStorageSizeMb\":83601086548866102,\"supportedStorageMb\":[{},{}],\"status\":\"Default\",\"reason\":\"sub\"}],\"supportedServerSkus\":[{\"name\":\"ampmngnz\",\"vCores\":1460212605,\"supportedIops\":431293436,\"supportedMemoryPerVcoreMb\":4377641915122156936,\"supportedZones\":[\"cbonqvpk\",\"lrxnjeaseiphe\",\"f\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"nj\",\"status\":\"Default\",\"reason\":\"tgrhpdjpjumas\"},{\"name\":\"zj\",\"vCores\":1063088657,\"supportedIops\":973371108,\"supportedMemoryPerVcoreMb\":5443053800820392121,\"supportedZones\":[\"xxhejjzzvd\"],\"supportedHaMode\":[\"SameZone\",\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"otwmcyn\",\"status\":\"Disabled\",\"reason\":\"jnpg\"}],\"status\":\"Disabled\",\"reason\":\"adehxnltyfsopp\"},{\"name\":\"uesnzwdejbavo\",\"defaultSkuName\":\"zdmohctbqvu\",\"supportedStorageEditions\":[{\"name\":\"ndnvo\",\"defaultStorageSizeMb\":4292877192766299113,\"supportedStorageMb\":[{}],\"status\":\"Default\",\"reason\":\"kcglhslaz\"}],\"supportedServerSkus\":[{\"name\":\"gdtjixhbkuofqwey\",\"vCores\":1047075786,\"supportedIops\":31402912,\"supportedMemoryPerVcoreMb\":7006208031114197055,\"supportedZones\":[\"xfw\",\"ybcibvyvdcsit\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{},{}],\"securityProfile\":\"ctehfiqscjey\",\"status\":\"Available\",\"reason\":\"zrkgqhcjrefovg\"},{\"name\":\"qsl\",\"vCores\":1641560645,\"supportedIops\":1069395538,\"supportedMemoryPerVcoreMb\":7599917226673683957,\"supportedZones\":[\"cattpngjcrcczsq\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{}],\"securityProfile\":\"ysou\",\"status\":\"Visible\",\"reason\":\"a\"},{\"name\":\"ae\",\"vCores\":1901274446,\"supportedIops\":1111397810,\"supportedMemoryPerVcoreMb\":9024707891893513418,\"supportedZones\":[\"mopjmc\",\"atuokthfuiu\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\",\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{},{}],\"securityProfile\":\"odpuozmyzydag\",\"status\":\"Default\",\"reason\":\"bezy\"}],\"status\":\"Default\",\"reason\":\"ktwh\"}],\"supportedServerVersions\":[{\"name\":\"zywqsmbsu\",\"supportedVersionsToUpgrade\":[\"imoryocfsfksym\"],\"supportedFeatures\":[{\"name\":\"tki\",\"status\":\"Disabled\"}],\"status\":\"Visible\",\"reason\":\"udxorrqn\"}],\"supportedFeatures\":[{\"name\":\"zvyifqrvkdvj\",\"status\":\"Enabled\"},{\"name\":\"mvvd\",\"status\":\"Enabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"ulexxbczwtr\",\"supportedSku\":\"iqzbq\",\"supportedStorageGb\":1378529430,\"supportedServerVersions\":\"vmyokacspkwl\",\"serverCount\":1196709774,\"status\":\"Available\",\"reason\":\"xjmflbvv\"}],\"geoBackupSupported\":\"Enabled\",\"zoneRedundantHaSupported\":\"Disabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Disabled\",\"restricted\":\"Disabled\",\"status\":\"Visible\",\"reason\":\"rsa\"}") + "{\"name\":\"durgkakmokz\",\"supportedServerEditions\":[{\"name\":\"lffhmouwqlg\",\"defaultSkuName\":\"fzeeyebizik\",\"supportedStorageEditions\":[{\"name\":\"qlbjbsybbqwrvt\",\"defaultStorageSizeMb\":8237830073363773936,\"supportedStorageMb\":[{},{},{},{}],\"status\":\"Visible\",\"reason\":\"pip\"},{\"name\":\"ltha\",\"defaultStorageSizeMb\":768699206851816710,\"supportedStorageMb\":[{},{},{}],\"status\":\"Visible\",\"reason\":\"wbdsr\"},{\"name\":\"pdrhne\",\"defaultStorageSizeMb\":3198347266673027545,\"supportedStorageMb\":[{}],\"status\":\"Visible\",\"reason\":\"t\"},{\"name\":\"ib\",\"defaultStorageSizeMb\":4920144220560546408,\"supportedStorageMb\":[{},{},{}],\"status\":\"Disabled\",\"reason\":\"imejzanl\"}],\"supportedServerSkus\":[{\"name\":\"av\",\"vCores\":1513194356,\"supportedIops\":944928815,\"supportedMemoryPerVcoreMb\":1686911482668647477,\"supportedZones\":[\"rjqc\",\"rgz\",\"frl\",\"zszrnwoiindfpw\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\",\"ZoneRedundant\",\"SameZone\"],\"supportedFeatures\":[{}],\"securityProfile\":\"lsj\",\"status\":\"Available\",\"reason\":\"zfjvfbgofe\"}],\"status\":\"Visible\",\"reason\":\"rqmq\"}],\"supportedServerVersions\":[{\"name\":\"riiiojnalghfkv\",\"supportedVersionsToUpgrade\":[\"ex\",\"owueluqh\"],\"supportedFeatures\":[{\"name\":\"xvrhmzkwp\",\"status\":\"Enabled\"},{\"name\":\"spughftqsxhq\",\"status\":\"Enabled\"},{\"name\":\"ukndxdigrjgu\",\"status\":\"Disabled\"}],\"status\":\"Available\",\"reason\":\"yqtfihwh\"},{\"name\":\"tzingamvpph\",\"supportedVersionsToUpgrade\":[\"qzudphq\",\"mvdk\"],\"supportedFeatures\":[{\"name\":\"wcvtbvkayhmtnvyq\",\"status\":\"Disabled\"},{\"name\":\"zwpcnpwzcjaesg\",\"status\":\"Disabled\"}],\"status\":\"Available\",\"reason\":\"ajguqf\"},{\"name\":\"ygz\",\"supportedVersionsToUpgrade\":[\"nk\",\"xu\"],\"supportedFeatures\":[{\"name\":\"wzrmuh\",\"status\":\"Enabled\"},{\"name\":\"qdpsqxqvpsvu\",\"status\":\"Disabled\"},{\"name\":\"ccelve\",\"status\":\"Enabled\"},{\"name\":\"qlmfeoker\",\"status\":\"Disabled\"}],\"status\":\"Default\",\"reason\":\"ob\"}],\"supportedFeatures\":[{\"name\":\"edkowepbqpcrfk\",\"status\":\"Disabled\"},{\"name\":\"snjvcdwxlpqekftn\",\"status\":\"Enabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"gwfqatmt\",\"supportedSku\":\"tmdvypgikdgs\",\"supportedStorageGb\":35154388,\"supportedServerVersions\":\"birryuzhl\",\"serverCount\":632633713,\"status\":\"Available\",\"reason\":\"vqqaatjinrvgo\"}],\"geoBackupSupported\":\"Disabled\",\"zoneRedundantHaSupported\":\"Enabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Disabled\",\"restricted\":\"Enabled\",\"status\":\"Default\",\"reason\":\"rwxkvtkkgl\"}") .toObject(CapabilityInner.class); - Assertions.assertEquals("fqpte", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapabilityInner model = new CapabilityInner().withName("fqpte"); - model = BinaryData.fromObject(model).toObject(CapabilityInner.class); - Assertions.assertEquals("fqpte", model.name()); + Assertions.assertEquals("durgkakmokz", model.name()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityListTests.java index 07d2729a2717..6eebed15037e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityListTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapabilityListTests.java @@ -1,26 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CapabilityList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.CapabilityList; import org.junit.jupiter.api.Assertions; public final class CapabilityListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapabilityList model = BinaryData.fromString( - "{\"value\":[{\"name\":\"wzo\",\"supportedServerEditions\":[{\"name\":\"felluwfzitonpe\",\"defaultSkuName\":\"pjkjlxofpdv\",\"supportedStorageEditions\":[{},{},{},{}],\"supportedServerSkus\":[{},{},{},{}],\"status\":\"Visible\",\"reason\":\"ninmayhuyb\"}],\"supportedServerVersions\":[{\"name\":\"depoog\",\"supportedVersionsToUpgrade\":[\"vamih\",\"ognarxzxtheotus\",\"vyevcciqi\",\"nhungbw\"],\"supportedFeatures\":[{},{},{}],\"status\":\"Disabled\",\"reason\":\"gxg\"},{\"name\":\"pemvtzfkufubljof\",\"supportedVersionsToUpgrade\":[\"ofjaeqjhqjb\",\"s\",\"msmjqulngsntn\"],\"supportedFeatures\":[{},{},{}],\"status\":\"Available\",\"reason\":\"cwrwclxxwrljdous\"}],\"supportedFeatures\":[{\"name\":\"kocrcjdkwtnhx\",\"status\":\"Disabled\"},{\"name\":\"iksqr\",\"status\":\"Disabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"p\",\"supportedSku\":\"nzl\",\"supportedStorageGb\":1104675227,\"supportedServerVersions\":\"ppeebvmgxsab\",\"serverCount\":1248526317,\"status\":\"Available\",\"reason\":\"jitcjczdzevn\"},{\"supportedTier\":\"krwpdap\",\"supportedSku\":\"sbdkvwr\",\"supportedStorageGb\":1914162243,\"supportedServerVersions\":\"usnhutje\",\"serverCount\":1438650135,\"status\":\"Disabled\",\"reason\":\"hugjzzdatqxhoc\"},{\"supportedTier\":\"eablg\",\"supportedSku\":\"uticndvkaozwyif\",\"supportedStorageGb\":655079148,\"supportedServerVersions\":\"hurokftyxoln\",\"serverCount\":1438714337,\"status\":\"Available\",\"reason\":\"kjfkg\"},{\"supportedTier\":\"w\",\"supportedSku\":\"lryplwckbasyy\",\"supportedStorageGb\":893627335,\"supportedServerVersions\":\"hsgcbacphejkot\",\"serverCount\":2116203102,\"status\":\"Default\",\"reason\":\"l\"}],\"geoBackupSupported\":\"Disabled\",\"zoneRedundantHaSupported\":\"Enabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Enabled\",\"restricted\":\"Enabled\",\"status\":\"Available\",\"reason\":\"adgakeqsrxybz\"},{\"name\":\"e\",\"supportedServerEditions\":[{\"name\":\"bciqfouflm\",\"defaultSkuName\":\"kzsmodm\",\"supportedStorageEditions\":[{},{}],\"supportedServerSkus\":[{},{},{}],\"status\":\"Visible\",\"reason\":\"wtmutduq\"}],\"supportedServerVersions\":[{\"name\":\"spwgcuertumkdosv\",\"supportedVersionsToUpgrade\":[\"bmdg\",\"bjf\",\"dgmb\"],\"supportedFeatures\":[{}],\"status\":\"Default\",\"reason\":\"bhtqqrolfpfpsa\"}],\"supportedFeatures\":[{\"name\":\"uxig\",\"status\":\"Disabled\"},{\"name\":\"zjaoyfhrtxil\",\"status\":\"Enabled\"}],\"fastProvisioningSupported\":\"Enabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"vlejuvfqa\",\"supportedSku\":\"lyxwjkcprbnwbx\",\"supportedStorageGb\":590807378,\"supportedServerVersions\":\"bvpyss\",\"serverCount\":881911115,\"status\":\"Visible\",\"reason\":\"qguhmuo\"},{\"supportedTier\":\"f\",\"supportedSku\":\"wzwbnguitn\",\"supportedStorageGb\":1661646001,\"supportedServerVersions\":\"gazxuf\",\"serverCount\":1325323583,\"status\":\"Visible\",\"reason\":\"fihrfi\"},{\"supportedTier\":\"vzwdzuhtymwis\",\"supportedSku\":\"fthwxmnteiwa\",\"supportedStorageGb\":1147717382,\"supportedServerVersions\":\"mijcmmxdcufufs\",\"serverCount\":1460749034,\"status\":\"Disabled\",\"reason\":\"dnsezcxtbzs\"}],\"geoBackupSupported\":\"Enabled\",\"zoneRedundantHaSupported\":\"Enabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Disabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Disabled\",\"restricted\":\"Enabled\",\"status\":\"Disabled\",\"reason\":\"ac\"}],\"nextLink\":\"oosflnr\"}") + "{\"value\":[{\"name\":\"eae\",\"supportedServerEditions\":[{\"name\":\"fatkld\",\"defaultSkuName\":\"bjhwuaan\",\"supportedStorageEditions\":[{}],\"supportedServerSkus\":[{},{},{},{}],\"status\":\"Available\",\"reason\":\"oulpjrv\"},{\"name\":\"glrvimjwosytxi\",\"defaultSkuName\":\"skfc\",\"supportedStorageEditions\":[{},{}],\"supportedServerSkus\":[{},{},{},{}],\"status\":\"Disabled\",\"reason\":\"ke\"}],\"supportedServerVersions\":[{\"name\":\"hlyfjhdgqgg\",\"supportedVersionsToUpgrade\":[\"unygaeqid\",\"qfatpxllrxcyjm\"],\"supportedFeatures\":[{},{},{},{}],\"status\":\"Disabled\",\"reason\":\"arm\"}],\"supportedFeatures\":[{\"name\":\"jsjqbjhhyx\",\"status\":\"Disabled\"},{\"name\":\"yc\",\"status\":\"Disabled\"}],\"fastProvisioningSupported\":\"Enabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"gymare\",\"supportedSku\":\"ajxq\",\"supportedStorageGb\":1691251601,\"supportedServerVersions\":\"ky\",\"serverCount\":314169873,\"status\":\"Visible\",\"reason\":\"gssofwq\"},{\"supportedTier\":\"qal\",\"supportedSku\":\"mnjijpxacqqudf\",\"supportedStorageGb\":1238431927,\"supportedServerVersions\":\"baaa\",\"serverCount\":745184435,\"status\":\"Available\",\"reason\":\"ffimrzrtuzqogsex\"},{\"supportedTier\":\"vfdnwnwmewzsyyce\",\"supportedSku\":\"soibjudpfrx\",\"supportedStorageGb\":1839855586,\"supportedServerVersions\":\"zvaytdwkqbr\",\"serverCount\":1725477484,\"status\":\"Default\",\"reason\":\"h\"},{\"supportedTier\":\"iilivpdtiirqtd\",\"supportedSku\":\"axoruzfgsquy\",\"supportedStorageGb\":1122552127,\"supportedServerVersions\":\"xleptramx\",\"serverCount\":726747953,\"status\":\"Disabled\",\"reason\":\"nwxuqlcvydyp\"}],\"geoBackupSupported\":\"Disabled\",\"zoneRedundantHaSupported\":\"Enabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Enabled\",\"storageAutoGrowthSupported\":\"Enabled\",\"onlineResizeSupported\":\"Disabled\",\"restricted\":\"Disabled\",\"status\":\"Visible\",\"reason\":\"ebwnujhe\"},{\"name\":\"sbvdkcrodtjinfw\",\"supportedServerEditions\":[{\"name\":\"tkacj\",\"defaultSkuName\":\"f\",\"supportedStorageEditions\":[{},{}],\"supportedServerSkus\":[{},{},{}],\"status\":\"Available\",\"reason\":\"gkfpaga\"},{\"name\":\"pulpqblylsyxk\",\"defaultSkuName\":\"nsj\",\"supportedStorageEditions\":[{}],\"supportedServerSkus\":[{},{},{},{}],\"status\":\"Available\",\"reason\":\"sdszue\"}],\"supportedServerVersions\":[{\"name\":\"zkfzbeyv\",\"supportedVersionsToUpgrade\":[\"icvi\"],\"supportedFeatures\":[{}],\"status\":\"Default\",\"reason\":\"dxrbuukzcle\"},{\"name\":\"hmlwpaztzpo\",\"supportedVersionsToUpgrade\":[\"ckw\",\"fz\",\"whxxbuyqax\",\"feqztppriol\"],\"supportedFeatures\":[{},{},{}],\"status\":\"Available\",\"reason\":\"tolmncwsobqw\"}],\"supportedFeatures\":[{\"name\":\"nwdcfhu\",\"status\":\"Enabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"lsbjjcanvxbv\",\"supportedSku\":\"udutnco\",\"supportedStorageGb\":175295404,\"supportedServerVersions\":\"xqtvcofu\",\"serverCount\":1364369199,\"status\":\"Disabled\",\"reason\":\"jub\"},{\"supportedTier\":\"knnqvsaznq\",\"supportedSku\":\"orudsgsa\",\"supportedStorageGb\":220532000,\"supportedServerVersions\":\"c\",\"serverCount\":698533794,\"status\":\"Visible\",\"reason\":\"uetae\"},{\"supportedTier\":\"ruvdmov\",\"supportedSku\":\"zlxwabmqoefkifr\",\"supportedStorageGb\":1599154818,\"supportedServerVersions\":\"qujmqlgkf\",\"serverCount\":633077471,\"status\":\"Available\",\"reason\":\"ongbjcnt\"}],\"geoBackupSupported\":\"Enabled\",\"zoneRedundantHaSupported\":\"Enabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Enabled\",\"storageAutoGrowthSupported\":\"Disabled\",\"onlineResizeSupported\":\"Enabled\",\"restricted\":\"Enabled\",\"status\":\"Visible\",\"reason\":\"ojvdcpzfoqo\"},{\"name\":\"cybxa\",\"supportedServerEditions\":[{\"name\":\"zuf\",\"defaultSkuName\":\"ciqopidoa\",\"supportedStorageEditions\":[{},{},{},{}],\"supportedServerSkus\":[{},{}],\"status\":\"Disabled\",\"reason\":\"azxkhnzbonlwnto\"},{\"name\":\"okdwb\",\"defaultSkuName\":\"kszzcmrvexztv\",\"supportedStorageEditions\":[{},{},{},{}],\"supportedServerSkus\":[{},{},{}],\"status\":\"Visible\",\"reason\":\"oyzko\"},{\"name\":\"tlmngu\",\"defaultSkuName\":\"wqaldsyu\",\"supportedStorageEditions\":[{},{},{},{}],\"supportedServerSkus\":[{}],\"status\":\"Available\",\"reason\":\"obwyznkb\"},{\"name\":\"utwpfhp\",\"defaultSkuName\":\"m\",\"supportedStorageEditions\":[{},{},{},{}],\"supportedServerSkus\":[{},{},{},{}],\"status\":\"Visible\",\"reason\":\"dsdoakgtdlmkk\"}],\"supportedServerVersions\":[{\"name\":\"l\",\"supportedVersionsToUpgrade\":[\"pusdstt\",\"vogvbbejdcngqqmo\",\"kufgmj\",\"rwr\"],\"supportedFeatures\":[{},{},{}],\"status\":\"Visible\",\"reason\":\"enuuzkopbm\"},{\"name\":\"rfdwoyu\",\"supportedVersionsToUpgrade\":[\"iuiefozbhdmsm\",\"mzqhoftrmaequi\",\"hxicslfaoqz\"],\"supportedFeatures\":[{},{},{},{}],\"status\":\"Available\",\"reason\":\"alnswhccsphk\"},{\"name\":\"vwitqscyw\",\"supportedVersionsToUpgrade\":[\"woluhczbwemhair\"],\"supportedFeatures\":[{},{},{}],\"status\":\"Visible\",\"reason\":\"wmsweypqwd\"},{\"name\":\"gicccnxqhuex\",\"supportedVersionsToUpgrade\":[\"tlstvlzywem\",\"zrncsdt\",\"lusiy\",\"bsfgytguslfea\"],\"supportedFeatures\":[{},{},{}],\"status\":\"Default\",\"reason\":\"kyhejhzisxgf\"}],\"supportedFeatures\":[{\"name\":\"lppvksrpq\",\"status\":\"Disabled\"}],\"fastProvisioningSupported\":\"Disabled\",\"supportedFastProvisioningEditions\":[{\"supportedTier\":\"twdw\",\"supportedSku\":\"tswiby\",\"supportedStorageGb\":403427600,\"supportedServerVersions\":\"bhshfwpracstwity\",\"serverCount\":56359046,\"status\":\"Disabled\",\"reason\":\"cedcpnmdy\"},{\"supportedTier\":\"nwzxltjcv\",\"supportedSku\":\"ltiugcxnavv\",\"supportedStorageGb\":836619519,\"supportedServerVersions\":\"byqunyow\",\"serverCount\":1905526604,\"status\":\"Disabled\",\"reason\":\"rkvfgbvfvpdbo\"},{\"supportedTier\":\"cizsjqlhkrribdei\",\"supportedSku\":\"ipqkghvxndzwm\",\"supportedStorageGb\":1472757866,\"supportedServerVersions\":\"ajpjo\",\"serverCount\":1325211412,\"status\":\"Default\",\"reason\":\"hgbijt\"}],\"geoBackupSupported\":\"Enabled\",\"zoneRedundantHaSupported\":\"Enabled\",\"zoneRedundantHaAndGeoBackupSupported\":\"Enabled\",\"storageAutoGrowthSupported\":\"Enabled\",\"onlineResizeSupported\":\"Disabled\",\"restricted\":\"Disabled\",\"status\":\"Default\",\"reason\":\"awfsdjpvkvpbjxbk\"}],\"nextLink\":\"zkdvncja\"}") .toObject(CapabilityList.class); - Assertions.assertEquals("oosflnr", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapabilityList model = new CapabilityList().withNextLink("oosflnr"); - model = BinaryData.fromObject(model).toObject(CapabilityList.class); - Assertions.assertEquals("oosflnr", model.nextLink()); + Assertions.assertEquals("zkdvncja", model.nextLink()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogInnerTests.java index 6b7ceff8fb4f..d5c189a84dfa 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,27 +13,12 @@ public final class CapturedLogInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapturedLogInner model = BinaryData.fromString( - "{\"properties\":{\"createdTime\":\"2021-03-18T11:55:12Z\",\"lastModifiedTime\":\"2021-03-31T11:05:30Z\",\"sizeInKb\":2907518339137583712,\"type\":\"vmeueci\",\"url\":\"hzceuojgjrwjue\"},\"id\":\"twm\",\"name\":\"dytdxwitx\",\"type\":\"rjaw\"}") + "{\"properties\":{\"createdTime\":\"2021-07-10T14:18:40Z\",\"lastModifiedTime\":\"2021-08-09T02:09:02Z\",\"sizeInKb\":1034609439766827467,\"type\":\"bskhudygoookkqfq\",\"url\":\"vleo\"},\"id\":\"ml\",\"name\":\"iqtqzfavyvnq\",\"type\":\"ybar\"}") .toObject(CapturedLogInner.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-18T11:55:12Z"), model.createdTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T11:05:30Z"), model.lastModifiedTime()); - Assertions.assertEquals(2907518339137583712L, model.sizeInKb()); - Assertions.assertEquals("vmeueci", model.typePropertiesType()); - Assertions.assertEquals("hzceuojgjrwjue", model.url()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapturedLogInner model = new CapturedLogInner().withCreatedTime(OffsetDateTime.parse("2021-03-18T11:55:12Z")) - .withLastModifiedTime(OffsetDateTime.parse("2021-03-31T11:05:30Z")) - .withSizeInKb(2907518339137583712L) - .withTypePropertiesType("vmeueci") - .withUrl("hzceuojgjrwjue"); - model = BinaryData.fromObject(model).toObject(CapturedLogInner.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-18T11:55:12Z"), model.createdTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T11:05:30Z"), model.lastModifiedTime()); - Assertions.assertEquals(2907518339137583712L, model.sizeInKb()); - Assertions.assertEquals("vmeueci", model.typePropertiesType()); - Assertions.assertEquals("hzceuojgjrwjue", model.url()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-10T14:18:40Z"), model.createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-09T02:09:02Z"), model.lastModifiedTime()); + Assertions.assertEquals(1034609439766827467L, model.sizeInKb()); + Assertions.assertEquals("bskhudygoookkqfq", model.typePropertiesType()); + Assertions.assertEquals("vleo", model.url()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogListTests.java index 4748924b9ec9..aa0d2a17a208 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogListTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogListTests.java @@ -1,45 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.CapturedLogInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.CapturedLogList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.CapturedLogList; import java.time.OffsetDateTime; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class CapturedLogListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapturedLogList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-06-09T13:42:27Z\",\"lastModifiedTime\":\"2021-10-13T05:34:59Z\",\"sizeInKb\":8070378860350059324,\"type\":\"lf\",\"url\":\"sgwbnbbeld\"},\"id\":\"k\",\"name\":\"baliourqhakauha\",\"type\":\"hsfwxosowzxcug\"}],\"nextLink\":\"jooxdjebw\"}") + "{\"value\":[{\"properties\":{\"createdTime\":\"2021-09-18T23:49:01Z\",\"lastModifiedTime\":\"2021-09-14T03:10:11Z\",\"sizeInKb\":156216941630787820,\"type\":\"maehvbbxurip\",\"url\":\"fnhtbaxkgxyw\"},\"id\":\"kpyklyhp\",\"name\":\"uodpv\",\"type\":\"uudl\"},{\"properties\":{\"createdTime\":\"2021-06-03T13:51:34Z\",\"lastModifiedTime\":\"2021-08-11T13:46:19Z\",\"sizeInKb\":7394328985923656684,\"type\":\"ktst\",\"url\":\"xeclzedqbcvhzlhp\"},\"id\":\"dqkdlwwqfbu\",\"name\":\"lkxt\",\"type\":\"qjfsmlmbtxhw\"}],\"nextLink\":\"wsrt\"}") .toObject(CapturedLogList.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T13:42:27Z"), model.value().get(0).createdTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T05:34:59Z"), model.value().get(0).lastModifiedTime()); - Assertions.assertEquals(8070378860350059324L, model.value().get(0).sizeInKb()); - Assertions.assertEquals("lf", model.value().get(0).typePropertiesType()); - Assertions.assertEquals("sgwbnbbeld", model.value().get(0).url()); - Assertions.assertEquals("jooxdjebw", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapturedLogList model = new CapturedLogList().withValue( - Arrays.asList(new CapturedLogInner().withCreatedTime(OffsetDateTime.parse("2021-06-09T13:42:27Z")) - .withLastModifiedTime(OffsetDateTime.parse("2021-10-13T05:34:59Z")) - .withSizeInKb(8070378860350059324L) - .withTypePropertiesType("lf") - .withUrl("sgwbnbbeld"))) - .withNextLink("jooxdjebw"); - model = BinaryData.fromObject(model).toObject(CapturedLogList.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T13:42:27Z"), model.value().get(0).createdTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T05:34:59Z"), model.value().get(0).lastModifiedTime()); - Assertions.assertEquals(8070378860350059324L, model.value().get(0).sizeInKb()); - Assertions.assertEquals("lf", model.value().get(0).typePropertiesType()); - Assertions.assertEquals("sgwbnbbeld", model.value().get(0).url()); - Assertions.assertEquals("jooxdjebw", model.nextLink()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T23:49:01Z"), model.value().get(0).createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-14T03:10:11Z"), model.value().get(0).lastModifiedTime()); + Assertions.assertEquals(156216941630787820L, model.value().get(0).sizeInKb()); + Assertions.assertEquals("maehvbbxurip", model.value().get(0).typePropertiesType()); + Assertions.assertEquals("fnhtbaxkgxyw", model.value().get(0).url()); + Assertions.assertEquals("wsrt", model.nextLink()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogPropertiesTests.java index 9308f71d5eae..4ae414ced8eb 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogPropertiesTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,28 +13,12 @@ public final class CapturedLogPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapturedLogProperties model = BinaryData.fromString( - "{\"createdTime\":\"2021-05-13T06:47:58Z\",\"lastModifiedTime\":\"2021-10-18T22:59:22Z\",\"sizeInKb\":1588366635739120038,\"type\":\"kxfbkpycgklwndn\",\"url\":\"dauwhvylwzbtd\"}") + "{\"createdTime\":\"2021-06-21T23:29Z\",\"lastModifiedTime\":\"2021-02-15T18:43:44Z\",\"sizeInKb\":1986865163230395084,\"type\":\"bqgzslesjcbhern\",\"url\":\"iew\"}") .toObject(CapturedLogProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-13T06:47:58Z"), model.createdTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T22:59:22Z"), model.lastModifiedTime()); - Assertions.assertEquals(1588366635739120038L, model.sizeInKb()); - Assertions.assertEquals("kxfbkpycgklwndn", model.type()); - Assertions.assertEquals("dauwhvylwzbtd", model.url()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapturedLogProperties model - = new CapturedLogProperties().withCreatedTime(OffsetDateTime.parse("2021-05-13T06:47:58Z")) - .withLastModifiedTime(OffsetDateTime.parse("2021-10-18T22:59:22Z")) - .withSizeInKb(1588366635739120038L) - .withType("kxfbkpycgklwndn") - .withUrl("dauwhvylwzbtd"); - model = BinaryData.fromObject(model).toObject(CapturedLogProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-13T06:47:58Z"), model.createdTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T22:59:22Z"), model.lastModifiedTime()); - Assertions.assertEquals(1588366635739120038L, model.sizeInKb()); - Assertions.assertEquals("kxfbkpycgklwndn", model.type()); - Assertions.assertEquals("dauwhvylwzbtd", model.url()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T23:29Z"), model.createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-15T18:43:44Z"), model.lastModifiedTime()); + Assertions.assertEquals(1986865163230395084L, model.sizeInKb()); + Assertions.assertEquals("bqgzslesjcbhern", model.type()); + Assertions.assertEquals("iew", model.url()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerMockTests.java index c813b1519ac6..4667e058821a 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CapturedLogsListByServerMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -22,7 +22,7 @@ public final class CapturedLogsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"createdTime\":\"2021-09-15T09:21:05Z\",\"lastModifiedTime\":\"2021-08-22T03:52:29Z\",\"sizeInKb\":6217391043756366085,\"type\":\"dibgqjxgpnrhgov\",\"url\":\"pikqmh\"},\"id\":\"owjrmzvuporqz\",\"name\":\"fuyd\",\"type\":\"vkfvxcnqmxqpswok\"}]}"; + = "{\"value\":[{\"properties\":{\"createdTime\":\"2021-08-02T15:08:53Z\",\"lastModifiedTime\":\"2021-03-29T19:44:44Z\",\"sizeInKb\":4313043476514023782,\"type\":\"s\",\"url\":\"gvriibakclac\"},\"id\":\"rnxousxauzlwvsg\",\"name\":\"wohqfzizvu\",\"type\":\"mmkjsvthnwpztek\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.capturedLogs().listByServer("khpzvuqdflv", "niypfpubcpzg", com.azure.core.util.Context.NONE); + = manager.capturedLogs().listByServer("hr", "mqgjsxvpq", com.azure.core.util.Context.NONE); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-15T09:21:05Z"), response.iterator().next().createdTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-22T03:52:29Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-08-02T15:08:53Z"), response.iterator().next().createdTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-29T19:44:44Z"), response.iterator().next().lastModifiedTime()); - Assertions.assertEquals(6217391043756366085L, response.iterator().next().sizeInKb()); - Assertions.assertEquals("dibgqjxgpnrhgov", response.iterator().next().typePropertiesType()); - Assertions.assertEquals("pikqmh", response.iterator().next().url()); + Assertions.assertEquals(4313043476514023782L, response.iterator().next().sizeInKb()); + Assertions.assertEquals("s", response.iterator().next().typePropertiesType()); + Assertions.assertEquals("gvriibakclac", response.iterator().next().url()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityRequestTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityRequestTests.java index 864595646b72..705c2ec301f1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityRequestTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,18 +11,17 @@ public final class CheckNameAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CheckNameAvailabilityRequest model = BinaryData.fromString("{\"name\":\"flsjc\",\"type\":\"szfjvfbgofelja\"}") + CheckNameAvailabilityRequest model = BinaryData.fromString("{\"name\":\"jzh\",\"type\":\"zxfpxtgqsc\"}") .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("flsjc", model.name()); - Assertions.assertEquals("szfjvfbgofelja", model.type()); + Assertions.assertEquals("jzh", model.name()); + Assertions.assertEquals("zxfpxtgqsc", model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CheckNameAvailabilityRequest model - = new CheckNameAvailabilityRequest().withName("flsjc").withType("szfjvfbgofelja"); + CheckNameAvailabilityRequest model = new CheckNameAvailabilityRequest().withName("jzh").withType("zxfpxtgqsc"); model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("flsjc", model.name()); - Assertions.assertEquals("szfjvfbgofelja", model.type()); + Assertions.assertEquals("jzh", model.name()); + Assertions.assertEquals("zxfpxtgqsc", model.type()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityResponseTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityResponseTests.java index f9e0ae10780a..62e52b6c6002 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityResponseTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/CheckNameAvailabilityResponseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,21 +13,10 @@ public final class CheckNameAvailabilityResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CheckNameAvailabilityResponse model - = BinaryData.fromString("{\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"hftqsxhqxujxukn\"}") + = BinaryData.fromString("{\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"neuvyinzqod\"}") .toObject(CheckNameAvailabilityResponse.class); - Assertions.assertTrue(model.nameAvailable()); + Assertions.assertFalse(model.nameAvailable()); Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); - Assertions.assertEquals("hftqsxhqxujxukn", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityResponse model = new CheckNameAvailabilityResponse().withNameAvailable(true) - .withReason(CheckNameAvailabilityReason.INVALID) - .withMessage("hftqsxhqxujxukn"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponse.class); - Assertions.assertTrue(model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); - Assertions.assertEquals("hftqsxhqxujxukn", model.message()); + Assertions.assertEquals("neuvyinzqod", model.message()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ClusterTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ClusterTests.java index 756d30a3439a..b2577014fef8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ClusterTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ClusterTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,17 +11,17 @@ public final class ClusterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Cluster model = BinaryData.fromString("{\"clusterSize\":179532208,\"defaultDatabaseName\":\"tg\"}") + Cluster model = BinaryData.fromString("{\"clusterSize\":1757218598,\"defaultDatabaseName\":\"hqwa\"}") .toObject(Cluster.class); - Assertions.assertEquals(179532208, model.clusterSize()); - Assertions.assertEquals("tg", model.defaultDatabaseName()); + Assertions.assertEquals(1757218598, model.clusterSize()); + Assertions.assertEquals("hqwa", model.defaultDatabaseName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Cluster model = new Cluster().withClusterSize(179532208).withDefaultDatabaseName("tg"); + Cluster model = new Cluster().withClusterSize(1757218598).withDefaultDatabaseName("hqwa"); model = BinaryData.fromObject(model).toObject(Cluster.class); - Assertions.assertEquals(179532208, model.clusterSize()); - Assertions.assertEquals("tg", model.defaultDatabaseName()); + Assertions.assertEquals(1757218598, model.clusterSize()); + Assertions.assertEquals("hqwa", model.defaultDatabaseName()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationForUpdateTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationForUpdateTests.java index 1f2aa4ffc550..f9a98e8d62dd 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationForUpdateTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationForUpdateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,17 +12,17 @@ public final class ConfigurationForUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConfigurationForUpdate model = BinaryData.fromString( - "{\"properties\":{\"value\":\"bkdmo\",\"description\":\"postmgrcfbunrm\",\"defaultValue\":\"jhhkxbp\",\"dataType\":\"Numeric\",\"allowedValues\":\"jhxxjyn\",\"source\":\"divkrt\",\"isDynamicConfig\":false,\"isReadOnly\":false,\"isConfigPendingRestart\":true,\"unit\":\"zjf\",\"documentationLink\":\"vjfdx\"}}") + "{\"properties\":{\"value\":\"w\",\"description\":\"cugicjoox\",\"defaultValue\":\"ebwpucwwfvo\",\"dataType\":\"Set\",\"allowedValues\":\"euecivyhzceuoj\",\"source\":\"rw\",\"isDynamicConfig\":true,\"isReadOnly\":false,\"isConfigPendingRestart\":true,\"unit\":\"cdytdxw\",\"documentationLink\":\"xnrj\"}}") .toObject(ConfigurationForUpdate.class); - Assertions.assertEquals("bkdmo", model.value()); - Assertions.assertEquals("divkrt", model.source()); + Assertions.assertEquals("w", model.value()); + Assertions.assertEquals("rw", model.source()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConfigurationForUpdate model = new ConfigurationForUpdate().withValue("bkdmo").withSource("divkrt"); + ConfigurationForUpdate model = new ConfigurationForUpdate().withValue("w").withSource("rw"); model = BinaryData.fromObject(model).toObject(ConfigurationForUpdate.class); - Assertions.assertEquals("bkdmo", model.value()); - Assertions.assertEquals("divkrt", model.source()); + Assertions.assertEquals("w", model.value()); + Assertions.assertEquals("rw", model.source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationInnerTests.java index f1cc0d2ee767..a11bf22e5464 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,17 +12,9 @@ public final class ConfigurationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConfigurationInner model = BinaryData.fromString( - "{\"properties\":{\"value\":\"yofd\",\"description\":\"uusdttouwa\",\"defaultValue\":\"ekqvkeln\",\"dataType\":\"Boolean\",\"allowedValues\":\"xwyjsflhhc\",\"source\":\"lnjixisxya\",\"isDynamicConfig\":true,\"isReadOnly\":false,\"isConfigPendingRestart\":false,\"unit\":\"lyjpk\",\"documentationLink\":\"dzyexznelixh\"},\"id\":\"ztfolhbnxk\",\"name\":\"alaulppggdtpnapn\",\"type\":\"iropuhpigvpgylg\"}") + "{\"properties\":{\"value\":\"wpzntxhdzh\",\"description\":\"qj\",\"defaultValue\":\"ck\",\"dataType\":\"Numeric\",\"allowedValues\":\"rxsbkyvp\",\"source\":\"anuzbpzkafkuw\",\"isDynamicConfig\":false,\"isReadOnly\":false,\"isConfigPendingRestart\":true,\"unit\":\"hhseyv\",\"documentationLink\":\"srtslhspkdeem\"},\"id\":\"fm\",\"name\":\"ag\",\"type\":\"vt\"}") .toObject(ConfigurationInner.class); - Assertions.assertEquals("yofd", model.value()); - Assertions.assertEquals("lnjixisxya", model.source()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfigurationInner model = new ConfigurationInner().withValue("yofd").withSource("lnjixisxya"); - model = BinaryData.fromObject(model).toObject(ConfigurationInner.class); - Assertions.assertEquals("yofd", model.value()); - Assertions.assertEquals("lnjixisxya", model.source()); + Assertions.assertEquals("wpzntxhdzh", model.value()); + Assertions.assertEquals("anuzbpzkafkuw", model.source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationListTests.java index f4ccd2964d20..1754befcc04f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationListTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationListTests.java @@ -1,37 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationList; -import java.util.Arrays; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.ConfigurationList; import org.junit.jupiter.api.Assertions; public final class ConfigurationListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConfigurationList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"value\":\"nbmpowuwprzq\",\"description\":\"eualupjmkhf\",\"defaultValue\":\"bbcswsrtjri\",\"dataType\":\"Enumeration\",\"allowedValues\":\"pbewtghfgblcgwx\",\"source\":\"lvqhjkbegibtnmx\",\"isDynamicConfig\":false,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"ayqcgw\",\"documentationLink\":\"zjuzgwyz\"},\"id\":\"txon\",\"name\":\"mtsavjcbpwxqp\",\"type\":\"rknftguvriuhprwm\"},{\"properties\":{\"value\":\"xqtayriwwro\",\"description\":\"bexrmcq\",\"defaultValue\":\"ycnojvknmefqsg\",\"dataType\":\"Enumeration\",\"allowedValues\":\"apj\",\"source\":\"hpvgqz\",\"isDynamicConfig\":true,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"lmwlxkvugfhzo\",\"documentationLink\":\"wjvzunluthnn\"},\"id\":\"nxipeil\",\"name\":\"jzuaejxdultskzbb\",\"type\":\"dzumveekg\"}],\"nextLink\":\"ozuhkfp\"}") + "{\"value\":[{\"properties\":{\"value\":\"wgxhn\",\"description\":\"kxfbkpycgklwndn\",\"defaultValue\":\"dauwhvylwzbtd\",\"dataType\":\"Set\",\"allowedValues\":\"znbmpowuwprzq\",\"source\":\"eualupjmkhf\",\"isDynamicConfig\":true,\"isReadOnly\":true,\"isConfigPendingRestart\":true,\"unit\":\"rtjriplrbpbew\",\"documentationLink\":\"hfgblc\"},\"id\":\"xzvlvqhjkbegib\",\"name\":\"nmxiebwwaloayqc\",\"type\":\"wrtz\"},{\"properties\":{\"value\":\"gwyzm\",\"description\":\"xongmtsavjcbpwxq\",\"defaultValue\":\"rknftguvriuhprwm\",\"dataType\":\"Boolean\",\"allowedValues\":\"qtayri\",\"source\":\"ro\",\"isDynamicConfig\":false,\"isReadOnly\":true,\"isConfigPendingRestart\":true,\"unit\":\"qibycnojvknm\",\"documentationLink\":\"qsgzvahapj\"},\"id\":\"hpvgqz\",\"name\":\"j\",\"type\":\"vxdjzlmwlxkvugf\"}],\"nextLink\":\"ovawjvzunlu\"}") .toObject(ConfigurationList.class); - Assertions.assertEquals("nbmpowuwprzq", model.value().get(0).value()); - Assertions.assertEquals("lvqhjkbegibtnmx", model.value().get(0).source()); - Assertions.assertEquals("ozuhkfp", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfigurationList model - = new ConfigurationList() - .withValue( - Arrays.asList(new ConfigurationInner().withValue("nbmpowuwprzq").withSource("lvqhjkbegibtnmx"), - new ConfigurationInner().withValue("xqtayriwwro").withSource("hpvgqz"))) - .withNextLink("ozuhkfp"); - model = BinaryData.fromObject(model).toObject(ConfigurationList.class); - Assertions.assertEquals("nbmpowuwprzq", model.value().get(0).value()); - Assertions.assertEquals("lvqhjkbegibtnmx", model.value().get(0).source()); - Assertions.assertEquals("ozuhkfp", model.nextLink()); + Assertions.assertEquals("wgxhn", model.value().get(0).value()); + Assertions.assertEquals("eualupjmkhf", model.value().get(0).source()); + Assertions.assertEquals("ovawjvzunlu", model.nextLink()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationPropertiesTests.java index 4062e6f0eb1a..fde9fc4f0a37 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationPropertiesTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,18 +12,17 @@ public final class ConfigurationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConfigurationProperties model = BinaryData.fromString( - "{\"value\":\"itxmedjvcslynqww\",\"description\":\"wzz\",\"defaultValue\":\"gktrmgucnapkte\",\"dataType\":\"String\",\"allowedValues\":\"wptfdy\",\"source\":\"fqbuaceopzf\",\"isDynamicConfig\":false,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"ppcqeqxolz\",\"documentationLink\":\"hzxct\"}") + "{\"value\":\"lmqkrhahvlj\",\"description\":\"haquhcdh\",\"defaultValue\":\"ualaexqpvfadmw\",\"dataType\":\"Numeric\",\"allowedValues\":\"gvxp\",\"source\":\"omzlfmi\",\"isDynamicConfig\":false,\"isReadOnly\":false,\"isConfigPendingRestart\":true,\"unit\":\"ldawkzbaliourqha\",\"documentationLink\":\"uhashsfwx\"}") .toObject(ConfigurationProperties.class); - Assertions.assertEquals("itxmedjvcslynqww", model.value()); - Assertions.assertEquals("fqbuaceopzf", model.source()); + Assertions.assertEquals("lmqkrhahvlj", model.value()); + Assertions.assertEquals("omzlfmi", model.source()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConfigurationProperties model - = new ConfigurationProperties().withValue("itxmedjvcslynqww").withSource("fqbuaceopzf"); + ConfigurationProperties model = new ConfigurationProperties().withValue("lmqkrhahvlj").withSource("omzlfmi"); model = BinaryData.fromObject(model).toObject(ConfigurationProperties.class); - Assertions.assertEquals("itxmedjvcslynqww", model.value()); - Assertions.assertEquals("fqbuaceopzf", model.source()); + Assertions.assertEquals("lmqkrhahvlj", model.value()); + Assertions.assertEquals("omzlfmi", model.source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java index 93973b986ee3..64b88a4c5c92 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -21,7 +21,7 @@ public final class ConfigurationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"value\":\"xnjmxm\",\"description\":\"qudtcvclx\",\"defaultValue\":\"pdkvg\",\"dataType\":\"Integer\",\"allowedValues\":\"iyji\",\"source\":\"zphdugneiknp\",\"isDynamicConfig\":false,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"hibtozipqwjedmur\",\"documentationLink\":\"x\"},\"id\":\"wpktvqylkmqpzoyh\",\"name\":\"fbcgwgcloxoebqin\",\"type\":\"ipnwj\"}"; + = "{\"properties\":{\"value\":\"dlyjdf\",\"description\":\"mkyoqufdvruzsl\",\"defaultValue\":\"j\",\"dataType\":\"Numeric\",\"allowedValues\":\"fnmdxotn\",\"source\":\"dgug\",\"isDynamicConfig\":false,\"isReadOnly\":false,\"isConfigPendingRestart\":false,\"unit\":\"yui\",\"documentationLink\":\"bsnmfpph\"},\"id\":\"eevy\",\"name\":\"yhsgz\",\"type\":\"czbgomfgbeg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Configuration response = manager.configurations() - .getWithResponse("mribiat", "gplucfotangcfhny", "zcugswvxwlmzqw", com.azure.core.util.Context.NONE) + .getWithResponse("lihrraiouaubr", "tloqxfuojrn", "iflrzpasccbiu", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xnjmxm", response.value()); - Assertions.assertEquals("zphdugneiknp", response.source()); + Assertions.assertEquals("dlyjdf", response.value()); + Assertions.assertEquals("dgug", response.source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerMockTests.java index c628683cf3ad..1b76345071e2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsListByServerMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -22,7 +22,7 @@ public final class ConfigurationsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"value\":\"wtglxx\",\"description\":\"jfpgpicrmn\",\"defaultValue\":\"rgmqgjs\",\"dataType\":\"Enumeration\",\"allowedValues\":\"cbfrm\",\"source\":\"dths\",\"isDynamicConfig\":true,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"a\",\"documentationLink\":\"lacjfrnxo\"},\"id\":\"xauzlwvsgmwohqfz\",\"name\":\"zvuxm\",\"type\":\"kjsvthnwpzteko\"}]}"; + = "{\"value\":[{\"properties\":{\"value\":\"vbmqzbqq\",\"description\":\"aj\",\"defaultValue\":\"wxacevehj\",\"dataType\":\"Integer\",\"allowedValues\":\"oafgaoql\",\"source\":\"aeylinm\",\"isDynamicConfig\":true,\"isReadOnly\":true,\"isConfigPendingRestart\":true,\"unit\":\"hriypoqeyhlqhy\",\"documentationLink\":\"rlpyznuciqdsmexi\"},\"id\":\"dfuxtya\",\"name\":\"iibmi\",\"type\":\"bnn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.configurations().listByServer("vkhlggdhbemz", "kzsz", com.azure.core.util.Context.NONE); + = manager.configurations().listByServer("qgleohibetnluank", "rfxeeebtij", com.azure.core.util.Context.NONE); - Assertions.assertEquals("wtglxx", response.iterator().next().value()); - Assertions.assertEquals("dths", response.iterator().next().source()); + Assertions.assertEquals("vbmqzbqq", response.iterator().next().value()); + Assertions.assertEquals("aeylinm", response.iterator().next().source()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutMockTests.java deleted file mode 100644 index 634537854366..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ConfigurationsPutMockTests.java +++ /dev/null @@ -1,43 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Configuration; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConfigurationsPutMockTests { - @Test - public void testPut() throws Exception { - String responseStr - = "{\"properties\":{\"value\":\"rngbtcjuahokqtob\",\"description\":\"uxofshfphwpnulai\",\"defaultValue\":\"zejywhslw\",\"dataType\":\"Integer\",\"allowedValues\":\"llndnpd\",\"source\":\"pqafgfugsnnfhy\",\"isDynamicConfig\":false,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"octfjgtixrjvzuyt\",\"documentationLink\":\"mlmuowol\"},\"id\":\"uir\",\"name\":\"p\",\"type\":\"ons\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - Configuration response = manager.configurations() - .define("kkholvdndvia") - .withExistingFlexibleServer("ujqlafcbahh", "zpofoiyjwpfilk") - .withValue("phuartv") - .withSource("snewmozqvbub") - .create(); - - Assertions.assertEquals("rngbtcjuahokqtob", response.value()); - Assertions.assertEquals("pqafgfugsnnfhy", response.source()); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseInnerTests.java index 39d3709c0e1b..ff0990604c62 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,17 +12,17 @@ public final class DatabaseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DatabaseInner model = BinaryData.fromString( - "{\"properties\":{\"charset\":\"e\",\"collation\":\"t\"},\"id\":\"aqtdoqmcbx\",\"name\":\"wvxysl\",\"type\":\"bhsfxob\"}") + "{\"properties\":{\"charset\":\"n\",\"collation\":\"nxipeil\"},\"id\":\"zuaejxd\",\"name\":\"ltskzbbtd\",\"type\":\"umveekgpwozuhkf\"}") .toObject(DatabaseInner.class); - Assertions.assertEquals("e", model.charset()); - Assertions.assertEquals("t", model.collation()); + Assertions.assertEquals("n", model.charset()); + Assertions.assertEquals("nxipeil", model.collation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DatabaseInner model = new DatabaseInner().withCharset("e").withCollation("t"); + DatabaseInner model = new DatabaseInner().withCharset("n").withCollation("nxipeil"); model = BinaryData.fromObject(model).toObject(DatabaseInner.class); - Assertions.assertEquals("e", model.charset()); - Assertions.assertEquals("t", model.collation()); + Assertions.assertEquals("n", model.charset()); + Assertions.assertEquals("nxipeil", model.collation()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseListTests.java index 36681967bf75..cc22b675d4c4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseListTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseListTests.java @@ -1,37 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.DatabaseInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.DatabaseList; -import java.util.Arrays; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.DatabaseList; import org.junit.jupiter.api.Assertions; public final class DatabaseListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DatabaseList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"charset\":\"ohxcrsbfova\",\"collation\":\"ruvw\"},\"id\":\"sqfsubcgjbirxb\",\"name\":\"ybsrfbjfdtwss\",\"type\":\"t\"},{\"properties\":{\"charset\":\"vjz\",\"collation\":\"xilzznf\"},\"id\":\"nvwpmqtaruouj\",\"name\":\"kcjhwqytjrybnwj\",\"type\":\"wgdrjervnaenqp\"},{\"properties\":{\"charset\":\"ndoygmifthnzdnd\",\"collation\":\"gnayqigynduh\"},\"id\":\"hqlkthumaqo\",\"name\":\"bgycduiertgccym\",\"type\":\"aolps\"},{\"properties\":{\"charset\":\"lfmmdnbbglzpswi\",\"collation\":\"mcwyhzdxssadb\"},\"id\":\"nvdfznuda\",\"name\":\"dvxzbncblylpst\",\"type\":\"bhhxsrzdzuc\"}],\"nextLink\":\"scdntnevf\"}") + "{\"value\":[{\"properties\":{\"charset\":\"uwaboekqvke\",\"collation\":\"smv\"},\"id\":\"wyjsflhhcaalnjix\",\"name\":\"sxyawjoyaqcs\",\"type\":\"yjpkiidzyexz\"},{\"properties\":{\"charset\":\"ixhnrztf\",\"collation\":\"hb\"},\"id\":\"knalaulppg\",\"name\":\"dtpnapnyiropuhp\",\"type\":\"gvpgy\"},{\"properties\":{\"charset\":\"git\",\"collation\":\"edjvcslynqw\"},\"id\":\"cwzzhxgktr\",\"name\":\"gucnapkte\",\"type\":\"ellwptfdy\"},{\"properties\":{\"charset\":\"qbuaceopzfqr\",\"collation\":\"uaopppcqeq\"},\"id\":\"lzdahzxctobgbkdm\",\"name\":\"izpost\",\"type\":\"grcfb\"}],\"nextLink\":\"rmfqjhhkxbpvj\"}") .toObject(DatabaseList.class); - Assertions.assertEquals("ohxcrsbfova", model.value().get(0).charset()); - Assertions.assertEquals("ruvw", model.value().get(0).collation()); - Assertions.assertEquals("scdntnevf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabaseList model = new DatabaseList() - .withValue(Arrays.asList(new DatabaseInner().withCharset("ohxcrsbfova").withCollation("ruvw"), - new DatabaseInner().withCharset("vjz").withCollation("xilzznf"), - new DatabaseInner().withCharset("ndoygmifthnzdnd").withCollation("gnayqigynduh"), - new DatabaseInner().withCharset("lfmmdnbbglzpswi").withCollation("mcwyhzdxssadb"))) - .withNextLink("scdntnevf"); - model = BinaryData.fromObject(model).toObject(DatabaseList.class); - Assertions.assertEquals("ohxcrsbfova", model.value().get(0).charset()); - Assertions.assertEquals("ruvw", model.value().get(0).collation()); - Assertions.assertEquals("scdntnevf", model.nextLink()); + Assertions.assertEquals("uwaboekqvke", model.value().get(0).charset()); + Assertions.assertEquals("smv", model.value().get(0).collation()); + Assertions.assertEquals("rmfqjhhkxbpvj", model.nextLink()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseMigrationStateTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseMigrationStateTests.java index f0ed5985d27f..a94f1b8b5a6c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseMigrationStateTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabaseMigrationStateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -14,60 +14,23 @@ public final class DatabaseMigrationStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DatabaseMigrationState model = BinaryData.fromString( - "{\"databaseName\":\"obqwcsdbnwdcfh\",\"migrationState\":\"Succeeded\",\"migrationOperation\":\"pfuvglsbjjca\",\"startedOn\":\"2021-05-27T00:53:27Z\",\"endedOn\":\"2021-05-06T23:29:51Z\",\"fullLoadQueuedTables\":152007455,\"fullLoadErroredTables\":596883756,\"fullLoadLoadingTables\":1601872964,\"fullLoadCompletedTables\":1320056895,\"cdcUpdateCounter\":574519404,\"cdcDeleteCounter\":175295404,\"cdcInsertCounter\":1945766703,\"appliedChanges\":1218996877,\"incomingChanges\":1229712399,\"latency\":754766432,\"message\":\"dflvkg\"}") + "{\"databaseName\":\"dudgwdslfhot\",\"migrationState\":\"Succeeded\",\"migrationOperation\":\"npwlbjnpg\",\"startedOn\":\"2021-06-30T18:10:14Z\",\"endedOn\":\"2021-10-08T18:53:29Z\",\"fullLoadQueuedTables\":587661863,\"fullLoadErroredTables\":756336922,\"fullLoadLoadingTables\":1636345438,\"fullLoadCompletedTables\":1735591195,\"cdcUpdateCounter\":632380018,\"cdcDeleteCounter\":1715960277,\"cdcInsertCounter\":1059745678,\"appliedChanges\":1329177264,\"incomingChanges\":1230833613,\"latency\":517935134,\"message\":\"dejbavo\"}") .toObject(DatabaseMigrationState.class); - Assertions.assertEquals("obqwcsdbnwdcfh", model.databaseName()); + Assertions.assertEquals("dudgwdslfhot", model.databaseName()); Assertions.assertEquals(MigrationDatabaseState.SUCCEEDED, model.migrationState()); - Assertions.assertEquals("pfuvglsbjjca", model.migrationOperation()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-27T00:53:27Z"), model.startedOn()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T23:29:51Z"), model.endedOn()); - Assertions.assertEquals(152007455, model.fullLoadQueuedTables()); - Assertions.assertEquals(596883756, model.fullLoadErroredTables()); - Assertions.assertEquals(1601872964, model.fullLoadLoadingTables()); - Assertions.assertEquals(1320056895, model.fullLoadCompletedTables()); - Assertions.assertEquals(574519404, model.cdcUpdateCounter()); - Assertions.assertEquals(175295404, model.cdcDeleteCounter()); - Assertions.assertEquals(1945766703, model.cdcInsertCounter()); - Assertions.assertEquals(1218996877, model.appliedChanges()); - Assertions.assertEquals(1229712399, model.incomingChanges()); - Assertions.assertEquals(754766432, model.latency()); - Assertions.assertEquals("dflvkg", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabaseMigrationState model = new DatabaseMigrationState().withDatabaseName("obqwcsdbnwdcfh") - .withMigrationState(MigrationDatabaseState.SUCCEEDED) - .withMigrationOperation("pfuvglsbjjca") - .withStartedOn(OffsetDateTime.parse("2021-05-27T00:53:27Z")) - .withEndedOn(OffsetDateTime.parse("2021-05-06T23:29:51Z")) - .withFullLoadQueuedTables(152007455) - .withFullLoadErroredTables(596883756) - .withFullLoadLoadingTables(1601872964) - .withFullLoadCompletedTables(1320056895) - .withCdcUpdateCounter(574519404) - .withCdcDeleteCounter(175295404) - .withCdcInsertCounter(1945766703) - .withAppliedChanges(1218996877) - .withIncomingChanges(1229712399) - .withLatency(754766432) - .withMessage("dflvkg"); - model = BinaryData.fromObject(model).toObject(DatabaseMigrationState.class); - Assertions.assertEquals("obqwcsdbnwdcfh", model.databaseName()); - Assertions.assertEquals(MigrationDatabaseState.SUCCEEDED, model.migrationState()); - Assertions.assertEquals("pfuvglsbjjca", model.migrationOperation()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-27T00:53:27Z"), model.startedOn()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T23:29:51Z"), model.endedOn()); - Assertions.assertEquals(152007455, model.fullLoadQueuedTables()); - Assertions.assertEquals(596883756, model.fullLoadErroredTables()); - Assertions.assertEquals(1601872964, model.fullLoadLoadingTables()); - Assertions.assertEquals(1320056895, model.fullLoadCompletedTables()); - Assertions.assertEquals(574519404, model.cdcUpdateCounter()); - Assertions.assertEquals(175295404, model.cdcDeleteCounter()); - Assertions.assertEquals(1945766703, model.cdcInsertCounter()); - Assertions.assertEquals(1218996877, model.appliedChanges()); - Assertions.assertEquals(1229712399, model.incomingChanges()); - Assertions.assertEquals(754766432, model.latency()); - Assertions.assertEquals("dflvkg", model.message()); + Assertions.assertEquals("npwlbjnpg", model.migrationOperation()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-30T18:10:14Z"), model.startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-08T18:53:29Z"), model.endedOn()); + Assertions.assertEquals(587661863, model.fullLoadQueuedTables()); + Assertions.assertEquals(756336922, model.fullLoadErroredTables()); + Assertions.assertEquals(1636345438, model.fullLoadLoadingTables()); + Assertions.assertEquals(1735591195, model.fullLoadCompletedTables()); + Assertions.assertEquals(632380018, model.cdcUpdateCounter()); + Assertions.assertEquals(1715960277, model.cdcDeleteCounter()); + Assertions.assertEquals(1059745678, model.cdcInsertCounter()); + Assertions.assertEquals(1329177264, model.appliedChanges()); + Assertions.assertEquals(1230833613, model.incomingChanges()); + Assertions.assertEquals(517935134, model.latency()); + Assertions.assertEquals("dejbavo", model.message()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasePropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasePropertiesTests.java index 170250a5719d..01d56311d629 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasePropertiesTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,17 +11,17 @@ public final class DatabasePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DatabaseProperties model = BinaryData.fromString("{\"charset\":\"tkblmpewww\",\"collation\":\"krvrns\"}") + DatabaseProperties model = BinaryData.fromString("{\"charset\":\"sjyofdx\",\"collation\":\"us\"}") .toObject(DatabaseProperties.class); - Assertions.assertEquals("tkblmpewww", model.charset()); - Assertions.assertEquals("krvrns", model.collation()); + Assertions.assertEquals("sjyofdx", model.charset()); + Assertions.assertEquals("us", model.collation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DatabaseProperties model = new DatabaseProperties().withCharset("tkblmpewww").withCollation("krvrns"); + DatabaseProperties model = new DatabaseProperties().withCharset("sjyofdx").withCollation("us"); model = BinaryData.fromObject(model).toObject(DatabaseProperties.class); - Assertions.assertEquals("tkblmpewww", model.charset()); - Assertions.assertEquals("krvrns", model.collation()); + Assertions.assertEquals("sjyofdx", model.charset()); + Assertions.assertEquals("us", model.collation()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetWithResponseMockTests.java index a0417baef6f3..76affc73747c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -21,7 +21,7 @@ public final class DatabasesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"charset\":\"ekhenl\",\"collation\":\"fnrdtjxtxr\"},\"id\":\"qtj\",\"name\":\"idttgepus\",\"type\":\"vyjtcvu\"}"; + = "{\"properties\":{\"charset\":\"cgyypro\",\"collation\":\"ypundmbxhugc\"},\"id\":\"k\",\"name\":\"vlgo\",\"type\":\"bmftpmdt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Database response = manager.databases() - .getWithResponse("onwpnga", "innixjawrtmjfj", "yccxlzhcox", com.azure.core.util.Context.NONE) + .getWithResponse("stgnl", "hnmgixhcm", "vmqfoud", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ekhenl", response.charset()); - Assertions.assertEquals("fnrdtjxtxr", response.collation()); + Assertions.assertEquals("cgyypro", response.charset()); + Assertions.assertEquals("ypundmbxhugc", response.collation()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerMockTests.java index 0d453e7f1518..ea8ffd9a58a7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesListByServerMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -22,7 +22,7 @@ public final class DatabasesListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"charset\":\"ygtuhx\",\"collation\":\"cbuewmrswnjlxuz\"},\"id\":\"wpusxjbaqehg\",\"name\":\"dohzjq\",\"type\":\"tu\"}]}"; + = "{\"value\":[{\"properties\":{\"charset\":\"bzqgqqi\",\"collation\":\"dsvqwt\"},\"id\":\"ky\",\"name\":\"bcysih\",\"type\":\"gqcwdhohsdtmc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.databases().listByServer("kasizie", "fuughtuqfec", com.azure.core.util.Context.NONE); + = manager.databases().listByServer("fjltfvnzcyjtotp", "opv", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ygtuhx", response.iterator().next().charset()); - Assertions.assertEquals("cbuewmrswnjlxuz", response.iterator().next().collation()); + Assertions.assertEquals("bzqgqqi", response.iterator().next().charset()); + Assertions.assertEquals("dsvqwt", response.iterator().next().collation()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbLevelValidationStatusTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbLevelValidationStatusTests.java index f4f5ed37e2c4..67473f875ad7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbLevelValidationStatusTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbLevelValidationStatusTests.java @@ -1,81 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.postgresqlflexibleserver.models.DbLevelValidationStatus; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage; import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationState; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationSummaryItem; import java.time.OffsetDateTime; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class DbLevelValidationStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DbLevelValidationStatus model = BinaryData.fromString( - "{\"databaseName\":\"yuhhziu\",\"startedOn\":\"2021-07-06T04:06:38Z\",\"endedOn\":\"2021-08-01T09:41:30Z\",\"summary\":[{\"type\":\"msmlmzq\",\"state\":\"Failed\",\"messages\":[{\"state\":\"Failed\",\"message\":\"qu\"},{\"state\":\"Succeeded\",\"message\":\"icslfaoq\"}]},{\"type\":\"iyylhalnswhccsp\",\"state\":\"Warning\",\"messages\":[{\"state\":\"Succeeded\",\"message\":\"qscywu\"},{\"state\":\"Succeeded\",\"message\":\"luhczbw\"},{\"state\":\"Succeeded\",\"message\":\"i\"}]},{\"type\":\"brgz\",\"state\":\"Warning\",\"messages\":[{\"state\":\"Succeeded\",\"message\":\"qwdxggicc\"}]},{\"type\":\"xqhuexm\",\"state\":\"Failed\",\"messages\":[{\"state\":\"Failed\",\"message\":\"zywemhzrncsdtclu\"},{\"state\":\"Succeeded\",\"message\":\"bsfgytguslfea\"},{\"state\":\"Succeeded\",\"message\":\"qukyhejhzi\"},{\"state\":\"Succeeded\",\"message\":\"pelol\"}]}]}") + "{\"databaseName\":\"yocf\",\"startedOn\":\"2021-06-07T20:06:41Z\",\"endedOn\":\"2021-07-08T00:17:48Z\",\"summary\":[{\"type\":\"ys\",\"state\":\"Failed\",\"messages\":[{\"state\":\"Failed\",\"message\":\"yudxorrqnbp\"}]},{\"type\":\"zvyifqrvkdvj\",\"state\":\"Succeeded\",\"messages\":[{\"state\":\"Warning\",\"message\":\"f\"}]},{\"type\":\"t\",\"state\":\"Warning\",\"messages\":[{\"state\":\"Succeeded\",\"message\":\"xbczwtruwiqz\"},{\"state\":\"Failed\",\"message\":\"sovmyokacspkwl\"},{\"state\":\"Succeeded\",\"message\":\"bpxjmfl\"}]},{\"type\":\"vnchrkcci\",\"state\":\"Succeeded\",\"messages\":[{\"state\":\"Warning\",\"message\":\"rsa\"},{\"state\":\"Warning\",\"message\":\"uo\"},{\"state\":\"Succeeded\",\"message\":\"ghsauuimjmvxied\"}]}]}") .toObject(DbLevelValidationStatus.class); - Assertions.assertEquals("yuhhziu", model.databaseName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-06T04:06:38Z"), model.startedOn()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-01T09:41:30Z"), model.endedOn()); - Assertions.assertEquals("msmlmzq", model.summary().get(0).type()); + Assertions.assertEquals("yocf", model.databaseName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-07T20:06:41Z"), model.startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-08T00:17:48Z"), model.endedOn()); + Assertions.assertEquals("ys", model.summary().get(0).type()); Assertions.assertEquals(ValidationState.FAILED, model.summary().get(0).state()); Assertions.assertEquals(ValidationState.FAILED, model.summary().get(0).messages().get(0).state()); - Assertions.assertEquals("qu", model.summary().get(0).messages().get(0).message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DbLevelValidationStatus model - = new DbLevelValidationStatus().withDatabaseName("yuhhziu") - .withStartedOn(OffsetDateTime.parse("2021-07-06T04:06:38Z")) - .withEndedOn(OffsetDateTime.parse("2021-08-01T09:41:30Z")) - .withSummary( - Arrays - .asList( - new ValidationSummaryItem().withType("msmlmzq") - .withState(ValidationState.FAILED) - .withMessages(Arrays.asList( - new ValidationMessage().withState(ValidationState.FAILED).withMessage("qu"), - new ValidationMessage().withState(ValidationState.SUCCEEDED) - .withMessage("icslfaoq"))), - new ValidationSummaryItem().withType("iyylhalnswhccsp") - .withState(ValidationState.WARNING) - .withMessages(Arrays.asList( - new ValidationMessage().withState(ValidationState.SUCCEEDED).withMessage("qscywu"), - new ValidationMessage().withState(ValidationState.SUCCEEDED) - .withMessage("luhczbw"), - new ValidationMessage().withState(ValidationState.SUCCEEDED).withMessage("i"))), - new ValidationSummaryItem().withType("brgz") - .withState(ValidationState.WARNING) - .withMessages( - Arrays - .asList(new ValidationMessage().withState(ValidationState.SUCCEEDED) - .withMessage("qwdxggicc"))), - new ValidationSummaryItem().withType("xqhuexm") - .withState(ValidationState.FAILED) - .withMessages(Arrays.asList( - new ValidationMessage().withState(ValidationState.FAILED) - .withMessage("zywemhzrncsdtclu"), - new ValidationMessage() - .withState(ValidationState.SUCCEEDED) - .withMessage("bsfgytguslfea"), - new ValidationMessage() - .withState(ValidationState.SUCCEEDED) - .withMessage("qukyhejhzi"), - new ValidationMessage().withState(ValidationState.SUCCEEDED) - .withMessage("pelol"))))); - model = BinaryData.fromObject(model).toObject(DbLevelValidationStatus.class); - Assertions.assertEquals("yuhhziu", model.databaseName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-06T04:06:38Z"), model.startedOn()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-01T09:41:30Z"), model.endedOn()); - Assertions.assertEquals("msmlmzq", model.summary().get(0).type()); - Assertions.assertEquals(ValidationState.FAILED, model.summary().get(0).state()); - Assertions.assertEquals(ValidationState.FAILED, model.summary().get(0).messages().get(0).state()); - Assertions.assertEquals("qu", model.summary().get(0).messages().get(0).message()); + Assertions.assertEquals("yudxorrqnbp", model.summary().get(0).messages().get(0).message()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbServerMetadataTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbServerMetadataTests.java index 29cd27678fe4..28c71ddf81a5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbServerMetadataTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DbServerMetadataTests.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.postgresqlflexibleserver.models.DbServerMetadata; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ServerSku; import com.azure.resourcemanager.postgresqlflexibleserver.models.SkuTier; import org.junit.jupiter.api.Assertions; @@ -14,23 +13,11 @@ public final class DbServerMetadataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DbServerMetadata model = BinaryData.fromString( - "{\"location\":\"vk\",\"version\":\"pqvujzraehtwdwrf\",\"storageMb\":575939452,\"sku\":{\"name\":\"yrcdlbhshfwprac\",\"tier\":\"Burstable\"}}") + "{\"location\":\"gidyjrrf\",\"version\":\"aos\",\"storageMb\":499062312,\"sku\":{\"name\":\"onpc\",\"tier\":\"Burstable\"}}") .toObject(DbServerMetadata.class); - Assertions.assertEquals("pqvujzraehtwdwrf", model.version()); - Assertions.assertEquals(575939452, model.storageMb()); - Assertions.assertEquals("yrcdlbhshfwprac", model.sku().name()); - Assertions.assertEquals(SkuTier.BURSTABLE, model.sku().tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DbServerMetadata model = new DbServerMetadata().withVersion("pqvujzraehtwdwrf") - .withStorageMb(575939452) - .withSku(new ServerSku().withName("yrcdlbhshfwprac").withTier(SkuTier.BURSTABLE)); - model = BinaryData.fromObject(model).toObject(DbServerMetadata.class); - Assertions.assertEquals("pqvujzraehtwdwrf", model.version()); - Assertions.assertEquals(575939452, model.storageMb()); - Assertions.assertEquals("yrcdlbhshfwprac", model.sku().name()); + Assertions.assertEquals("aos", model.version()); + Assertions.assertEquals(499062312, model.storageMb()); + Assertions.assertEquals("onpc", model.sku().name()); Assertions.assertEquals(SkuTier.BURSTABLE, model.sku().tier()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DelegatedSubnetUsageTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DelegatedSubnetUsageTests.java index 555d2e44725b..b45351277eee 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DelegatedSubnetUsageTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DelegatedSubnetUsageTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -10,14 +10,7 @@ public final class DelegatedSubnetUsageTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DelegatedSubnetUsage model - = BinaryData.fromString("{\"subnetName\":\"brlttymsjnygq\",\"usage\":5868166807959460587}") - .toObject(DelegatedSubnetUsage.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DelegatedSubnetUsage model = new DelegatedSubnetUsage(); - model = BinaryData.fromObject(model).toObject(DelegatedSubnetUsage.class); + DelegatedSubnetUsage model = BinaryData.fromString("{\"subnetName\":\"qfr\",\"usage\":6511698838376376158}") + .toObject(DelegatedSubnetUsage.class); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FastProvisioningEditionCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FastProvisioningEditionCapabilityTests.java index 775232e0dbdb..1f43c4733e5f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FastProvisioningEditionCapabilityTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FastProvisioningEditionCapabilityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,13 +11,7 @@ public final class FastProvisioningEditionCapabilityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FastProvisioningEditionCapability model = BinaryData.fromString( - "{\"supportedTier\":\"eemaofmxagkvtme\",\"supportedSku\":\"qkrhahvljua\",\"supportedStorageGb\":836090349,\"supportedServerVersions\":\"hcdhmdual\",\"serverCount\":115440556,\"status\":\"Default\",\"reason\":\"fadmws\"}") + "{\"supportedTier\":\"jw\",\"supportedSku\":\"wqiok\",\"supportedStorageGb\":373495652,\"supportedServerVersions\":\"mojmsvpkjprvkw\",\"serverCount\":769318875,\"status\":\"Default\",\"reason\":\"yxgtczh\"}") .toObject(FastProvisioningEditionCapability.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FastProvisioningEditionCapability model = new FastProvisioningEditionCapability(); - model = BinaryData.fromObject(model).toObject(FastProvisioningEditionCapability.class); - } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleInnerTests.java index 571fdc7e4763..c5950a42acad 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,17 +12,17 @@ public final class FirewallRuleInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FirewallRuleInner model = BinaryData.fromString( - "{\"properties\":{\"startIpAddress\":\"wjmy\",\"endIpAddress\":\"tdss\"},\"id\":\"wtmwerio\",\"name\":\"zpyqsemwab\",\"type\":\"ets\"}") + "{\"properties\":{\"startIpAddress\":\"mjh\",\"endIpAddress\":\"xjyngudivk\"},\"id\":\"swbxqz\",\"name\":\"szjfauvjfdxxivet\",\"type\":\"t\"}") .toObject(FirewallRuleInner.class); - Assertions.assertEquals("wjmy", model.startIpAddress()); - Assertions.assertEquals("tdss", model.endIpAddress()); + Assertions.assertEquals("mjh", model.startIpAddress()); + Assertions.assertEquals("xjyngudivk", model.endIpAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FirewallRuleInner model = new FirewallRuleInner().withStartIpAddress("wjmy").withEndIpAddress("tdss"); + FirewallRuleInner model = new FirewallRuleInner().withStartIpAddress("mjh").withEndIpAddress("xjyngudivk"); model = BinaryData.fromObject(model).toObject(FirewallRuleInner.class); - Assertions.assertEquals("wjmy", model.startIpAddress()); - Assertions.assertEquals("tdss", model.endIpAddress()); + Assertions.assertEquals("mjh", model.startIpAddress()); + Assertions.assertEquals("xjyngudivk", model.endIpAddress()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleListTests.java index 7795d1274bda..f5a34acf1032 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleListTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRuleListTests.java @@ -1,35 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.FirewallRuleInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FirewallRuleList; -import java.util.Arrays; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.FirewallRuleList; import org.junit.jupiter.api.Assertions; public final class FirewallRuleListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FirewallRuleList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"startIpAddress\":\"k\",\"endIpAddress\":\"wtppjflcxogaoko\"},\"id\":\"m\",\"name\":\"sikvmkqzeqqkdlt\",\"type\":\"zxmhhvhgu\"}],\"nextLink\":\"odkwobd\"}") + "{\"value\":[{\"properties\":{\"startIpAddress\":\"blytk\",\"endIpAddress\":\"lmpewwwfbkr\"},\"id\":\"nsvs\",\"name\":\"q\",\"type\":\"ohxcrsbfova\"}],\"nextLink\":\"ruvw\"}") .toObject(FirewallRuleList.class); - Assertions.assertEquals("k", model.value().get(0).startIpAddress()); - Assertions.assertEquals("wtppjflcxogaoko", model.value().get(0).endIpAddress()); - Assertions.assertEquals("odkwobd", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FirewallRuleList model = new FirewallRuleList() - .withValue( - Arrays.asList(new FirewallRuleInner().withStartIpAddress("k").withEndIpAddress("wtppjflcxogaoko"))) - .withNextLink("odkwobd"); - model = BinaryData.fromObject(model).toObject(FirewallRuleList.class); - Assertions.assertEquals("k", model.value().get(0).startIpAddress()); - Assertions.assertEquals("wtppjflcxogaoko", model.value().get(0).endIpAddress()); - Assertions.assertEquals("odkwobd", model.nextLink()); + Assertions.assertEquals("blytk", model.value().get(0).startIpAddress()); + Assertions.assertEquals("lmpewwwfbkr", model.value().get(0).endIpAddress()); + Assertions.assertEquals("ruvw", model.nextLink()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulePropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulePropertiesTests.java index bc8a3535404b..8d17689d48fb 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulePropertiesTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,18 +12,18 @@ public final class FirewallRulePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FirewallRuleProperties model - = BinaryData.fromString("{\"startIpAddress\":\"hszhedplvwiwu\",\"endIpAddress\":\"mwmbes\"}") + = BinaryData.fromString("{\"startIpAddress\":\"qaqtdoqmcbxvwvxy\",\"endIpAddress\":\"lqbhsf\"}") .toObject(FirewallRuleProperties.class); - Assertions.assertEquals("hszhedplvwiwu", model.startIpAddress()); - Assertions.assertEquals("mwmbes", model.endIpAddress()); + Assertions.assertEquals("qaqtdoqmcbxvwvxy", model.startIpAddress()); + Assertions.assertEquals("lqbhsf", model.endIpAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FirewallRuleProperties model - = new FirewallRuleProperties().withStartIpAddress("hszhedplvwiwu").withEndIpAddress("mwmbes"); + = new FirewallRuleProperties().withStartIpAddress("qaqtdoqmcbxvwvxy").withEndIpAddress("lqbhsf"); model = BinaryData.fromObject(model).toObject(FirewallRuleProperties.class); - Assertions.assertEquals("hszhedplvwiwu", model.startIpAddress()); - Assertions.assertEquals("mwmbes", model.endIpAddress()); + Assertions.assertEquals("qaqtdoqmcbxvwvxy", model.startIpAddress()); + Assertions.assertEquals("lqbhsf", model.endIpAddress()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateMockTests.java deleted file mode 100644 index ea6767a839c9..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,43 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.FirewallRule; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FirewallRulesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"startIpAddress\":\"nchrszizoyu\",\"endIpAddress\":\"lyetndnbfqygg\"},\"id\":\"flnlgmtr\",\"name\":\"ahzjmucftb\",\"type\":\"r\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - FirewallRule response = manager.firewallRules() - .define("guaucmfdjwnla") - .withExistingFlexibleServer("penuy", "bqeqqekewvnqvcd") - .withStartIpAddress("punj") - .withEndIpAddress("ikczvvitacgxmf") - .create(); - - Assertions.assertEquals("nchrszizoyu", response.startIpAddress()); - Assertions.assertEquals("lyetndnbfqygg", response.endIpAddress()); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetWithResponseMockTests.java index 48618e3c3ff6..ddb6994fbb56 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -21,7 +21,7 @@ public final class FirewallRulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"startIpAddress\":\"xofvcjk\",\"endIpAddress\":\"dirazf\"},\"id\":\"ejwabmdujtmvco\",\"name\":\"excmjurbuhhl\",\"type\":\"yqltqsro\"}"; + = "{\"properties\":{\"startIpAddress\":\"v\",\"endIpAddress\":\"qqxeyskon\"},\"id\":\"inkfkbgbz\",\"name\":\"owxeqocljmy\",\"type\":\"vkzqk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FirewallRule response = manager.firewallRules() - .getWithResponse("kjbsah", "tdtpdelqacslmo", "oebn", com.azure.core.util.Context.NONE) + .getWithResponse("zsu", "cohdx", "zlmcmuapcvhdb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xofvcjk", response.startIpAddress()); - Assertions.assertEquals("dirazf", response.endIpAddress()); + Assertions.assertEquals("v", response.startIpAddress()); + Assertions.assertEquals("qqxeyskon", response.endIpAddress()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerMockTests.java index 4877dba352c4..8b66b34160c9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/FirewallRulesListByServerMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -22,7 +22,7 @@ public final class FirewallRulesListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"startIpAddress\":\"fvcl\",\"endIpAddress\":\"lxnfuijtkbusqogs\"},\"id\":\"kayi\",\"name\":\"nsharujtjiqxfzyj\",\"type\":\"ttvwkpqh\"}]}"; + = "{\"value\":[{\"properties\":{\"startIpAddress\":\"pqxbkwvzgnzvdf\",\"endIpAddress\":\"zdix\"},\"id\":\"q\",\"name\":\"noda\",\"type\":\"opqhewjptmc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.firewallRules().listByServer("tuwkffdj", "tsysi", com.azure.core.util.Context.NONE); + = manager.firewallRules().listByServer("jeokbzefezrxccz", "rtle", com.azure.core.util.Context.NONE); - Assertions.assertEquals("fvcl", response.iterator().next().startIpAddress()); - Assertions.assertEquals("lxnfuijtkbusqogs", response.iterator().next().endIpAddress()); + Assertions.assertEquals("pqxbkwvzgnzvdf", response.iterator().next().startIpAddress()); + Assertions.assertEquals("zdix", response.iterator().next().endIpAddress()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityForPatchTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityForPatchTests.java index 2dd804451484..17d6857a82c2 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityForPatchTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityForPatchTests.java @@ -1,30 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityForPatch; -import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgreSqlFlexibleServerHighAvailabilityMode; import org.junit.jupiter.api.Assertions; public final class HighAvailabilityForPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HighAvailabilityForPatch model = BinaryData - .fromString("{\"mode\":\"SameZone\",\"state\":\"Healthy\",\"standbyAvailabilityZone\":\"fkyrk\"}") + .fromString( + "{\"mode\":\"SameZone\",\"state\":\"RemovingStandby\",\"standbyAvailabilityZone\":\"qnermclfplphoxu\"}") .toObject(HighAvailabilityForPatch.class); - Assertions.assertEquals(HighAvailabilityMode.SAME_ZONE, model.mode()); - Assertions.assertEquals("fkyrk", model.standbyAvailabilityZone()); + Assertions.assertEquals(PostgreSqlFlexibleServerHighAvailabilityMode.SAME_ZONE, model.mode()); + Assertions.assertEquals("qnermclfplphoxu", model.standbyAvailabilityZone()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HighAvailabilityForPatch model = new HighAvailabilityForPatch().withMode(HighAvailabilityMode.SAME_ZONE) - .withStandbyAvailabilityZone("fkyrk"); + HighAvailabilityForPatch model + = new HighAvailabilityForPatch().withMode(PostgreSqlFlexibleServerHighAvailabilityMode.SAME_ZONE) + .withStandbyAvailabilityZone("qnermclfplphoxu"); model = BinaryData.fromObject(model).toObject(HighAvailabilityForPatch.class); - Assertions.assertEquals(HighAvailabilityMode.SAME_ZONE, model.mode()); - Assertions.assertEquals("fkyrk", model.standbyAvailabilityZone()); + Assertions.assertEquals(PostgreSqlFlexibleServerHighAvailabilityMode.SAME_ZONE, model.mode()); + Assertions.assertEquals("qnermclfplphoxu", model.standbyAvailabilityZone()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityTests.java index 8aee4f3a7ab7..116d09744793 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/HighAvailabilityTests.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailability; -import com.azure.resourcemanager.postgresqlflexibleserver.models.HighAvailabilityMode; +import com.azure.resourcemanager.postgresqlflexibleserver.models.PostgreSqlFlexibleServerHighAvailabilityMode; import org.junit.jupiter.api.Assertions; public final class HighAvailabilityTests { @@ -14,18 +14,18 @@ public final class HighAvailabilityTests { public void testDeserialize() throws Exception { HighAvailability model = BinaryData .fromString( - "{\"mode\":\"ZoneRedundant\",\"state\":\"FailingOver\",\"standbyAvailabilityZone\":\"hgkfmin\"}") + "{\"mode\":\"Disabled\",\"state\":\"ReplicatingData\",\"standbyAvailabilityZone\":\"riwflzlfb\"}") .toObject(HighAvailability.class); - Assertions.assertEquals(HighAvailabilityMode.ZONE_REDUNDANT, model.mode()); - Assertions.assertEquals("hgkfmin", model.standbyAvailabilityZone()); + Assertions.assertEquals(PostgreSqlFlexibleServerHighAvailabilityMode.DISABLED, model.mode()); + Assertions.assertEquals("riwflzlfb", model.standbyAvailabilityZone()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HighAvailability model = new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT) - .withStandbyAvailabilityZone("hgkfmin"); + HighAvailability model = new HighAvailability().withMode(PostgreSqlFlexibleServerHighAvailabilityMode.DISABLED) + .withStandbyAvailabilityZone("riwflzlfb"); model = BinaryData.fromObject(model).toObject(HighAvailability.class); - Assertions.assertEquals(HighAvailabilityMode.ZONE_REDUNDANT, model.mode()); - Assertions.assertEquals("hgkfmin", model.standbyAvailabilityZone()); + Assertions.assertEquals(PostgreSqlFlexibleServerHighAvailabilityMode.DISABLED, model.mode()); + Assertions.assertEquals("riwflzlfb", model.standbyAvailabilityZone()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ImpactRecordTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ImpactRecordTests.java index ef00c91f2f6d..88ae7ebe9c34 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ImpactRecordTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ImpactRecordTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,24 +12,11 @@ public final class ImpactRecordTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImpactRecord model = BinaryData.fromString( - "{\"dimensionName\":\"qikfxcv\",\"unit\":\"fsphuagrttikt\",\"queryId\":6566397554835939309,\"absoluteValue\":40.716755209430964}") + "{\"dimensionName\":\"mpimaqxzhemjyh\",\"unit\":\"uj\",\"queryId\":362918226671468382,\"absoluteValue\":61.87265105214077}") .toObject(ImpactRecord.class); - Assertions.assertEquals("qikfxcv", model.dimensionName()); - Assertions.assertEquals("fsphuagrttikt", model.unit()); - Assertions.assertEquals(6566397554835939309L, model.queryId()); - Assertions.assertEquals(40.716755209430964D, model.absoluteValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImpactRecord model = new ImpactRecord().withDimensionName("qikfxcv") - .withUnit("fsphuagrttikt") - .withQueryId(6566397554835939309L) - .withAbsoluteValue(40.716755209430964D); - model = BinaryData.fromObject(model).toObject(ImpactRecord.class); - Assertions.assertEquals("qikfxcv", model.dimensionName()); - Assertions.assertEquals("fsphuagrttikt", model.unit()); - Assertions.assertEquals(6566397554835939309L, model.queryId()); - Assertions.assertEquals(40.716755209430964D, model.absoluteValue()); + Assertions.assertEquals("mpimaqxzhemjyh", model.dimensionName()); + Assertions.assertEquals("uj", model.unit()); + Assertions.assertEquals(362918226671468382L, model.queryId()); + Assertions.assertEquals(61.87265105214077D, model.absoluteValue()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupRequestTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupRequestTests.java index 237b78c26f50..c15df8028785 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupRequestTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,16 +12,16 @@ public final class LtrPreBackupRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LtrPreBackupRequest model = BinaryData.fromString("{\"backupSettings\":{\"backupName\":\"gxtibqdxbxw\"}}") + LtrPreBackupRequest model = BinaryData.fromString("{\"backupSettings\":{\"backupName\":\"jcvb\"}}") .toObject(LtrPreBackupRequest.class); - Assertions.assertEquals("gxtibqdxbxw", model.backupSettings().backupName()); + Assertions.assertEquals("jcvb", model.backupSettings().backupName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { LtrPreBackupRequest model - = new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("gxtibqdxbxw")); + = new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("jcvb")); model = BinaryData.fromObject(model).toObject(LtrPreBackupRequest.class); - Assertions.assertEquals("gxtibqdxbxw", model.backupSettings().backupName()); + Assertions.assertEquals("jcvb", model.backupSettings().backupName()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupResponseInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupResponseInnerTests.java index a77feacfa140..ecec3eb1076b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupResponseInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/LtrPreBackupResponseInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,15 +11,8 @@ public final class LtrPreBackupResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LtrPreBackupResponseInner model = BinaryData.fromString("{\"properties\":{\"numberOfContainers\":81041412}}") + LtrPreBackupResponseInner model = BinaryData.fromString("{\"properties\":{\"numberOfContainers\":1041320877}}") .toObject(LtrPreBackupResponseInner.class); - Assertions.assertEquals(81041412, model.numberOfContainers()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LtrPreBackupResponseInner model = new LtrPreBackupResponseInner().withNumberOfContainers(81041412); - model = BinaryData.fromObject(model).toObject(LtrPreBackupResponseInner.class); - Assertions.assertEquals(81041412, model.numberOfContainers()); + Assertions.assertEquals(1041320877, model.numberOfContainers()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowForPatchTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowForPatchTests.java index a5b3671cdeed..e05d531093a6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowForPatchTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowForPatchTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,26 +11,25 @@ public final class MaintenanceWindowForPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MaintenanceWindowForPatch model = BinaryData - .fromString( - "{\"customWindow\":\"dg\",\"startHour\":649228036,\"startMinute\":1593534784,\"dayOfWeek\":1141536781}") + MaintenanceWindowForPatch model = BinaryData.fromString( + "{\"customWindow\":\"rpabg\",\"startHour\":1582480909,\"startMinute\":1466922404,\"dayOfWeek\":1974668378}") .toObject(MaintenanceWindowForPatch.class); - Assertions.assertEquals("dg", model.customWindow()); - Assertions.assertEquals(649228036, model.startHour()); - Assertions.assertEquals(1593534784, model.startMinute()); - Assertions.assertEquals(1141536781, model.dayOfWeek()); + Assertions.assertEquals("rpabg", model.customWindow()); + Assertions.assertEquals(1582480909, model.startHour()); + Assertions.assertEquals(1466922404, model.startMinute()); + Assertions.assertEquals(1974668378, model.dayOfWeek()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MaintenanceWindowForPatch model = new MaintenanceWindowForPatch().withCustomWindow("dg") - .withStartHour(649228036) - .withStartMinute(1593534784) - .withDayOfWeek(1141536781); + MaintenanceWindowForPatch model = new MaintenanceWindowForPatch().withCustomWindow("rpabg") + .withStartHour(1582480909) + .withStartMinute(1466922404) + .withDayOfWeek(1974668378); model = BinaryData.fromObject(model).toObject(MaintenanceWindowForPatch.class); - Assertions.assertEquals("dg", model.customWindow()); - Assertions.assertEquals(649228036, model.startHour()); - Assertions.assertEquals(1593534784, model.startMinute()); - Assertions.assertEquals(1141536781, model.dayOfWeek()); + Assertions.assertEquals("rpabg", model.customWindow()); + Assertions.assertEquals(1582480909, model.startHour()); + Assertions.assertEquals(1466922404, model.startMinute()); + Assertions.assertEquals(1974668378, model.dayOfWeek()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowTests.java index c68e3b5fdd60..ab640e28ae7c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MaintenanceWindowTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,25 +11,26 @@ public final class MaintenanceWindowTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MaintenanceWindow model = BinaryData.fromString( - "{\"customWindow\":\"owzfttsttkt\",\"startHour\":631157488,\"startMinute\":1941309010,\"dayOfWeek\":520028629}") + MaintenanceWindow model = BinaryData + .fromString( + "{\"customWindow\":\"puz\",\"startHour\":1610498845,\"startMinute\":650318692,\"dayOfWeek\":315992042}") .toObject(MaintenanceWindow.class); - Assertions.assertEquals("owzfttsttkt", model.customWindow()); - Assertions.assertEquals(631157488, model.startHour()); - Assertions.assertEquals(1941309010, model.startMinute()); - Assertions.assertEquals(520028629, model.dayOfWeek()); + Assertions.assertEquals("puz", model.customWindow()); + Assertions.assertEquals(1610498845, model.startHour()); + Assertions.assertEquals(650318692, model.startMinute()); + Assertions.assertEquals(315992042, model.dayOfWeek()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MaintenanceWindow model = new MaintenanceWindow().withCustomWindow("owzfttsttkt") - .withStartHour(631157488) - .withStartMinute(1941309010) - .withDayOfWeek(520028629); + MaintenanceWindow model = new MaintenanceWindow().withCustomWindow("puz") + .withStartHour(1610498845) + .withStartMinute(650318692) + .withDayOfWeek(315992042); model = BinaryData.fromObject(model).toObject(MaintenanceWindow.class); - Assertions.assertEquals("owzfttsttkt", model.customWindow()); - Assertions.assertEquals(631157488, model.startHour()); - Assertions.assertEquals(1941309010, model.startMinute()); - Assertions.assertEquals(520028629, model.dayOfWeek()); + Assertions.assertEquals("puz", model.customWindow()); + Assertions.assertEquals(1610498845, model.startHour()); + Assertions.assertEquals(650318692, model.startMinute()); + Assertions.assertEquals(315992042, model.dayOfWeek()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrateNetworkStatusInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrateNetworkStatusInnerTests.java new file mode 100644 index 000000000000..44489b68402e --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrateNetworkStatusInnerTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.postgresqlflexibleserver.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.MigrateNetworkStatusInner; +import org.junit.jupiter.api.Assertions; + +public final class MigrateNetworkStatusInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MigrateNetworkStatusInner model = BinaryData.fromString( + "{\"subscriptionId\":\"nobglaocq\",\"resourceGroupName\":\"ccm\",\"serverName\":\"udxytlmoyrx\",\"state\":\"Succeeded\"}") + .toObject(MigrateNetworkStatusInner.class); + Assertions.assertEquals("nobglaocq", model.subscriptionId()); + Assertions.assertEquals("ccm", model.resourceGroupName()); + Assertions.assertEquals("udxytlmoyrx", model.serverName()); + } +} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationNameAvailabilityInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationNameAvailabilityInnerTests.java index 4a0df8accef0..331fd627a956 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationNameAvailabilityInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationNameAvailabilityInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,18 +12,18 @@ public final class MigrationNameAvailabilityInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MigrationNameAvailabilityInner model = BinaryData.fromString( - "{\"name\":\"xrjqcirgzpfrlazs\",\"type\":\"rnwoiindfp\",\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"bt\"}") + "{\"name\":\"frzpwvlqdqgb\",\"type\":\"qylihkaetckt\",\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"snkymuctq\"}") .toObject(MigrationNameAvailabilityInner.class); - Assertions.assertEquals("xrjqcirgzpfrlazs", model.name()); - Assertions.assertEquals("rnwoiindfp", model.type()); + Assertions.assertEquals("frzpwvlqdqgb", model.name()); + Assertions.assertEquals("qylihkaetckt", model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MigrationNameAvailabilityInner model - = new MigrationNameAvailabilityInner().withName("xrjqcirgzpfrlazs").withType("rnwoiindfp"); + = new MigrationNameAvailabilityInner().withName("frzpwvlqdqgb").withType("qylihkaetckt"); model = BinaryData.fromObject(model).toObject(MigrationNameAvailabilityInner.class); - Assertions.assertEquals("xrjqcirgzpfrlazs", model.name()); - Assertions.assertEquals("rnwoiindfp", model.type()); + Assertions.assertEquals("frzpwvlqdqgb", model.name()); + Assertions.assertEquals("qylihkaetckt", model.type()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationStatusTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationStatusTests.java index 117b37b40940..086c27a4974a 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationStatusTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationStatusTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,13 +11,7 @@ public final class MigrationStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MigrationStatus model = BinaryData.fromString( - "{\"state\":\"Succeeded\",\"error\":\"c\",\"currentSubStateDetails\":{\"currentSubState\":\"WaitingForDataMigrationScheduling\",\"dbDetails\":{\"npkukghimdblx\":{\"databaseName\":\"nxxmueedndrdv\",\"migrationState\":\"Canceling\",\"migrationOperation\":\"qqtch\",\"startedOn\":\"2021-06-10T11:36:20Z\",\"endedOn\":\"2021-05-03T12:58:02Z\",\"fullLoadQueuedTables\":669500000,\"fullLoadErroredTables\":1035796586,\"fullLoadLoadingTables\":1434664141,\"fullLoadCompletedTables\":2035762000,\"cdcUpdateCounter\":2007823107,\"cdcDeleteCounter\":1689077175,\"cdcInsertCounter\":772691250,\"appliedChanges\":490559476,\"incomingChanges\":976430532,\"latency\":434631779,\"message\":\"fudxepxgyqagvrv\"},\"abfatkl\":{\"databaseName\":\"imfnjhfjx\",\"migrationState\":\"Succeeded\",\"migrationOperation\":\"kkfoqr\",\"startedOn\":\"2021-06-21T22:48:50Z\",\"endedOn\":\"2021-05-31T03:25:20Z\",\"fullLoadQueuedTables\":508782992,\"fullLoadErroredTables\":2032728059,\"fullLoadLoadingTables\":1528851064,\"fullLoadCompletedTables\":398738394,\"cdcUpdateCounter\":693357808,\"cdcDeleteCounter\":641008490,\"cdcInsertCounter\":322973840,\"appliedChanges\":1950360907,\"incomingChanges\":1038031643,\"latency\":1240770029,\"message\":\"elsfeaen\"},\"zikhl\":{\"databaseName\":\"xbjhwuaanozjosph\",\"migrationState\":\"Succeeded\",\"migrationOperation\":\"pjrvxagl\",\"startedOn\":\"2021-11-16T13:26:47Z\",\"endedOn\":\"2021-09-23T10:13:50Z\",\"fullLoadQueuedTables\":1410903229,\"fullLoadErroredTables\":2140169496,\"fullLoadLoadingTables\":861887507,\"fullLoadCompletedTables\":802895356,\"cdcUpdateCounter\":835762361,\"cdcDeleteCounter\":992939840,\"cdcInsertCounter\":212130052,\"appliedChanges\":1489104850,\"incomingChanges\":2030573756,\"latency\":1569245436,\"message\":\"ke\"}},\"validationDetails\":{\"status\":\"Warning\",\"validationStartTimeInUtc\":\"2021-06-13T17:28:05Z\",\"validationEndTimeInUtc\":\"2021-02-18T07:54:44Z\",\"serverLevelValidationDetails\":[{\"type\":\"dunyg\",\"state\":\"Succeeded\",\"messages\":[{}]},{\"type\":\"qfatpxllrxcyjm\",\"state\":\"Failed\",\"messages\":[{},{},{},{}]}],\"dbLevelValidationDetails\":[{\"databaseName\":\"m\",\"startedOn\":\"2021-04-05T03:20:46Z\",\"endedOn\":\"2021-05-10T10:07:34Z\",\"summary\":[{},{}]}]}}}") + "{\"state\":\"Canceled\",\"error\":\"zdn\",\"currentSubStateDetails\":{\"currentSubState\":\"WaitingForCutoverTrigger\",\"dbDetails\":{\"kfthwxmntei\":{\"databaseName\":\"muouqfp\",\"migrationState\":\"InProgress\",\"migrationOperation\":\"bngui\",\"startedOn\":\"2021-03-04T11:37:43Z\",\"endedOn\":\"2020-12-24T00:10Z\",\"fullLoadQueuedTables\":1403075438,\"fullLoadErroredTables\":1608878856,\"fullLoadLoadingTables\":8203543,\"fullLoadCompletedTables\":2117984998,\"cdcUpdateCounter\":1325323583,\"cdcDeleteCounter\":935270600,\"cdcInsertCounter\":1585023957,\"appliedChanges\":284238049,\"incomingChanges\":1778385162,\"latency\":778150976,\"message\":\"vzwdzuhtymwis\"},\"eiachboosflnr\":{\"databaseName\":\"opvkmijcm\",\"migrationState\":\"WaitingForCutoverTrigger\",\"migrationOperation\":\"ufufsrp\",\"startedOn\":\"2021-06-29T04:41:21Z\",\"endedOn\":\"2021-12-09T12:29:37Z\",\"fullLoadQueuedTables\":1949364989,\"fullLoadErroredTables\":1650570270,\"fullLoadLoadingTables\":380753695,\"fullLoadCompletedTables\":1211779170,\"cdcUpdateCounter\":1074081564,\"cdcDeleteCounter\":309313223,\"cdcInsertCounter\":305344836,\"appliedChanges\":1827996208,\"incomingChanges\":1547468297,\"latency\":194894857,\"message\":\"z\"},\"sqwpgrjb\":{\"databaseName\":\"fqpte\",\"migrationState\":\"Canceled\",\"migrationOperation\":\"vypyqrimzinpv\",\"startedOn\":\"2021-02-26T16:18Z\",\"endedOn\":\"2021-08-28T07:05:13Z\",\"fullLoadQueuedTables\":1577087193,\"fullLoadErroredTables\":158859960,\"fullLoadLoadingTables\":1909707701,\"fullLoadCompletedTables\":893395600,\"cdcUpdateCounter\":1455872330,\"cdcDeleteCounter\":901066642,\"cdcInsertCounter\":1840218719,\"appliedChanges\":153926906,\"incomingChanges\":1543175438,\"latency\":683362936,\"message\":\"dsoifiyipj\"},\"bqidtqaj\":{\"databaseName\":\"orcjxvsnby\",\"migrationState\":\"Failed\",\"migrationOperation\":\"nmoc\",\"startedOn\":\"2021-06-01T07:07:44Z\",\"endedOn\":\"2021-08-24T13:39:32Z\",\"fullLoadQueuedTables\":2078472464,\"fullLoadErroredTables\":2023442123,\"fullLoadLoadingTables\":369096894,\"fullLoadCompletedTables\":1085002799,\"cdcUpdateCounter\":844718571,\"cdcDeleteCounter\":2050960815,\"cdcInsertCounter\":293333183,\"appliedChanges\":71717444,\"incomingChanges\":1736666223,\"latency\":2092000112,\"message\":\"a\"}},\"validationDetails\":{\"status\":\"Failed\",\"validationStartTimeInUtc\":\"2021-04-02T13:56:53Z\",\"validationEndTimeInUtc\":\"2021-02-06T20:35:46Z\",\"serverLevelValidationDetails\":[{\"type\":\"lkhbz\",\"state\":\"Warning\",\"messages\":[{},{},{}]},{\"type\":\"gqexzlocxs\",\"state\":\"Succeeded\",\"messages\":[{},{},{}]},{\"type\":\"hhbcsglummajtjao\",\"state\":\"Failed\",\"messages\":[{},{}]}],\"dbLevelValidationDetails\":[{\"databaseName\":\"k\",\"startedOn\":\"2021-06-04T04:36:15Z\",\"endedOn\":\"2021-09-27T22:27:26Z\",\"summary\":[{},{},{},{}]},{\"databaseName\":\"onpimexgstxg\",\"startedOn\":\"2021-02-01T21:21:11Z\",\"endedOn\":\"2021-04-23T14:47:55Z\",\"summary\":[{},{}]}]}}}") .toObject(MigrationStatus.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MigrationStatus model = new MigrationStatus(); - model = BinaryData.fromObject(model).toObject(MigrationStatus.class); - } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationSubstateDetailsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationSubstateDetailsTests.java index fc76d5e8440b..8c6ef159a801 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationSubstateDetailsTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationSubstateDetailsTests.java @@ -1,217 +1,62 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.models.DatabaseMigrationState; -import com.azure.resourcemanager.postgresqlflexibleserver.models.DbLevelValidationStatus; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationDatabaseState; import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSubstateDetails; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationDetails; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage; import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationState; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationSummaryItem; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class MigrationSubstateDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MigrationSubstateDetails model = BinaryData.fromString( - "{\"currentSubState\":\"MigratingData\",\"dbDetails\":{\"cqqudf\":{\"databaseName\":\"yxxrwlycoduh\",\"migrationState\":\"Failed\",\"migrationOperation\":\"gymare\",\"startedOn\":\"2021-03-16T20:45:43Z\",\"endedOn\":\"2021-11-23T08:29:11Z\",\"fullLoadQueuedTables\":1568573740,\"fullLoadErroredTables\":1691251601,\"fullLoadLoadingTables\":432489630,\"fullLoadCompletedTables\":1068546777,\"cdcUpdateCounter\":314169873,\"cdcDeleteCounter\":642347272,\"cdcInsertCounter\":1615439443,\"appliedChanges\":2056337569,\"incomingChanges\":1063119881,\"latency\":1853639964,\"message\":\"zqalkrmnjijpx\"},\"aytdwkqbrq\":{\"databaseName\":\"yxbaaabjyvayf\",\"migrationState\":\"InProgress\",\"migrationOperation\":\"zrtuzq\",\"startedOn\":\"2021-05-14T21:16:38Z\",\"endedOn\":\"2021-10-01T08:47:38Z\",\"fullLoadQueuedTables\":218306871,\"fullLoadErroredTables\":850324011,\"fullLoadLoadingTables\":1536688095,\"fullLoadCompletedTables\":512160368,\"cdcUpdateCounter\":2059840008,\"cdcDeleteCounter\":377160768,\"cdcInsertCounter\":1440499034,\"appliedChanges\":10547913,\"incomingChanges\":1475196585,\"latency\":1576556557,\"message\":\"oibjudpfrxtrthz\"}},\"validationDetails\":{\"status\":\"Failed\",\"validationStartTimeInUtc\":\"2021-06-19T07:52:19Z\",\"validationEndTimeInUtc\":\"2021-08-03T15:35:30Z\",\"serverLevelValidationDetails\":[{\"type\":\"ivpdtiir\",\"state\":\"Failed\",\"messages\":[{\"state\":\"Failed\",\"message\":\"r\"},{\"state\":\"Succeeded\",\"message\":\"squyfxrxxlep\"},{\"state\":\"Succeeded\",\"message\":\"xje\"}]}],\"dbLevelValidationDetails\":[{\"databaseName\":\"nwxuqlcvydyp\",\"startedOn\":\"2021-03-01T02:46:01Z\",\"endedOn\":\"2021-08-27T20:00:04Z\",\"summary\":[{\"type\":\"kniod\",\"state\":\"Warning\",\"messages\":[{}]},{\"type\":\"nuj\",\"state\":\"Failed\",\"messages\":[{},{},{},{}]}]},{\"databaseName\":\"vdkcrodtj\",\"startedOn\":\"2021-03-09T18:26:05Z\",\"endedOn\":\"2021-03-22T21:04:29Z\",\"summary\":[{\"type\":\"kacjvefkdlfo\",\"state\":\"Warning\",\"messages\":[{},{}]}]},{\"databaseName\":\"pagao\",\"startedOn\":\"2021-02-23T21:26:17Z\",\"endedOn\":\"2021-11-09T20:51:35Z\",\"summary\":[{\"type\":\"ylsyxkqjnsje\",\"state\":\"Warning\",\"messages\":[{},{},{}]},{\"type\":\"xsdszuempsb\",\"state\":\"Failed\",\"messages\":[{},{},{},{}]},{\"type\":\"yvpnqicvinvkjj\",\"state\":\"Warning\",\"messages\":[{},{},{},{}]},{\"type\":\"ukzclewyhmlwpaz\",\"state\":\"Failed\",\"messages\":[{}]}]},{\"databaseName\":\"cckwyfzqwhxxbu\",\"startedOn\":\"2021-05-27T03:07:24Z\",\"endedOn\":\"2020-12-30T00:37:41Z\",\"summary\":[{\"type\":\"ztppriolxorjalto\",\"state\":\"Succeeded\",\"messages\":[{},{},{}]}]}]}}") + "{\"currentSubState\":\"WaitingForDBsToMigrateSpecification\",\"dbDetails\":{\"ocjjxhvpmouexh\":{\"databaseName\":\"djwzrlov\",\"migrationState\":\"Failed\",\"migrationOperation\":\"hijco\",\"startedOn\":\"2021-03-15T18:11:23Z\",\"endedOn\":\"2021-08-11T04:39:47Z\",\"fullLoadQueuedTables\":1069972358,\"fullLoadErroredTables\":21849341,\"fullLoadLoadingTables\":2038129581,\"fullLoadCompletedTables\":1712979680,\"cdcUpdateCounter\":1302368966,\"cdcDeleteCounter\":1508721218,\"cdcInsertCounter\":544085929,\"appliedChanges\":1619207085,\"incomingChanges\":2039357898,\"latency\":1707424741,\"message\":\"ppofmxaxcfjpgdd\"},\"jqkwpyeicx\":{\"databaseName\":\"xibqeojnx\",\"migrationState\":\"Canceling\",\"migrationOperation\":\"ddntwndei\",\"startedOn\":\"2021-07-03T11:10:37Z\",\"endedOn\":\"2021-01-19T20:45:38Z\",\"fullLoadQueuedTables\":537336258,\"fullLoadErroredTables\":1464431072,\"fullLoadLoadingTables\":1391069168,\"fullLoadCompletedTables\":2037494020,\"cdcUpdateCounter\":2040818894,\"cdcDeleteCounter\":115248697,\"cdcInsertCounter\":1119626287,\"appliedChanges\":1243018189,\"incomingChanges\":1519639894,\"latency\":76474266,\"message\":\"t\"},\"gxlefgugnxkrxd\":{\"databaseName\":\"ciwqvhk\",\"migrationState\":\"Succeeded\",\"migrationOperation\":\"igdtopbob\",\"startedOn\":\"2021-02-18T21:42:16Z\",\"endedOn\":\"2021-02-17T14:37:23Z\",\"fullLoadQueuedTables\":20476621,\"fullLoadErroredTables\":35431541,\"fullLoadLoadingTables\":248377661,\"fullLoadCompletedTables\":1242660761,\"cdcUpdateCounter\":247953507,\"cdcDeleteCounter\":999138845,\"cdcInsertCounter\":1288111051,\"appliedChanges\":1120285230,\"incomingChanges\":1906806316,\"latency\":266379679,\"message\":\"iotkftutqxl\"}},\"validationDetails\":{\"status\":\"Succeeded\",\"validationStartTimeInUtc\":\"2021-12-07T02:37:39Z\",\"validationEndTimeInUtc\":\"2021-07-18T22:53:57Z\",\"serverLevelValidationDetails\":[{\"type\":\"drabhjybige\",\"state\":\"Warning\",\"messages\":[{\"state\":\"Succeeded\",\"message\":\"kanyktzlcuiywg\"},{\"state\":\"Failed\",\"message\":\"ndrvynhzg\"}]},{\"type\":\"hrc\",\"state\":\"Succeeded\",\"messages\":[{\"state\":\"Warning\",\"message\":\"cfvmmco\"},{\"state\":\"Succeeded\",\"message\":\"lzevgbmqjqab\"},{\"state\":\"Warning\",\"message\":\"ivkwlzuvccfwnfnb\"}]}],\"dbLevelValidationDetails\":[{\"databaseName\":\"onlebxetqgtzxdpn\",\"startedOn\":\"2021-09-22T23:33:27Z\",\"endedOn\":\"2021-03-31T09:09:52Z\",\"summary\":[{\"type\":\"feallnwsu\",\"state\":\"Succeeded\",\"messages\":[{},{},{},{}]},{\"type\":\"mpmngnzscxaqwoo\",\"state\":\"Succeeded\",\"messages\":[{}]},{\"type\":\"qvpkvlrxnjeaseip\",\"state\":\"Failed\",\"messages\":[{},{}]},{\"type\":\"keyyi\",\"state\":\"Failed\",\"messages\":[{},{},{}]}]},{\"databaseName\":\"wtgrhpdjpj\",\"startedOn\":\"2021-02-17T18:41:32Z\",\"endedOn\":\"2021-05-01T06:23:28Z\",\"summary\":[{\"type\":\"pqyegualhbxxh\",\"state\":\"Failed\",\"messages\":[{},{},{},{}]}]}]}}") .toObject(MigrationSubstateDetails.class); - Assertions.assertEquals("yxxrwlycoduh", model.dbDetails().get("cqqudf").databaseName()); - Assertions.assertEquals(MigrationDatabaseState.FAILED, model.dbDetails().get("cqqudf").migrationState()); - Assertions.assertEquals("gymare", model.dbDetails().get("cqqudf").migrationOperation()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-16T20:45:43Z"), - model.dbDetails().get("cqqudf").startedOn()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-23T08:29:11Z"), - model.dbDetails().get("cqqudf").endedOn()); - Assertions.assertEquals(1568573740, model.dbDetails().get("cqqudf").fullLoadQueuedTables()); - Assertions.assertEquals(1691251601, model.dbDetails().get("cqqudf").fullLoadErroredTables()); - Assertions.assertEquals(432489630, model.dbDetails().get("cqqudf").fullLoadLoadingTables()); - Assertions.assertEquals(1068546777, model.dbDetails().get("cqqudf").fullLoadCompletedTables()); - Assertions.assertEquals(314169873, model.dbDetails().get("cqqudf").cdcUpdateCounter()); - Assertions.assertEquals(642347272, model.dbDetails().get("cqqudf").cdcDeleteCounter()); - Assertions.assertEquals(1615439443, model.dbDetails().get("cqqudf").cdcInsertCounter()); - Assertions.assertEquals(2056337569, model.dbDetails().get("cqqudf").appliedChanges()); - Assertions.assertEquals(1063119881, model.dbDetails().get("cqqudf").incomingChanges()); - Assertions.assertEquals(1853639964, model.dbDetails().get("cqqudf").latency()); - Assertions.assertEquals("zqalkrmnjijpx", model.dbDetails().get("cqqudf").message()); - Assertions.assertEquals(ValidationState.FAILED, model.validationDetails().status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T07:52:19Z"), + Assertions.assertEquals("djwzrlov", model.dbDetails().get("ocjjxhvpmouexh").databaseName()); + Assertions.assertEquals(MigrationDatabaseState.FAILED, + model.dbDetails().get("ocjjxhvpmouexh").migrationState()); + Assertions.assertEquals("hijco", model.dbDetails().get("ocjjxhvpmouexh").migrationOperation()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-15T18:11:23Z"), + model.dbDetails().get("ocjjxhvpmouexh").startedOn()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-11T04:39:47Z"), + model.dbDetails().get("ocjjxhvpmouexh").endedOn()); + Assertions.assertEquals(1069972358, model.dbDetails().get("ocjjxhvpmouexh").fullLoadQueuedTables()); + Assertions.assertEquals(21849341, model.dbDetails().get("ocjjxhvpmouexh").fullLoadErroredTables()); + Assertions.assertEquals(2038129581, model.dbDetails().get("ocjjxhvpmouexh").fullLoadLoadingTables()); + Assertions.assertEquals(1712979680, model.dbDetails().get("ocjjxhvpmouexh").fullLoadCompletedTables()); + Assertions.assertEquals(1302368966, model.dbDetails().get("ocjjxhvpmouexh").cdcUpdateCounter()); + Assertions.assertEquals(1508721218, model.dbDetails().get("ocjjxhvpmouexh").cdcDeleteCounter()); + Assertions.assertEquals(544085929, model.dbDetails().get("ocjjxhvpmouexh").cdcInsertCounter()); + Assertions.assertEquals(1619207085, model.dbDetails().get("ocjjxhvpmouexh").appliedChanges()); + Assertions.assertEquals(2039357898, model.dbDetails().get("ocjjxhvpmouexh").incomingChanges()); + Assertions.assertEquals(1707424741, model.dbDetails().get("ocjjxhvpmouexh").latency()); + Assertions.assertEquals("ppofmxaxcfjpgdd", model.dbDetails().get("ocjjxhvpmouexh").message()); + Assertions.assertEquals(ValidationState.SUCCEEDED, model.validationDetails().status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-07T02:37:39Z"), model.validationDetails().validationStartTimeInUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T15:35:30Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-07-18T22:53:57Z"), model.validationDetails().validationEndTimeInUtc()); - Assertions.assertEquals("ivpdtiir", model.validationDetails().serverLevelValidationDetails().get(0).type()); - Assertions.assertEquals(ValidationState.FAILED, - model.validationDetails().serverLevelValidationDetails().get(0).state()); - Assertions.assertEquals(ValidationState.FAILED, - model.validationDetails().serverLevelValidationDetails().get(0).messages().get(0).state()); - Assertions.assertEquals("r", - model.validationDetails().serverLevelValidationDetails().get(0).messages().get(0).message()); - Assertions.assertEquals("nwxuqlcvydyp", - model.validationDetails().dbLevelValidationDetails().get(0).databaseName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-01T02:46:01Z"), - model.validationDetails().dbLevelValidationDetails().get(0).startedOn()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-27T20:00:04Z"), - model.validationDetails().dbLevelValidationDetails().get(0).endedOn()); - Assertions.assertEquals("kniod", - model.validationDetails().dbLevelValidationDetails().get(0).summary().get(0).type()); + Assertions.assertEquals("drabhjybige", model.validationDetails().serverLevelValidationDetails().get(0).type()); Assertions.assertEquals(ValidationState.WARNING, - model.validationDetails().dbLevelValidationDetails().get(0).summary().get(0).state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MigrationSubstateDetails model - = new MigrationSubstateDetails() - .withDbDetails(mapOf("cqqudf", - new DatabaseMigrationState().withDatabaseName("yxxrwlycoduh") - .withMigrationState(MigrationDatabaseState.FAILED) - .withMigrationOperation("gymare") - .withStartedOn(OffsetDateTime.parse("2021-03-16T20:45:43Z")) - .withEndedOn(OffsetDateTime.parse("2021-11-23T08:29:11Z")) - .withFullLoadQueuedTables(1568573740) - .withFullLoadErroredTables(1691251601) - .withFullLoadLoadingTables(432489630) - .withFullLoadCompletedTables(1068546777) - .withCdcUpdateCounter(314169873) - .withCdcDeleteCounter(642347272) - .withCdcInsertCounter(1615439443) - .withAppliedChanges(2056337569) - .withIncomingChanges(1063119881) - .withLatency(1853639964) - .withMessage("zqalkrmnjijpx"), - "aytdwkqbrq", - new DatabaseMigrationState().withDatabaseName("yxbaaabjyvayf") - .withMigrationState(MigrationDatabaseState.IN_PROGRESS) - .withMigrationOperation("zrtuzq") - .withStartedOn(OffsetDateTime.parse("2021-05-14T21:16:38Z")) - .withEndedOn(OffsetDateTime.parse("2021-10-01T08:47:38Z")) - .withFullLoadQueuedTables(218306871) - .withFullLoadErroredTables(850324011) - .withFullLoadLoadingTables(1536688095) - .withFullLoadCompletedTables(512160368) - .withCdcUpdateCounter(2059840008) - .withCdcDeleteCounter(377160768) - .withCdcInsertCounter(1440499034) - .withAppliedChanges(10547913) - .withIncomingChanges(1475196585) - .withLatency(1576556557) - .withMessage("oibjudpfrxtrthz"))) - .withValidationDetails( - new ValidationDetails().withStatus(ValidationState.FAILED) - .withValidationStartTimeInUtc(OffsetDateTime.parse("2021-06-19T07:52:19Z")) - .withValidationEndTimeInUtc(OffsetDateTime.parse("2021-08-03T15:35:30Z")) - .withServerLevelValidationDetails(Arrays.asList(new ValidationSummaryItem().withType("ivpdtiir") - .withState(ValidationState.FAILED) - .withMessages(Arrays.asList( - new ValidationMessage().withState(ValidationState.FAILED).withMessage("r"), - new ValidationMessage().withState(ValidationState.SUCCEEDED) - .withMessage("squyfxrxxlep"), - new ValidationMessage().withState(ValidationState.SUCCEEDED).withMessage("xje"))))) - .withDbLevelValidationDetails(Arrays.asList( - new DbLevelValidationStatus().withDatabaseName("nwxuqlcvydyp") - .withStartedOn(OffsetDateTime.parse("2021-03-01T02:46:01Z")) - .withEndedOn(OffsetDateTime.parse("2021-08-27T20:00:04Z")) - .withSummary(Arrays.asList( - new ValidationSummaryItem().withType("kniod") - .withState(ValidationState.WARNING) - .withMessages(Arrays.asList(new ValidationMessage())), - new ValidationSummaryItem().withType("nuj") - .withState(ValidationState.FAILED) - .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), - new ValidationMessage(), new ValidationMessage())))), - new DbLevelValidationStatus().withDatabaseName("vdkcrodtj") - .withStartedOn(OffsetDateTime.parse("2021-03-09T18:26:05Z")) - .withEndedOn(OffsetDateTime.parse("2021-03-22T21:04:29Z")) - .withSummary(Arrays.asList(new ValidationSummaryItem().withType("kacjvefkdlfo") - .withState(ValidationState.WARNING) - .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage())))), - new DbLevelValidationStatus().withDatabaseName("pagao") - .withStartedOn(OffsetDateTime.parse("2021-02-23T21:26:17Z")) - .withEndedOn(OffsetDateTime.parse("2021-11-09T20:51:35Z")) - .withSummary(Arrays.asList( - new ValidationSummaryItem().withType("ylsyxkqjnsje") - .withState(ValidationState.WARNING) - .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), - new ValidationMessage())), - new ValidationSummaryItem().withType("xsdszuempsb") - .withState(ValidationState.FAILED) - .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), - new ValidationMessage(), new ValidationMessage())), - new ValidationSummaryItem().withType("yvpnqicvinvkjj") - .withState(ValidationState.WARNING) - .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), - new ValidationMessage(), new ValidationMessage())), - new ValidationSummaryItem().withType("ukzclewyhmlwpaz") - .withState(ValidationState.FAILED) - .withMessages(Arrays.asList(new ValidationMessage())))), - new DbLevelValidationStatus().withDatabaseName("cckwyfzqwhxxbu") - .withStartedOn(OffsetDateTime.parse("2021-05-27T03:07:24Z")) - .withEndedOn(OffsetDateTime.parse("2020-12-30T00:37:41Z")) - .withSummary(Arrays.asList(new ValidationSummaryItem().withType("ztppriolxorjalto") - .withState(ValidationState.SUCCEEDED) - .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), - new ValidationMessage()))))))); - model = BinaryData.fromObject(model).toObject(MigrationSubstateDetails.class); - Assertions.assertEquals("yxxrwlycoduh", model.dbDetails().get("cqqudf").databaseName()); - Assertions.assertEquals(MigrationDatabaseState.FAILED, model.dbDetails().get("cqqudf").migrationState()); - Assertions.assertEquals("gymare", model.dbDetails().get("cqqudf").migrationOperation()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-16T20:45:43Z"), - model.dbDetails().get("cqqudf").startedOn()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-23T08:29:11Z"), - model.dbDetails().get("cqqudf").endedOn()); - Assertions.assertEquals(1568573740, model.dbDetails().get("cqqudf").fullLoadQueuedTables()); - Assertions.assertEquals(1691251601, model.dbDetails().get("cqqudf").fullLoadErroredTables()); - Assertions.assertEquals(432489630, model.dbDetails().get("cqqudf").fullLoadLoadingTables()); - Assertions.assertEquals(1068546777, model.dbDetails().get("cqqudf").fullLoadCompletedTables()); - Assertions.assertEquals(314169873, model.dbDetails().get("cqqudf").cdcUpdateCounter()); - Assertions.assertEquals(642347272, model.dbDetails().get("cqqudf").cdcDeleteCounter()); - Assertions.assertEquals(1615439443, model.dbDetails().get("cqqudf").cdcInsertCounter()); - Assertions.assertEquals(2056337569, model.dbDetails().get("cqqudf").appliedChanges()); - Assertions.assertEquals(1063119881, model.dbDetails().get("cqqudf").incomingChanges()); - Assertions.assertEquals(1853639964, model.dbDetails().get("cqqudf").latency()); - Assertions.assertEquals("zqalkrmnjijpx", model.dbDetails().get("cqqudf").message()); - Assertions.assertEquals(ValidationState.FAILED, model.validationDetails().status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T07:52:19Z"), - model.validationDetails().validationStartTimeInUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T15:35:30Z"), - model.validationDetails().validationEndTimeInUtc()); - Assertions.assertEquals("ivpdtiir", model.validationDetails().serverLevelValidationDetails().get(0).type()); - Assertions.assertEquals(ValidationState.FAILED, model.validationDetails().serverLevelValidationDetails().get(0).state()); - Assertions.assertEquals(ValidationState.FAILED, + Assertions.assertEquals(ValidationState.SUCCEEDED, model.validationDetails().serverLevelValidationDetails().get(0).messages().get(0).state()); - Assertions.assertEquals("r", + Assertions.assertEquals("kanyktzlcuiywg", model.validationDetails().serverLevelValidationDetails().get(0).messages().get(0).message()); - Assertions.assertEquals("nwxuqlcvydyp", + Assertions.assertEquals("onlebxetqgtzxdpn", model.validationDetails().dbLevelValidationDetails().get(0).databaseName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-01T02:46:01Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-22T23:33:27Z"), model.validationDetails().dbLevelValidationDetails().get(0).startedOn()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-27T20:00:04Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T09:09:52Z"), model.validationDetails().dbLevelValidationDetails().get(0).endedOn()); - Assertions.assertEquals("kniod", + Assertions.assertEquals("feallnwsu", model.validationDetails().dbLevelValidationDetails().get(0).summary().get(0).type()); - Assertions.assertEquals(ValidationState.WARNING, + Assertions.assertEquals(ValidationState.SUCCEEDED, model.validationDetails().dbLevelValidationDetails().get(0).summary().get(0).state()); } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilityWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilityWithResponseMockTests.java index 13c473a5ad33..a55d8ddb1a0d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilityWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/MigrationsCheckNameAvailabilityWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -22,7 +22,7 @@ public final class MigrationsCheckNameAvailabilityWithResponseMockTests { @Test public void testCheckNameAvailabilityWithResponse() throws Exception { String responseStr - = "{\"name\":\"c\",\"type\":\"jikzoeovvtzej\",\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"tikyj\"}"; + = "{\"name\":\"hheioqaqhvseuf\",\"type\":\"qyrxp\",\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"sismjqfrddga\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testCheckNameAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); MigrationNameAvailability response = manager.migrations() - .checkNameAvailabilityWithResponse("agb", "idqlvhu", - new MigrationNameAvailabilityInner().withName("oveofizrvjfnmj").withType("vlwyzg"), + .checkNameAvailabilityWithResponse("aeukm", "sieekpndzaapm", + new MigrationNameAvailabilityInner().withName("dqmeqwigpibudq").withType("yxeb"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("c", response.name()); - Assertions.assertEquals("jikzoeovvtzej", response.type()); + Assertions.assertEquals("hheioqaqhvseuf", response.name()); + Assertions.assertEquals("qyrxp", response.type()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckGloballyWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckGloballyWithResponseMockTests.java index 253cecafe025..de3c20ab172e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckGloballyWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckGloballyWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -23,7 +23,7 @@ public final class NameAvailabilitiesCheckGloballyWithResponseMockTests { @Test public void testCheckGloballyWithResponse() throws Exception { String responseStr - = "{\"name\":\"glklb\",\"type\":\"lidwcwvmzegjon\",\"nameAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"gdn\"}"; + = "{\"name\":\"omflrytswfp\",\"type\":\"dgycxnmskwhqjjy\",\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"shhkvpedw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,12 +33,12 @@ public void testCheckGloballyWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NameAvailabilityModel response = manager.nameAvailabilities() - .checkGloballyWithResponse(new CheckNameAvailabilityRequest().withName("qvlnnpxybafiqgea").withType("bgj"), + .checkGloballyWithResponse(new CheckNameAvailabilityRequest().withName("digsxcdgl").withType("lkeuac"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertTrue(response.nameAvailable()); + Assertions.assertFalse(response.nameAvailable()); Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("gdn", response.message()); + Assertions.assertEquals("shhkvpedw", response.message()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckWithLocationWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckWithLocationWithResponseMockTests.java index 135fe8b2b5b7..47bb4a239fa3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckWithLocationWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilitiesCheckWithLocationWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -23,7 +23,7 @@ public final class NameAvailabilitiesCheckWithLocationWithResponseMockTests { @Test public void testCheckWithLocationWithResponse() throws Exception { String responseStr - = "{\"name\":\"acht\",\"type\":\"flrytswfpfm\",\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"mskwhqjjysl\"}"; + = "{\"name\":\"rrleaesinuqt\",\"type\":\"qobbpihehcec\",\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"rjb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testCheckWithLocationWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NameAvailabilityModel response = manager.nameAvailabilities() - .checkWithLocationWithResponse("z", - new CheckNameAvailabilityRequest().withName("fkspzhzmtksjci").withType("igsxcdgljplk"), + .checkWithLocationWithResponse("slsrhmpq", + new CheckNameAvailabilityRequest().withName("wskondcbrwimuvqe").withType("so"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertFalse(response.nameAvailable()); + Assertions.assertTrue(response.nameAvailable()); Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("mskwhqjjysl", response.message()); + Assertions.assertEquals("rjb", response.message()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityModelInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityModelInnerTests.java index b9978cafc7ff..f429cb1652e1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityModelInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NameAvailabilityModelInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,21 +13,10 @@ public final class NameAvailabilityModelInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NameAvailabilityModelInner model = BinaryData.fromString( - "{\"name\":\"qmqhldvriii\",\"type\":\"nalghfkvtvsexso\",\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"hhahhxvrhmzkwpjg\"}") + "{\"name\":\"vftjuhd\",\"type\":\"zkmtgguwpijrajci\",\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"cf\"}") .toObject(NameAvailabilityModelInner.class); - Assertions.assertFalse(model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("hhahhxvrhmzkwpjg", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameAvailabilityModelInner model = new NameAvailabilityModelInner().withNameAvailable(false) - .withReason(CheckNameAvailabilityReason.ALREADY_EXISTS) - .withMessage("hhahhxvrhmzkwpjg"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityModelInner.class); - Assertions.assertFalse(model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("hhahhxvrhmzkwpjg", model.message()); + Assertions.assertTrue(model.nameAvailable()); + Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); + Assertions.assertEquals("cf", model.message()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NamePropertyTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NamePropertyTests.java index a0738f425a7e..52b300d8ce77 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NamePropertyTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NamePropertyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,17 +11,9 @@ public final class NamePropertyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NameProperty model = BinaryData.fromString("{\"value\":\"gfwsrtaw\",\"localizedValue\":\"ezbrhubskh\"}") - .toObject(NameProperty.class); - Assertions.assertEquals("gfwsrtaw", model.value()); - Assertions.assertEquals("ezbrhubskh", model.localizedValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameProperty model = new NameProperty().withValue("gfwsrtaw").withLocalizedValue("ezbrhubskh"); - model = BinaryData.fromObject(model).toObject(NameProperty.class); - Assertions.assertEquals("gfwsrtaw", model.value()); - Assertions.assertEquals("ezbrhubskh", model.localizedValue()); + NameProperty model + = BinaryData.fromString("{\"value\":\"ti\",\"localizedValue\":\"cpwpg\"}").toObject(NameProperty.class); + Assertions.assertEquals("ti", model.value()); + Assertions.assertEquals("cpwpg", model.localizedValue()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NetworkTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NetworkTests.java index 211418763ecf..2abbb1e49a20 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NetworkTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/NetworkTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,21 +13,21 @@ public final class NetworkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Network model = BinaryData.fromString( - "{\"publicNetworkAccess\":\"Enabled\",\"delegatedSubnetResourceId\":\"w\",\"privateDnsZoneArmResourceId\":\"oupfgfb\"}") + "{\"publicNetworkAccess\":\"Disabled\",\"delegatedSubnetResourceId\":\"cxgod\",\"privateDnsZoneArmResourceId\":\"fqkkr\"}") .toObject(Network.class); - Assertions.assertEquals(ServerPublicNetworkAccessState.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("w", model.delegatedSubnetResourceId()); - Assertions.assertEquals("oupfgfb", model.privateDnsZoneArmResourceId()); + Assertions.assertEquals(ServerPublicNetworkAccessState.DISABLED, model.publicNetworkAccess()); + Assertions.assertEquals("cxgod", model.delegatedSubnetResourceId()); + Assertions.assertEquals("fqkkr", model.privateDnsZoneArmResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Network model = new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.ENABLED) - .withDelegatedSubnetResourceId("w") - .withPrivateDnsZoneArmResourceId("oupfgfb"); + Network model = new Network().withPublicNetworkAccess(ServerPublicNetworkAccessState.DISABLED) + .withDelegatedSubnetResourceId("cxgod") + .withPrivateDnsZoneArmResourceId("fqkkr"); model = BinaryData.fromObject(model).toObject(Network.class); - Assertions.assertEquals(ServerPublicNetworkAccessState.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("w", model.delegatedSubnetResourceId()); - Assertions.assertEquals("oupfgfb", model.privateDnsZoneArmResourceId()); + Assertions.assertEquals(ServerPublicNetworkAccessState.DISABLED, model.publicNetworkAccess()); + Assertions.assertEquals("cxgod", model.delegatedSubnetResourceId()); + Assertions.assertEquals("fqkkr", model.privateDnsZoneArmResourceId()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationDetailsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationDetailsTests.java index 719ea00bf98c..64200db905dc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationDetailsTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationDetailsTests.java @@ -1,45 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationDetails; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ObjectRecommendationDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ObjectRecommendationDetails model = BinaryData.fromString( - "{\"databaseName\":\"yklxubyjaffmmfbl\",\"schema\":\"cuubgq\",\"table\":\"rtalmet\",\"indexType\":\"wgdsl\",\"indexName\":\"ihhrmo\",\"indexColumns\":[\"qseypxiutcxa\"],\"includedColumns\":[\"y\",\"petogebjox\",\"lhvnhlab\",\"q\"]}") + "{\"databaseName\":\"wculkbaw\",\"schema\":\"ajnjwltlwtjj\",\"table\":\"ktalhsnvkcdmxz\",\"indexType\":\"oaimlnw\",\"indexName\":\"aomylwea\",\"indexColumns\":[\"cse\",\"hwwn\",\"jhlfzswpchwahf\"],\"includedColumns\":[\"snfepgfewetwlyx\",\"ncxykxhdjhlimm\",\"cxfhbcporxv\"]}") .toObject(ObjectRecommendationDetails.class); - Assertions.assertEquals("yklxubyjaffmmfbl", model.databaseName()); - Assertions.assertEquals("cuubgq", model.schema()); - Assertions.assertEquals("rtalmet", model.table()); - Assertions.assertEquals("wgdsl", model.indexType()); - Assertions.assertEquals("ihhrmo", model.indexName()); - Assertions.assertEquals("qseypxiutcxa", model.indexColumns().get(0)); - Assertions.assertEquals("y", model.includedColumns().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ObjectRecommendationDetails model = new ObjectRecommendationDetails().withDatabaseName("yklxubyjaffmmfbl") - .withSchema("cuubgq") - .withTable("rtalmet") - .withIndexType("wgdsl") - .withIndexName("ihhrmo") - .withIndexColumns(Arrays.asList("qseypxiutcxa")) - .withIncludedColumns(Arrays.asList("y", "petogebjox", "lhvnhlab", "q")); - model = BinaryData.fromObject(model).toObject(ObjectRecommendationDetails.class); - Assertions.assertEquals("yklxubyjaffmmfbl", model.databaseName()); - Assertions.assertEquals("cuubgq", model.schema()); - Assertions.assertEquals("rtalmet", model.table()); - Assertions.assertEquals("wgdsl", model.indexType()); - Assertions.assertEquals("ihhrmo", model.indexName()); - Assertions.assertEquals("qseypxiutcxa", model.indexColumns().get(0)); - Assertions.assertEquals("y", model.includedColumns().get(0)); + Assertions.assertEquals("wculkbaw", model.databaseName()); + Assertions.assertEquals("ajnjwltlwtjj", model.schema()); + Assertions.assertEquals("ktalhsnvkcdmxz", model.table()); + Assertions.assertEquals("oaimlnw", model.indexType()); + Assertions.assertEquals("aomylwea", model.indexName()); + Assertions.assertEquals("cse", model.indexColumns().get(0)); + Assertions.assertEquals("snfepgfewetwlyx", model.includedColumns().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationInnerTests.java index cc5472eb6723..7c70d126dc0b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,15 +12,8 @@ public final class ObjectRecommendationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ObjectRecommendationInner model = BinaryData.fromString( - "{\"kind\":\"pvz\",\"properties\":{\"initialRecommendedTime\":\"2021-10-27T23:39:54Z\",\"lastRecommendedTime\":\"2021-08-29T10:44:42Z\",\"timesRecommended\":763019330,\"improvedQueryIds\":[1962664267869044370,7705373271443062413,7572255712595871668],\"recommendationReason\":\"pkc\",\"currentState\":\"yzriykhy\",\"recommendationType\":\"AnalyzeTable\",\"implementationDetails\":{\"method\":\"lboxqvkjl\",\"script\":\"ho\"},\"analyzedWorkload\":{\"startTime\":\"2021-10-09T04:46:26Z\",\"endTime\":\"2021-11-30T18:11:35Z\",\"queryCount\":2141225677},\"estimatedImpact\":[{\"dimensionName\":\"mbnraauzzp\",\"unit\":\"a\",\"queryId\":8740215687103788004,\"absoluteValue\":53.76406796396901},{\"dimensionName\":\"wwvaiqyuvvfonk\",\"unit\":\"hqyikvy\",\"queryId\":4524825461883558353,\"absoluteValue\":68.83579712649399},{\"dimensionName\":\"wmn\",\"unit\":\"ttijfybvpoekrs\",\"queryId\":4160555160765706368,\"absoluteValue\":33.48124737837169},{\"dimensionName\":\"qgnjdgkynscli\",\"unit\":\"zvhxnk\",\"queryId\":620897221549417842,\"absoluteValue\":10.444343586936233}],\"details\":{\"databaseName\":\"pnvdxz\",\"schema\":\"ihfrbbcevqa\",\"table\":\"ltd\",\"indexType\":\"fkqojpy\",\"indexName\":\"gtrd\",\"indexColumns\":[\"fmzzsdymbrny\",\"u\"],\"includedColumns\":[\"rafwgckhocxvdf\",\"fwafqrouda\",\"pavehhr\"]}},\"id\":\"bunzozudh\",\"name\":\"xg\",\"type\":\"moy\"}") + "{\"kind\":\"uzqgnjdgkynsc\",\"properties\":{\"initialRecommendedTime\":\"2021-10-10T10:14:10Z\",\"lastRecommendedTime\":\"2020-12-25T01:29:23Z\",\"timesRecommended\":329214122,\"improvedQueryIds\":[6655292245170296205,620897221549417842,33264543630937640],\"recommendationReason\":\"tppn\",\"currentState\":\"xz\",\"recommendationType\":\"ReIndex\",\"implementationDetails\":{\"method\":\"rbbcevq\",\"script\":\"tltdhlfkqojpy\"},\"analyzedWorkload\":{\"startTime\":\"2021-03-27T20:00:22Z\",\"endTime\":\"2021-06-25T09:04:13Z\",\"queryCount\":1947341896},\"estimatedImpact\":[{\"dimensionName\":\"zzsdym\",\"unit\":\"nysuxmprafwgckh\",\"queryId\":2759848786067282339,\"absoluteValue\":94.70308474928703},{\"dimensionName\":\"wafqroud\",\"unit\":\"pavehhr\",\"queryId\":951472064558788618,\"absoluteValue\":18.57995999456683},{\"dimensionName\":\"ud\",\"unit\":\"xg\",\"queryId\":52619400829674565,\"absoluteValue\":88.88418123004465}],\"details\":{\"databaseName\":\"ibhmfdn\",\"schema\":\"ydvfvfcjnae\",\"table\":\"srvhmgorffuki\",\"indexType\":\"vwmzhwplefaxvxil\",\"indexName\":\"tg\",\"indexColumns\":[\"zeyqxtjjfzqlqhyc\",\"vodggxdbee\",\"mieknlraria\"],\"includedColumns\":[\"uagydwqfbylyrf\",\"iagtc\",\"jocqwogfnzjvusf\",\"ld\"]}},\"id\":\"zuxylfsbtkadpyso\",\"name\":\"nbtgkbugrjqctoj\",\"type\":\"mi\"}") .toObject(ObjectRecommendationInner.class); - Assertions.assertEquals("pvz", model.kind()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ObjectRecommendationInner model = new ObjectRecommendationInner().withKind("pvz"); - model = BinaryData.fromObject(model).toObject(ObjectRecommendationInner.class); - Assertions.assertEquals("pvz", model.kind()); + Assertions.assertEquals("uzqgnjdgkynsc", model.kind()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationListTests.java index 7fe16b933af4..52051d1075ad 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationListTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationListTests.java @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationList; -import java.util.Arrays; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.ObjectRecommendationList; import org.junit.jupiter.api.Assertions; public final class ObjectRecommendationListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ObjectRecommendationList model = BinaryData.fromString( - "{\"value\":[{\"kind\":\"podbzevwrdnh\",\"properties\":{\"initialRecommendedTime\":\"2021-08-05T14:25:50Z\",\"lastRecommendedTime\":\"2021-04-26T19:15:59Z\",\"timesRecommended\":437386763,\"improvedQueryIds\":[5191466923245315601,841676963872449061,5004966782756902203,4895796694367228378],\"recommendationReason\":\"ypfcvlerchpqbmf\",\"currentState\":\"babwidfcxss\",\"recommendationType\":\"DropIndex\",\"implementationDetails\":{\"method\":\"oxyhkxgqddrihpf\",\"script\":\"qcaaewdaomdjvl\"},\"analyzedWorkload\":{\"startTime\":\"2021-04-29T09:29:01Z\",\"endTime\":\"2021-05-04T10:40:20Z\",\"queryCount\":1445056578},\"estimatedImpact\":[{\"dimensionName\":\"eivsiykzkdnc\",\"unit\":\"xonbzoggculapz\",\"queryId\":1506759531951154202,\"absoluteValue\":74.37869960880928},{\"dimensionName\":\"qxepnylbfuaj\",\"unit\":\"jtlvofqzhvfciby\",\"queryId\":3860000272436496584,\"absoluteValue\":43.901636834880186}],\"details\":{\"databaseName\":\"pvdwxf\",\"schema\":\"iivwzjbhyzsxjrka\",\"table\":\"trnegvmnvuqeqvld\",\"indexType\":\"astjbkkdmflvestm\",\"indexName\":\"xrrilozapee\",\"indexColumns\":[\"pxlktwkuziycsl\",\"vu\",\"uztcktyhjtqed\",\"gzulwmmrqzzr\"],\"includedColumns\":[\"pglydz\",\"krvq\"]}},\"id\":\"vtoepryutnw\",\"name\":\"tpzdmovzvfvaawzq\",\"type\":\"dflgzuri\"}],\"nextLink\":\"aecxndtic\"}") + "{\"value\":[{\"kind\":\"jplmagstcy\",\"properties\":{\"initialRecommendedTime\":\"2021-08-03T08:44:11Z\",\"lastRecommendedTime\":\"2021-07-07T18:13:24Z\",\"timesRecommended\":395155446,\"improvedQueryIds\":[1262409922519510699,1195208256670964085,2788413184397812768],\"recommendationReason\":\"kmnwqjnobaiyhddv\",\"currentState\":\"cegfnmntfp\",\"recommendationType\":\"AnalyzeTable\",\"implementationDetails\":{\"method\":\"fnczdwvvbalx\",\"script\":\"lchpodbzevwrdn\"},\"analyzedWorkload\":{\"startTime\":\"2021-09-11T07:01:54Z\",\"endTime\":\"2021-02-28T10:58:20Z\",\"queryCount\":2106515877},\"estimatedImpact\":[{\"dimensionName\":\"smystuluqypfc\",\"unit\":\"er\",\"queryId\":1780098664314375778,\"absoluteValue\":48.84120379485959},{\"dimensionName\":\"jbabwidf\",\"unit\":\"sspuunnoxyhkx\",\"queryId\":8020031567540996314,\"absoluteValue\":5.1182852267597}],\"details\":{\"databaseName\":\"hoqca\",\"schema\":\"wdaomdjvlpjxxkzb\",\"table\":\"sgeivsiy\",\"indexType\":\"kdncj\",\"indexName\":\"onbzoggculapzwy\",\"indexColumns\":[\"ogtqxepnylbf\",\"ajlyjtlvofqzhv\",\"cib\",\"fmo\"],\"includedColumns\":[\"rkjpvdwxfzwii\",\"wzjbh\"]}},\"id\":\"sxjrk\",\"name\":\"mbtrnegvmnvu\",\"type\":\"eqvldspast\"},{\"kind\":\"kkdmfl\",\"properties\":{\"initialRecommendedTime\":\"2021-01-02T21:41:34Z\",\"lastRecommendedTime\":\"2021-02-05T22:56:54Z\",\"timesRecommended\":756883451,\"improvedQueryIds\":[7779285520274326372],\"recommendationReason\":\"zapeewchpx\",\"currentState\":\"twkuziycs\",\"recommendationType\":\"CreateIndex\",\"implementationDetails\":{\"method\":\"uztcktyhjtqed\",\"script\":\"zulwmmrqzzrrj\"},\"analyzedWorkload\":{\"startTime\":\"2021-01-23T08:33:04Z\",\"endTime\":\"2021-06-18T06:48:52Z\",\"queryCount\":431547090},\"estimatedImpact\":[{\"dimensionName\":\"qeevt\",\"unit\":\"pryu\",\"queryId\":2061235851967739080,\"absoluteValue\":23.045178376634258},{\"dimensionName\":\"mov\",\"unit\":\"fvaawzqa\",\"queryId\":7676927121011050482,\"absoluteValue\":7.41119746224509},{\"dimensionName\":\"glae\",\"unit\":\"ndtic\",\"queryId\":2952144912587821446,\"absoluteValue\":64.79667220068606},{\"dimensionName\":\"t\",\"unit\":\"dgxobfircl\",\"queryId\":8663475009499741553,\"absoluteValue\":25.982616021906413}],\"details\":{\"databaseName\":\"iykhy\",\"schema\":\"fvjlboxqvkjlmx\",\"table\":\"mdy\",\"indexType\":\"dwdigumb\",\"indexName\":\"aauzzptjazysd\",\"indexColumns\":[\"zwwva\",\"qyuvvfonkp\"],\"includedColumns\":[\"yik\",\"y\"]}},\"id\":\"uyav\",\"name\":\"uwmncs\",\"type\":\"tijfybvp\"}],\"nextLink\":\"krsgsgb\"}") .toObject(ObjectRecommendationList.class); - Assertions.assertEquals("podbzevwrdnh", model.value().get(0).kind()); - Assertions.assertEquals("aecxndtic", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ObjectRecommendationList model = new ObjectRecommendationList() - .withValue(Arrays.asList(new ObjectRecommendationInner().withKind("podbzevwrdnh"))) - .withNextLink("aecxndtic"); - model = BinaryData.fromObject(model).toObject(ObjectRecommendationList.class); - Assertions.assertEquals("podbzevwrdnh", model.value().get(0).kind()); - Assertions.assertEquals("aecxndtic", model.nextLink()); + Assertions.assertEquals("jplmagstcy", model.value().get(0).kind()); + Assertions.assertEquals("krsgsgb", model.nextLink()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesAnalyzedWorkloadTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesAnalyzedWorkloadTests.java index 834aae0e7999..868d67c73602 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesAnalyzedWorkloadTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesAnalyzedWorkloadTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,22 +13,10 @@ public final class ObjectRecommendationPropertiesAnalyzedWorkloadTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ObjectRecommendationPropertiesAnalyzedWorkload model = BinaryData.fromString( - "{\"startTime\":\"2021-03-15T08:57:58Z\",\"endTime\":\"2021-09-15T05:47:21Z\",\"queryCount\":594381501}") + "{\"startTime\":\"2021-09-19T18:47:12Z\",\"endTime\":\"2021-11-01T14:17:44Z\",\"queryCount\":1955042837}") .toObject(ObjectRecommendationPropertiesAnalyzedWorkload.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-15T08:57:58Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-15T05:47:21Z"), model.endTime()); - Assertions.assertEquals(594381501, model.queryCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ObjectRecommendationPropertiesAnalyzedWorkload model = new ObjectRecommendationPropertiesAnalyzedWorkload() - .withStartTime(OffsetDateTime.parse("2021-03-15T08:57:58Z")) - .withEndTime(OffsetDateTime.parse("2021-09-15T05:47:21Z")) - .withQueryCount(594381501); - model = BinaryData.fromObject(model).toObject(ObjectRecommendationPropertiesAnalyzedWorkload.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-15T08:57:58Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-15T05:47:21Z"), model.endTime()); - Assertions.assertEquals(594381501, model.queryCount()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-19T18:47:12Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T14:17:44Z"), model.endTime()); + Assertions.assertEquals(1955042837, model.queryCount()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesImplementationDetailsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesImplementationDetailsTests.java index 68025d4152d4..711a5a1283fb 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesImplementationDetailsTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesImplementationDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,19 +12,9 @@ public final class ObjectRecommendationPropertiesImplementationDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ObjectRecommendationPropertiesImplementationDetails model - = BinaryData.fromString("{\"method\":\"txmwoteyow\",\"script\":\"uqovekqvgqouwif\"}") + = BinaryData.fromString("{\"method\":\"eitpkxztmo\",\"script\":\"klf\"}") .toObject(ObjectRecommendationPropertiesImplementationDetails.class); - Assertions.assertEquals("txmwoteyow", model.method()); - Assertions.assertEquals("uqovekqvgqouwif", model.script()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ObjectRecommendationPropertiesImplementationDetails model - = new ObjectRecommendationPropertiesImplementationDetails().withMethod("txmwoteyow") - .withScript("uqovekqvgqouwif"); - model = BinaryData.fromObject(model).toObject(ObjectRecommendationPropertiesImplementationDetails.class); - Assertions.assertEquals("txmwoteyow", model.method()); - Assertions.assertEquals("uqovekqvgqouwif", model.script()); + Assertions.assertEquals("eitpkxztmo", model.method()); + Assertions.assertEquals("klf", model.script()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesTests.java index 52f52a335c61..63f3652ab1d6 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ObjectRecommendationPropertiesTests.java @@ -1,67 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ObjectRecommendationProperties; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesAnalyzedWorkload; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ObjectRecommendationPropertiesImplementationDetails; import com.azure.resourcemanager.postgresqlflexibleserver.models.RecommendationTypeEnum; import java.time.OffsetDateTime; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ObjectRecommendationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ObjectRecommendationProperties model = BinaryData.fromString( - "{\"initialRecommendedTime\":\"2021-11-01T06:19:12Z\",\"lastRecommendedTime\":\"2021-04-27T04:32:10Z\",\"timesRecommended\":1904472040,\"improvedQueryIds\":[2557149039383671323],\"recommendationReason\":\"bzydvfvfcj\",\"currentState\":\"eoisrvhmgor\",\"recommendationType\":\"ReIndex\",\"implementationDetails\":{\"method\":\"scvwmzhwplef\",\"script\":\"vxilcbt\"},\"analyzedWorkload\":{\"startTime\":\"2021-02-03T00:44:07Z\",\"endTime\":\"2021-09-14T23:20:53Z\",\"queryCount\":1529157680},\"estimatedImpact\":[{\"dimensionName\":\"jfzqlqhycavodgg\",\"unit\":\"beesmieknlra\",\"queryId\":5499561988006889896,\"absoluteValue\":94.1788999123394}],\"details\":{\"databaseName\":\"ydwqfbylyrf\",\"schema\":\"agt\",\"table\":\"jocqwogfnzjvusf\",\"indexType\":\"dmozu\",\"indexName\":\"lfsbtkadpysow\",\"indexColumns\":[\"gkbugrjqct\",\"jc\",\"isofieypefojyqd\",\"cuplcplcwkhih\"],\"includedColumns\":[\"hzdsqtzbsrgnow\",\"jhf\",\"mvec\"]}}") + "{\"initialRecommendedTime\":\"2021-11-09T20:08:20Z\",\"lastRecommendedTime\":\"2021-05-31T05:32:56Z\",\"timesRecommended\":443890613,\"improvedQueryIds\":[7153794569128378477],\"recommendationReason\":\"qdhcu\",\"currentState\":\"cp\",\"recommendationType\":\"AnalyzeTable\",\"implementationDetails\":{\"method\":\"ihih\",\"script\":\"zdsqtzbsrgnow\"},\"analyzedWorkload\":{\"startTime\":\"2021-06-16T23:00:15Z\",\"endTime\":\"2021-10-20T17:04:20Z\",\"queryCount\":1592470818},\"estimatedImpact\":[{\"dimensionName\":\"txmwoteyow\",\"unit\":\"uqovekqvgqouwif\",\"queryId\":5876039921440092751,\"absoluteValue\":87.86793893335792},{\"dimensionName\":\"qikfxcv\",\"unit\":\"fsphuagrttikt\",\"queryId\":6566397554835939309,\"absoluteValue\":40.716755209430964},{\"dimensionName\":\"yklxubyjaffmmfbl\",\"unit\":\"cuubgq\",\"queryId\":6925699685066088287,\"absoluteValue\":85.45889182558048},{\"dimensionName\":\"tttwgdslqxih\",\"unit\":\"moo\",\"queryId\":3464871827628211920,\"absoluteValue\":59.74368654938724}],\"details\":{\"databaseName\":\"utcxapzhy\",\"schema\":\"etoge\",\"table\":\"oxslh\",\"indexType\":\"hlabrq\",\"indexName\":\"kzjcjbtrgae\",\"indexColumns\":[\"ib\"],\"includedColumns\":[\"jsto\"]}}") .toObject(ObjectRecommendationProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T06:19:12Z"), model.initialRecommendedTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T04:32:10Z"), model.lastRecommendedTime()); - Assertions.assertEquals(1904472040, model.timesRecommended()); - Assertions.assertEquals(2557149039383671323L, model.improvedQueryIds().get(0)); - Assertions.assertEquals("bzydvfvfcj", model.recommendationReason()); - Assertions.assertEquals("eoisrvhmgor", model.currentState()); - Assertions.assertEquals(RecommendationTypeEnum.RE_INDEX, model.recommendationType()); - Assertions.assertEquals("scvwmzhwplef", model.implementationDetails().method()); - Assertions.assertEquals("vxilcbt", model.implementationDetails().script()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-03T00:44:07Z"), model.analyzedWorkload().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-14T23:20:53Z"), model.analyzedWorkload().endTime()); - Assertions.assertEquals(1529157680, model.analyzedWorkload().queryCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ObjectRecommendationProperties model = new ObjectRecommendationProperties() - .withInitialRecommendedTime(OffsetDateTime.parse("2021-11-01T06:19:12Z")) - .withLastRecommendedTime(OffsetDateTime.parse("2021-04-27T04:32:10Z")) - .withTimesRecommended(1904472040) - .withImprovedQueryIds(Arrays.asList(2557149039383671323L)) - .withRecommendationReason("bzydvfvfcj") - .withCurrentState("eoisrvhmgor") - .withRecommendationType(RecommendationTypeEnum.RE_INDEX) - .withImplementationDetails( - new ObjectRecommendationPropertiesImplementationDetails().withMethod("scvwmzhwplef") - .withScript("vxilcbt")) - .withAnalyzedWorkload(new ObjectRecommendationPropertiesAnalyzedWorkload() - .withStartTime(OffsetDateTime.parse("2021-02-03T00:44:07Z")) - .withEndTime(OffsetDateTime.parse("2021-09-14T23:20:53Z")) - .withQueryCount(1529157680)); - model = BinaryData.fromObject(model).toObject(ObjectRecommendationProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T06:19:12Z"), model.initialRecommendedTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T04:32:10Z"), model.lastRecommendedTime()); - Assertions.assertEquals(1904472040, model.timesRecommended()); - Assertions.assertEquals(2557149039383671323L, model.improvedQueryIds().get(0)); - Assertions.assertEquals("bzydvfvfcj", model.recommendationReason()); - Assertions.assertEquals("eoisrvhmgor", model.currentState()); - Assertions.assertEquals(RecommendationTypeEnum.RE_INDEX, model.recommendationType()); - Assertions.assertEquals("scvwmzhwplef", model.implementationDetails().method()); - Assertions.assertEquals("vxilcbt", model.implementationDetails().script()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-03T00:44:07Z"), model.analyzedWorkload().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-14T23:20:53Z"), model.analyzedWorkload().endTime()); - Assertions.assertEquals(1529157680, model.analyzedWorkload().queryCount()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-09T20:08:20Z"), model.initialRecommendedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-31T05:32:56Z"), model.lastRecommendedTime()); + Assertions.assertEquals(443890613, model.timesRecommended()); + Assertions.assertEquals(7153794569128378477L, model.improvedQueryIds().get(0)); + Assertions.assertEquals("qdhcu", model.recommendationReason()); + Assertions.assertEquals("cp", model.currentState()); + Assertions.assertEquals(RecommendationTypeEnum.ANALYZE_TABLE, model.recommendationType()); + Assertions.assertEquals("ihih", model.implementationDetails().method()); + Assertions.assertEquals("zdsqtzbsrgnow", model.implementationDetails().script()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-16T23:00:15Z"), model.analyzedWorkload().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-20T17:04:20Z"), model.analyzedWorkload().endTime()); + Assertions.assertEquals(1592470818, model.analyzedWorkload().queryCount()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationDisplayTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationDisplayTests.java index f01790b8cae4..22854f85e24f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationDisplayTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationDisplayTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -10,14 +10,8 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData - .fromString("{\"provider\":\"zpxdt\",\"resource\":\"dm\",\"operation\":\"j\",\"description\":\"wuenvr\"}") + OperationDisplay model = BinaryData.fromString( + "{\"provider\":\"cnyejhkryhtnapcz\",\"resource\":\"okjye\",\"operation\":\"kvnipjoxz\",\"description\":\"chgejspodm\"}") .toObject(OperationDisplay.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationInnerTests.java index 8ca2f5b7c615..00943dfa291b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,15 +12,8 @@ public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationInner model = BinaryData.fromString( - "{\"name\":\"xt\",\"display\":{\"provider\":\"mhjglikkxwslolb\",\"resource\":\"vuzlm\",\"operation\":\"elfk\",\"description\":\"plcrpwjxeznoig\"},\"isDataAction\":true,\"origin\":\"user\",\"properties\":{\"azej\":\"datakpnb\",\"hsxttaugzxnf\":\"dataoqkag\"}}") + "{\"name\":\"ifpikxwczby\",\"display\":{\"provider\":\"pqxu\",\"resource\":\"vyq\",\"operation\":\"wby\",\"description\":\"k\"},\"isDataAction\":true,\"origin\":\"user\",\"properties\":{\"ukxgaud\":\"datartfw\",\"h\":\"datacs\"}}") .toObject(OperationInner.class); Assertions.assertTrue(model.isDataAction()); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withIsDataAction(true); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertTrue(model.isDataAction()); - } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationListTests.java index db88f539f891..f4eb5fafe591 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationListTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationListTests.java @@ -1,33 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.OperationInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.OperationList; -import java.util.Arrays; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.OperationList; import org.junit.jupiter.api.Assertions; public final class OperationListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationList model = BinaryData.fromString( - "{\"value\":[{\"name\":\"grjguufzd\",\"display\":{\"provider\":\"qtfihwhbotzinga\",\"resource\":\"pph\",\"operation\":\"zqzudph\",\"description\":\"mvdk\"},\"isDataAction\":false,\"origin\":\"system\",\"properties\":{\"atkzwpcnpw\":\"datatbvkayhmtnvyq\",\"cyajguqf\":\"datacjaesgvvs\"}},{\"name\":\"ygz\",\"display\":{\"provider\":\"nk\",\"resource\":\"usemdwzrmuhap\",\"operation\":\"qdpsqxqvpsvu\",\"description\":\"mgccelvezrypq\"},\"isDataAction\":false,\"origin\":\"user\",\"properties\":{\"kobopgxed\":\"datarqwky\",\"ccsnjvcdwxlpq\":\"dataowepbqpcrfkb\",\"wfqatmtd\":\"datakftnkhtjsyin\",\"ywkbirryuzhlhkjo\":\"datatmdvypgikdgs\"}},{\"name\":\"vqqaatjinrvgo\",\"display\":{\"provider\":\"fiibfggjioolvr\",\"resource\":\"kvtkkg\",\"operation\":\"qwjygvja\",\"description\":\"blmhvkzuhb\"},\"isDataAction\":false,\"origin\":\"user\",\"properties\":{\"wz\":\"dataopbyrqufegxu\"}},{\"name\":\"nhlmctlpdng\",\"display\":{\"provider\":\"gbmhrixkwmyi\",\"resource\":\"jvegrhbpnaixexcc\",\"operation\":\"reaxhcexdr\",\"description\":\"qahqkghtpwijn\"},\"isDataAction\":true,\"origin\":\"system\",\"properties\":{\"mtg\":\"datacxzbfvoowvr\",\"y\":\"dataqp\",\"ronzmyhgfip\":\"datas\"}}],\"nextLink\":\"xkmcwaekrrjre\"}") + "{\"value\":[{\"name\":\"hq\",\"display\":{\"provider\":\"jxpybczmeh\",\"resource\":\"zopbsphrupidgs\",\"operation\":\"bejhphoycmsxa\",\"description\":\"hdxbmtqio\"},\"isDataAction\":false,\"origin\":\"system\",\"properties\":{\"ownoizhw\":\"datamuf\",\"jgkdmbpazlobcu\":\"datarxybqsoq\"}},{\"name\":\"dznrbtcqq\",\"display\":{\"provider\":\"glhqg\",\"resource\":\"foooj\",\"operation\":\"ifsqesaagdfmg\",\"description\":\"lhjxr\"},\"isDataAction\":false,\"origin\":\"NotSpecified\",\"properties\":{\"jpsq\":\"dataktsizntocipaou\",\"jofjd\":\"datacmpoyfdkfogkny\",\"zyf\":\"dataeqsrdeupewnwreit\",\"hs\":\"datausarhmofc\"}},{\"name\":\"urkdtmlx\",\"display\":{\"provider\":\"uksjtxukcdmp\",\"resource\":\"cryuan\",\"operation\":\"uxzdxtay\",\"description\":\"hmwhfpmrqo\"},\"isDataAction\":false,\"origin\":\"system\",\"properties\":{\"nwzsymg\":\"dataryrtihfxtijbpzv\",\"anufhfcbjysag\":\"datazufcyzkohdbi\"}}],\"nextLink\":\"hxqh\"}") .toObject(OperationList.class); Assertions.assertFalse(model.value().get(0).isDataAction()); - Assertions.assertEquals("xkmcwaekrrjre", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationList model = new OperationList().withValue( - Arrays.asList(new OperationInner().withIsDataAction(false), new OperationInner().withIsDataAction(false), - new OperationInner().withIsDataAction(false), new OperationInner().withIsDataAction(true))) - .withNextLink("xkmcwaekrrjre"); - model = BinaryData.fromObject(model).toObject(OperationList.class); - Assertions.assertFalse(model.value().get(0).isDataAction()); - Assertions.assertEquals("xkmcwaekrrjre", model.nextLink()); + Assertions.assertEquals("hxqh", model.nextLink()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListMockTests.java index 7f39c3fcd04e..7da5dde20c1d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/OperationsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -22,7 +22,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"lpshhkvpedwqslsr\",\"display\":{\"provider\":\"qvwwsko\",\"resource\":\"cbrwi\",\"operation\":\"vqejosovy\",\"description\":\"leaesi\"},\"isDataAction\":true,\"origin\":\"system\",\"properties\":{\"cy\":\"dataobbpihehc\",\"kfrexcrseqwjks\":\"datamrqbrjbbmpxdlv\",\"zhxogjggsvo\":\"datahud\"}}]}"; + = "{\"value\":[{\"name\":\"megni\",\"display\":{\"provider\":\"kxlzyqdrfeg\",\"resource\":\"alzxwhcan\",\"operation\":\"moy\",\"description\":\"lwigdivbkbx\"},\"isDataAction\":false,\"origin\":\"user\",\"properties\":{\"xakjsqzhzb\":\"datawasqvdaeyyg\",\"asi\":\"datazkgimsid\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,6 +33,6 @@ public void testList() throws Exception { PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertTrue(response.iterator().next().isDataAction()); + Assertions.assertFalse(response.iterator().next().isDataAction()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixesGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixesGetWithResponseMockTests.java index 3c7a290f5887..42ea66dad454 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixesGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateDnsZoneSuffixesGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -19,7 +19,7 @@ public final class PrivateDnsZoneSuffixesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - String responseStr = "\"jkxibda\""; + String responseStr = "\"mpxdlvy\""; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,6 +30,6 @@ public void testGetWithResponse() throws Exception { String response = manager.privateDnsZoneSuffixes().getWithResponse(com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("jkxibda", response); + Assertions.assertEquals("mpxdlvy", response); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionInnerTests.java index c186bef8cc30..84de68828c7e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -15,12 +15,12 @@ public final class PrivateEndpointConnectionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionInner model = BinaryData.fromString( - "{\"properties\":{\"groupIds\":[\"uaibrebqaaysj\"],\"privateEndpoint\":{\"id\":\"qtnqtt\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"fffiak\",\"actionsRequired\":\"pqqmted\"},\"provisioningState\":\"Succeeded\"},\"id\":\"jihy\",\"name\":\"ozphvwauyqncygu\",\"type\":\"kvi\"}") + "{\"properties\":{\"groupIds\":[\"ibnuqqkpik\",\"drgvtqagn\",\"uynhijg\"],\"privateEndpoint\":{\"id\":\"bfs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"utrc\",\"actionsRequired\":\"na\"},\"provisioningState\":\"Failed\"},\"id\":\"jrunmpxtt\",\"name\":\"bh\",\"type\":\"bnlankxmyskpb\"}") .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("fffiak", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("pqqmted", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("utrc", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("na", model.privateLinkServiceConnectionState().actionsRequired()); } @org.junit.jupiter.api.Test @@ -28,13 +28,13 @@ public void testSerialize() throws Exception { PrivateEndpointConnectionInner model = new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("fffiak") - .withActionsRequired("pqqmted")); + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("utrc") + .withActionsRequired("na")); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("fffiak", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("pqqmted", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("utrc", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("na", model.privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionListTests.java index 7abc69caa1f2..2c8871e7520f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionListTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionListTests.java @@ -1,26 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnectionList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.PrivateEndpointConnectionList; import org.junit.jupiter.api.Assertions; public final class PrivateEndpointConnectionListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupIds\":[\"ntwjch\",\"dgoihxumwctondzj\",\"uu\"],\"privateEndpoint\":{\"id\":\"lwg\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"bwtovvtgseinqf\",\"actionsRequired\":\"fxqknpirgneptt\"},\"provisioningState\":\"Creating\"},\"id\":\"niffcdmqnroj\",\"name\":\"pij\",\"type\":\"k\"}],\"nextLink\":\"frddhcrati\"}") + "{\"value\":[{\"properties\":{\"groupIds\":[\"sub\",\"gjb\",\"rxbpyb\",\"rfbjf\"],\"privateEndpoint\":{\"id\":\"ssotftpv\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"xilzznf\",\"actionsRequired\":\"nvwpmqtaruouj\"},\"provisioningState\":\"Creating\"},\"id\":\"hwqytj\",\"name\":\"ybn\",\"type\":\"jewgdrjerv\"},{\"properties\":{\"groupIds\":[\"qp\",\"hin\"],\"privateEndpoint\":{\"id\":\"gmifthnzd\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"gnayqigynduh\",\"actionsRequired\":\"hqlkthumaqo\"},\"provisioningState\":\"Creating\"},\"id\":\"cdui\",\"name\":\"r\",\"type\":\"gccymvaolpssl\"},{\"properties\":{\"groupIds\":[\"mdnbbglzpswiy\",\"mcwyhzdxssadb\",\"mnvdfzn\"],\"privateEndpoint\":{\"id\":\"od\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"ncblylpst\",\"actionsRequired\":\"hh\"},\"provisioningState\":\"Failed\"},\"id\":\"dzu\",\"name\":\"erscdntne\",\"type\":\"fiwjmygtdssls\"},{\"properties\":{\"groupIds\":[\"eriofzpyqs\",\"mwabnetshhszhedp\",\"vwiwubmwmbesld\",\"k\"],\"privateEndpoint\":{\"id\":\"pp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"xogaokonzmnsikv\",\"actionsRequired\":\"qzeqqkdltfzxm\"},\"provisioningState\":\"Succeeded\"},\"id\":\"gureodkwobdag\",\"name\":\"tibqdxbxwakb\",\"type\":\"gqxndlkzgxhuripl\"}],\"nextLink\":\"odxun\"}") .toObject(PrivateEndpointConnectionList.class); - Assertions.assertEquals("frddhcrati", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionList model = new PrivateEndpointConnectionList().withNextLink("frddhcrati"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionList.class); - Assertions.assertEquals("frddhcrati", model.nextLink()); + Assertions.assertEquals("odxun", model.nextLink()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionPropertiesTests.java index fd46c37f8195..951180245750 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionPropertiesTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -15,12 +15,12 @@ public final class PrivateEndpointConnectionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"groupIds\":[\"scw\",\"qupevzh\",\"stotxh\",\"jujbypelmcuvhixb\"],\"privateEndpoint\":{\"id\":\"fw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"coolsttpkiwkkb\",\"actionsRequired\":\"jrywvtylbfpnc\"},\"provisioningState\":\"Creating\"}") + "{\"groupIds\":[\"btkcxywnytnrsyn\",\"qidybyx\",\"zfcl\",\"aaxdbabphlwrq\"],\"privateEndpoint\":{\"id\":\"tsthsucocm\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"zt\",\"actionsRequired\":\"twwrqp\"},\"provisioningState\":\"Deleting\"}") .toObject(PrivateEndpointConnectionProperties.class); Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("coolsttpkiwkkb", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("jrywvtylbfpnc", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("zt", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("twwrqp", model.privateLinkServiceConnectionState().actionsRequired()); } @org.junit.jupiter.api.Test @@ -29,12 +29,12 @@ public void testSerialize() throws Exception { = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) .withPrivateLinkServiceConnectionState( new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("coolsttpkiwkkb") - .withActionsRequired("jrywvtylbfpnc")); + .withDescription("zt") + .withActionsRequired("twwrqp")); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("coolsttpkiwkkb", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("jrywvtylbfpnc", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("zt", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("twwrqp", model.privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java index 6d28655f657d..28816825add4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -22,7 +22,7 @@ public final class PrivateEndpointConnectionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"groupIds\":[\"eimawzovgkkumui\",\"jcjcazt\",\"wsnsqowx\"],\"privateEndpoint\":{\"id\":\"mlikytw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"swkacvej\",\"actionsRequired\":\"dvlvhbwrnfxtgdd\"},\"provisioningState\":\"Succeeded\"},\"id\":\"ehnmnaoyankco\",\"name\":\"qswankltytmhdr\",\"type\":\"znnhd\"}"; + = "{\"properties\":{\"groupIds\":[\"bpneqvcwwyyurm\",\"chpp\",\"prsnmokayzejn\"],\"privateEndpoint\":{\"id\":\"kpbz\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"ljhah\",\"actionsRequired\":\"echndbnwieholew\"},\"provisioningState\":\"Deleting\"},\"id\":\"ubwefqs\",\"name\":\"ap\",\"type\":\"qtferrqwexjkmf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnection response = manager.privateEndpointConnections() - .getWithResponse("hrkmdyomkxfbvfbh", "y", "rhpw", com.azure.core.util.Context.NONE) + .getWithResponse("sbostzel", "dlat", "tmzlbiojlv", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("swkacvej", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dvlvhbwrnfxtgdd", response.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("ljhah", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("echndbnwieholew", response.privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerMockTests.java index bf3d58a68487..65b2d16d9642 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsListByServerMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -23,7 +23,7 @@ public final class PrivateEndpointConnectionsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"groupIds\":[\"jpmcub\",\"mifoxxkub\"],\"privateEndpoint\":{\"id\":\"avp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"bqgvgovpbbtte\",\"actionsRequired\":\"oknssqyzqedikdf\"},\"provisioningState\":\"Deleting\"},\"id\":\"qmrjg\",\"name\":\"ihfqlggwfiwzc\",\"type\":\"mjpb\"}]}"; + = "{\"value\":[{\"properties\":{\"groupIds\":[\"ljgkyex\"],\"privateEndpoint\":{\"id\":\"uy\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"dsdaultxijjumf\",\"actionsRequired\":\"azlnqnmcjngzqdqx\"},\"provisioningState\":\"Succeeded\"},\"id\":\"gny\",\"name\":\"usfzsvtuikzha\",\"type\":\"qglcfhmlrqryxynq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testListByServer() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.privateEndpointConnections().listByServer("d", "fypiv", com.azure.core.util.Context.NONE); + PagedIterable response = manager.privateEndpointConnections() + .listByServer("apjwogqqnobpudcd", "btqwpwyawbzas", com.azure.core.util.Context.NONE); Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("bqgvgovpbbtte", + Assertions.assertEquals("dsdaultxijjumf", response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("oknssqyzqedikdf", + Assertions.assertEquals("azlnqnmcjngzqdqx", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateMockTests.java deleted file mode 100644 index b2657b3bf9e9..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointConnectionsUpdateMockTests.java +++ /dev/null @@ -1,51 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpoint; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointConnection; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkServiceConnectionState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsUpdateMockTests { - @Test - public void testUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"groupIds\":[\"kixkykxdssjpemm\",\"cfxhikkflrmy\",\"yincql\"],\"privateEndpoint\":{\"id\":\"s\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"iiiovgqcgxuugq\",\"actionsRequired\":\"totiowlxteqdptjg\"},\"provisioningState\":\"Succeeded\"},\"id\":\"ukranblw\",\"name\":\"hqlkccuzgygqwaho\",\"type\":\"ulwgniiprglvawuw\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PrivateEndpointConnection response = manager.privateEndpointConnections() - .update("lktgjc", "gguxhemlwyw", "eeczgfbu", - new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("gfsxzec") - .withActionsRequired("xw")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, - response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("iiiovgqcgxuugq", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("totiowlxteqdptjg", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointTests.java index a4c31e75acd2..4bbca0f78152 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateEndpointTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -10,7 +10,7 @@ public final class PrivateEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"iwii\"}").toObject(PrivateEndpoint.class); + PrivateEndpoint model = BinaryData.fromString("{\"id\":\"kzywbiex\"}").toObject(PrivateEndpoint.class); } @org.junit.jupiter.api.Test diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceInnerTests.java index cdbd27ea0fd1..b875da0122dc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceInnerTests.java @@ -1,28 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateLinkResourceInner; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class PrivateLinkResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkResourceInner model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"rsre\",\"requiredMembers\":[\"xurisjnhnyt\",\"ifqjz\",\"xmrhu\",\"lw\"],\"requiredZoneNames\":[\"sutrgjup\",\"uutpwoqhih\",\"jqgwzp\",\"fqntcyp\"]},\"id\":\"jv\",\"name\":\"oimwkslirc\",\"type\":\"zjxvydfcea\"}") + "{\"properties\":{\"groupId\":\"bxmubyynt\",\"requiredMembers\":[\"bqtkoievseotgqr\",\"ltmuwlauwzizx\"],\"requiredZoneNames\":[\"gcj\",\"fuzmuvpbtt\",\"um\"]},\"id\":\"p\",\"name\":\"xe\",\"type\":\"mnzb\"}") .toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("sutrgjup", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceInner model = new PrivateLinkResourceInner() - .withRequiredZoneNames(Arrays.asList("sutrgjup", "uutpwoqhih", "jqgwzp", "fqntcyp")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("sutrgjup", model.requiredZoneNames().get(0)); + Assertions.assertEquals("gcj", model.requiredZoneNames().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceListTests.java index b446270bfe9f..f72ba891b534 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceListTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourceListTests.java @@ -1,26 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.models.PrivateLinkResourceList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.PrivateLinkResourceList; import org.junit.jupiter.api.Assertions; public final class PrivateLinkResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"asxifto\",\"requiredMembers\":[\"zh\",\"tw\",\"sgogczhonnxk\",\"lgnyhmo\"],\"requiredZoneNames\":[\"kkgthr\"]},\"id\":\"hxjbdhqxvc\",\"name\":\"gf\",\"type\":\"pdso\"},{\"properties\":{\"groupId\":\"hrnsvbu\",\"requiredMembers\":[\"vz\",\"ybycnunvj\",\"rtkfawnopq\"],\"requiredZoneNames\":[\"yzirtxdyuxzejn\",\"psew\",\"ioilqukrydxtq\"]},\"id\":\"eoxorggufhyao\",\"name\":\"tbghhavgrvkf\",\"type\":\"ovjzhpjbibgjmfx\"},{\"properties\":{\"groupId\":\"fcluyov\",\"requiredMembers\":[\"bkfezzxscyhwzdgi\",\"ujb\",\"bomvzzbtdcqv\"],\"requiredZoneNames\":[\"yujviylwdshfssn\",\"bgye\",\"rymsgaojfmw\",\"cotmr\"]},\"id\":\"irctymoxoftpipiw\",\"name\":\"czuhxacpqjlihh\",\"type\":\"usps\"}],\"nextLink\":\"sdvlmfwdgzxulucv\"}") + "{\"value\":[{\"properties\":{\"groupId\":\"jnkaljutiiswacff\",\"requiredMembers\":[\"zzewkfvhqcrai\"],\"requiredZoneNames\":[\"n\",\"pfuflrw\"]},\"id\":\"hdlxyjrxsagafcn\",\"name\":\"hgw\",\"type\":\"apnedgfbcvkc\"},{\"properties\":{\"groupId\":\"pkeqdcvdrhvoo\",\"requiredMembers\":[\"tbobz\",\"opcjwvnhd\",\"d\"],\"requiredZoneNames\":[\"xcxrsl\"]},\"id\":\"utwu\",\"name\":\"egrpkhj\",\"type\":\"niyqslui\"},{\"properties\":{\"groupId\":\"ggkzzlvmbmpa\",\"requiredMembers\":[\"dfvue\",\"yw\",\"bpfvm\"],\"requiredZoneNames\":[\"rfouyftaakcpw\",\"yzvqt\"]},\"id\":\"ubex\",\"name\":\"pzk\",\"type\":\"mond\"}],\"nextLink\":\"quxvypomgkop\"}") .toObject(PrivateLinkResourceList.class); - Assertions.assertEquals("sdvlmfwdgzxulucv", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceList model = new PrivateLinkResourceList().withNextLink("sdvlmfwdgzxulucv"); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceList.class); - Assertions.assertEquals("sdvlmfwdgzxulucv", model.nextLink()); + Assertions.assertEquals("quxvypomgkop", model.nextLink()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcePropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcePropertiesTests.java index 79db0b00ca1d..90a3dc818e6b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcePropertiesTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcePropertiesTests.java @@ -1,28 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.PrivateLinkResourceProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class PrivateLinkResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkResourceProperties model = BinaryData.fromString( - "{\"groupId\":\"lhvygdyftu\",\"requiredMembers\":[\"wnawjslbiw\",\"ojgcyzt\",\"fmznba\",\"qphchqnrnrpxehuw\"],\"requiredZoneNames\":[\"qgaifmviklbydv\"]}") + "{\"groupId\":\"hjpglkf\",\"requiredMembers\":[\"dneu\",\"lfphsdyhtozfikd\",\"wwquuvxzxclvithh\"],\"requiredZoneNames\":[\"nosggbhcoh\"]}") .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("qgaifmviklbydv", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model - = new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("qgaifmviklbydv")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("qgaifmviklbydv", model.requiredZoneNames().get(0)); + Assertions.assertEquals("nosggbhcoh", model.requiredZoneNames().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetWithResponseMockTests.java index 40a7778e4ed7..315f8bf5ad47 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -21,7 +21,7 @@ public final class PrivateLinkResourcesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"groupId\":\"aoypny\",\"requiredMembers\":[\"hxcylhkgm\",\"sghpx\",\"cphdrwjjkhvyo\"],\"requiredZoneNames\":[\"luzvxnq\"]},\"id\":\"rpqpd\",\"name\":\"wmkoisq\",\"type\":\"ssffxuifmc\"}"; + = "{\"properties\":{\"groupId\":\"rioov\",\"requiredMembers\":[\"sxwaabzm\",\"frygznmmax\"],\"requiredZoneNames\":[\"kzobgopxlhsln\",\"lxieixynllxecwcr\",\"jphslhcaw\",\"u\"]},\"id\":\"fdwfmvigorqj\",\"name\":\"ttzhra\",\"type\":\"lkafhonqjuje\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateLinkResource response = manager.privateLinkResources() - .getWithResponse("gmsplzgaufcshhv", "ewgnxkympqanxrj", "ixt", com.azure.core.util.Context.NONE) + .getWithResponse("zrdpsovwxznptgoe", "ybbabpfhvfsl", "vntjlrigjk", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("luzvxnq", response.requiredZoneNames().get(0)); + Assertions.assertEquals("kzobgopxlhsln", response.requiredZoneNames().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerMockTests.java index 996f3255803f..accf64f96ad4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkResourcesListByServerMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -22,7 +22,7 @@ public final class PrivateLinkResourcesListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"myqwcab\",\"requiredMembers\":[\"ilee\"],\"requiredZoneNames\":[\"wlpaugmrmfjlrxwt\",\"aukhfkvcisiz\",\"oaedsxjwuivedwcg\"]},\"id\":\"ewxeiqbpsm\",\"name\":\"omguamlj\",\"type\":\"l\"}]}"; + = "{\"value\":[{\"properties\":{\"groupId\":\"dexxmlfmkqscazua\",\"requiredMembers\":[\"z\",\"puamwabzxr\",\"xcushs\",\"haivm\"],\"requiredZoneNames\":[\"sflvgsgzwywakoih\",\"nsmjbl\"]},\"id\":\"jhlnymzotqyryu\",\"name\":\"cbm\",\"type\":\"qvx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.privateLinkResources().listByServer("ephmgtvljvrcmyfq", "pgxh", com.azure.core.util.Context.NONE); + = manager.privateLinkResources().listByServer("ckpzvcpopmxeln", "clt", com.azure.core.util.Context.NONE); - Assertions.assertEquals("wlpaugmrmfjlrxwt", response.iterator().next().requiredZoneNames().get(0)); + Assertions.assertEquals("sflvgsgzwywakoih", response.iterator().next().requiredZoneNames().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkServiceConnectionStateTests.java index e0ed2d208bbf..28f4306627f7 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkServiceConnectionStateTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/PrivateLinkServiceConnectionStateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,22 +13,22 @@ public final class PrivateLinkServiceConnectionStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkServiceConnectionState model - = BinaryData.fromString("{\"status\":\"Pending\",\"description\":\"wubxc\",\"actionsRequired\":\"h\"}") + = BinaryData.fromString("{\"status\":\"Approved\",\"description\":\"ue\",\"actionsRequired\":\"ibx\"}") .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); - Assertions.assertEquals("wubxc", model.description()); - Assertions.assertEquals("h", model.actionsRequired()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); + Assertions.assertEquals("ue", model.description()); + Assertions.assertEquals("ibx", model.actionsRequired()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateLinkServiceConnectionState model - = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.PENDING) - .withDescription("wubxc") - .withActionsRequired("h"); + = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("ue") + .withActionsRequired("ibx"); model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); - Assertions.assertEquals("wubxc", model.description()); - Assertions.assertEquals("h", model.actionsRequired()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); + Assertions.assertEquals("ue", model.description()); + Assertions.assertEquals("ibx", model.actionsRequired()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageInnerTests.java index 5ef1a452572b..defc90aeb536 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageInnerTests.java @@ -1,42 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.QuotaUsageInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.NameProperty; import org.junit.jupiter.api.Assertions; public final class QuotaUsageInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QuotaUsageInner model = BinaryData.fromString( - "{\"name\":{\"value\":\"ostgkts\",\"localizedValue\":\"dxeclzedqbcvh\"},\"limit\":236699607082183058,\"unit\":\"odqkdlwwqfb\",\"currentValue\":3679022657074806419,\"id\":\"trqjfsmlmbtx\"}") + "{\"name\":{\"value\":\"dnfwqzdzg\",\"localizedValue\":\"la\"},\"limit\":7115029312461679715,\"unit\":\"qlyvijo\",\"currentValue\":1360367845495637932,\"id\":\"xoyzunbix\"}") .toObject(QuotaUsageInner.class); - Assertions.assertEquals("ostgkts", model.name().value()); - Assertions.assertEquals("dxeclzedqbcvh", model.name().localizedValue()); - Assertions.assertEquals(236699607082183058L, model.limit()); - Assertions.assertEquals("odqkdlwwqfb", model.unit()); - Assertions.assertEquals(3679022657074806419L, model.currentValue()); - Assertions.assertEquals("trqjfsmlmbtx", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaUsageInner model = new QuotaUsageInner() - .withName(new NameProperty().withValue("ostgkts").withLocalizedValue("dxeclzedqbcvh")) - .withLimit(236699607082183058L) - .withUnit("odqkdlwwqfb") - .withCurrentValue(3679022657074806419L) - .withId("trqjfsmlmbtx"); - model = BinaryData.fromObject(model).toObject(QuotaUsageInner.class); - Assertions.assertEquals("ostgkts", model.name().value()); - Assertions.assertEquals("dxeclzedqbcvh", model.name().localizedValue()); - Assertions.assertEquals(236699607082183058L, model.limit()); - Assertions.assertEquals("odqkdlwwqfb", model.unit()); - Assertions.assertEquals(3679022657074806419L, model.currentValue()); - Assertions.assertEquals("trqjfsmlmbtx", model.id()); + Assertions.assertEquals("dnfwqzdzg", model.name().value()); + Assertions.assertEquals("la", model.name().localizedValue()); + Assertions.assertEquals(7115029312461679715L, model.limit()); + Assertions.assertEquals("qlyvijo", model.unit()); + Assertions.assertEquals(1360367845495637932L, model.currentValue()); + Assertions.assertEquals("xoyzunbix", model.id()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageListTests.java index 42f5277aa015..4503d85b273b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageListTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsageListTests.java @@ -1,26 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.models.QuotaUsageList; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.QuotaUsageList; import org.junit.jupiter.api.Assertions; public final class QuotaUsageListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QuotaUsageList model = BinaryData.fromString( - "{\"value\":[{\"name\":{\"value\":\"dznx\",\"localizedValue\":\"dsrhnjiv\"},\"limit\":8488959780262323,\"unit\":\"ovqfzge\",\"currentValue\":4588468813568796443,\"id\":\"uljltduceamtmcz\"},{\"name\":{\"value\":\"ejwcwwqiok\",\"localizedValue\":\"sx\"},\"limit\":9165184616629712222,\"unit\":\"vpkjpr\",\"currentValue\":2543879941778862448,\"id\":\"zqljyxgtczh\"},{\"name\":{\"value\":\"bsdshmkxmaehvbbx\",\"localizedValue\":\"iplt\"},\"limit\":3525559326756666639,\"unit\":\"axkgx\",\"currentValue\":1452554072563405259,\"id\":\"pyklyhpluodpvru\"}],\"nextLink\":\"lgzi\"}") + "{\"value\":[{\"name\":{\"value\":\"shoxgsgb\",\"localizedValue\":\"gzdjtxvzf\"},\"limit\":841674291373578228,\"unit\":\"aqvlgafcqusr\",\"currentValue\":2891462100912693660,\"id\":\"wsdtutnwl\"},{\"name\":{\"value\":\"cvuzhyrmewipmve\",\"localizedValue\":\"xukuqgsj\"},\"limit\":982984316248364613,\"unit\":\"xgketwz\",\"currentValue\":362777289625182475,\"id\":\"f\"},{\"name\":{\"value\":\"vvmu\",\"localizedValue\":\"pmuneqsx\"},\"limit\":8748286705499502370,\"unit\":\"uzjyihsasbhudypo\",\"currentValue\":6783135668342390353,\"id\":\"slynsqyrpfoo\"}],\"nextLink\":\"lttymsjn\"}") .toObject(QuotaUsageList.class); - Assertions.assertEquals("lgzi", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaUsageList model = new QuotaUsageList().withNextLink("lgzi"); - model = BinaryData.fromObject(model).toObject(QuotaUsageList.class); - Assertions.assertEquals("lgzi", model.nextLink()); + Assertions.assertEquals("lttymsjn", model.nextLink()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListMockTests.java index 6d2286bcedbf..919d740a92a8 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/QuotaUsagesListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -22,7 +22,7 @@ public final class QuotaUsagesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":{\"value\":\"ylollgtrczzydmxz\",\"localizedValue\":\"jpvuaurkihcirld\"},\"limit\":3662886964591682986,\"unit\":\"c\",\"currentValue\":4478329422803924367,\"id\":\"kjanur\"}]}"; + = "{\"value\":[{\"name\":{\"value\":\"ghudg\",\"localizedValue\":\"xog\"},\"limit\":3310528701776287125,\"unit\":\"oujkxibdafh\",\"currentValue\":4613611798134715104,\"id\":\"omkxf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.quotaUsages().list("ypobkdqzr", com.azure.core.util.Context.NONE); + PagedIterable response = manager.quotaUsages().list("frexcrseqw", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ylollgtrczzydmxz", response.iterator().next().name().value()); - Assertions.assertEquals("jpvuaurkihcirld", response.iterator().next().name().localizedValue()); - Assertions.assertEquals(3662886964591682986L, response.iterator().next().limit()); - Assertions.assertEquals("c", response.iterator().next().unit()); - Assertions.assertEquals(4478329422803924367L, response.iterator().next().currentValue()); - Assertions.assertEquals("kjanur", response.iterator().next().id()); + Assertions.assertEquals("ghudg", response.iterator().next().name().value()); + Assertions.assertEquals("xog", response.iterator().next().name().localizedValue()); + Assertions.assertEquals(3310528701776287125L, response.iterator().next().limit()); + Assertions.assertEquals("oujkxibdafh", response.iterator().next().unit()); + Assertions.assertEquals(4613611798134715104L, response.iterator().next().currentValue()); + Assertions.assertEquals("omkxf", response.iterator().next().id()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicaTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicaTests.java index 63b2baed7dd2..8a92075d7279 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicaTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ReplicaTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -15,21 +15,21 @@ public final class ReplicaTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Replica model = BinaryData.fromString( - "{\"role\":\"GeoAsyncReplica\",\"capacity\":118535522,\"replicationState\":\"Updating\",\"promoteMode\":\"Switchover\",\"promoteOption\":\"Forced\"}") + "{\"role\":\"Primary\",\"capacity\":1202809910,\"replicationState\":\"Provisioning\",\"promoteMode\":\"Standalone\",\"promoteOption\":\"Forced\"}") .toObject(Replica.class); - Assertions.assertEquals(ReplicationRole.GEO_ASYNC_REPLICA, model.role()); - Assertions.assertEquals(ReadReplicaPromoteMode.SWITCHOVER, model.promoteMode()); + Assertions.assertEquals(ReplicationRole.PRIMARY, model.role()); + Assertions.assertEquals(ReadReplicaPromoteMode.STANDALONE, model.promoteMode()); Assertions.assertEquals(ReadReplicaPromoteOption.FORCED, model.promoteOption()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Replica model = new Replica().withRole(ReplicationRole.GEO_ASYNC_REPLICA) - .withPromoteMode(ReadReplicaPromoteMode.SWITCHOVER) + Replica model = new Replica().withRole(ReplicationRole.PRIMARY) + .withPromoteMode(ReadReplicaPromoteMode.STANDALONE) .withPromoteOption(ReadReplicaPromoteOption.FORCED); model = BinaryData.fromObject(model).toObject(Replica.class); - Assertions.assertEquals(ReplicationRole.GEO_ASYNC_REPLICA, model.role()); - Assertions.assertEquals(ReadReplicaPromoteMode.SWITCHOVER, model.promoteMode()); + Assertions.assertEquals(ReplicationRole.PRIMARY, model.role()); + Assertions.assertEquals(ReadReplicaPromoteMode.STANDALONE, model.promoteMode()); Assertions.assertEquals(ReadReplicaPromoteOption.FORCED, model.promoteOption()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/RestartParameterTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/RestartParameterTests.java index beb891f591be..99e93cebedbc 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/RestartParameterTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/RestartParameterTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,18 +13,18 @@ public final class RestartParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RestartParameter model - = BinaryData.fromString("{\"restartWithFailover\":true,\"failoverMode\":\"PlannedFailover\"}") + = BinaryData.fromString("{\"restartWithFailover\":true,\"failoverMode\":\"ForcedFailover\"}") .toObject(RestartParameter.class); Assertions.assertTrue(model.restartWithFailover()); - Assertions.assertEquals(FailoverMode.PLANNED_FAILOVER, model.failoverMode()); + Assertions.assertEquals(FailoverMode.FORCED_FAILOVER, model.failoverMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RestartParameter model - = new RestartParameter().withRestartWithFailover(true).withFailoverMode(FailoverMode.PLANNED_FAILOVER); + = new RestartParameter().withRestartWithFailover(true).withFailoverMode(FailoverMode.FORCED_FAILOVER); model = BinaryData.fromObject(model).toObject(RestartParameter.class); Assertions.assertTrue(model.restartWithFailover()); - Assertions.assertEquals(FailoverMode.PLANNED_FAILOVER, model.failoverMode()); + Assertions.assertEquals(FailoverMode.FORCED_FAILOVER, model.failoverMode()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerEditionCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerEditionCapabilityTests.java index b66b303dc588..596646fb2009 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerEditionCapabilityTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerEditionCapabilityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,13 +11,7 @@ public final class ServerEditionCapabilityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServerEditionCapability model = BinaryData.fromString( - "{\"name\":\"wkuofoskghsauu\",\"defaultSkuName\":\"jmvxie\",\"supportedStorageEditions\":[{\"name\":\"idyjrrfbyaosvexc\",\"defaultStorageSizeMb\":2728585991559305610,\"supportedStorageMb\":[{\"supportedIops\":817727758,\"supportedMaximumIops\":675704984,\"storageSizeMb\":7973148990313454716,\"maximumStorageSizeMb\":1899078480578944633,\"supportedThroughput\":1486272447,\"supportedMaximumThroughput\":529592400,\"defaultIopsTier\":\"fbuhfmvfaxkffe\",\"supportedIopsTiers\":[{}],\"status\":\"Disabled\",\"reason\":\"m\"},{\"supportedIops\":1857517478,\"supportedMaximumIops\":2122365511,\"storageSizeMb\":2218388246099346962,\"maximumStorageSizeMb\":5112966990971322380,\"supportedThroughput\":2042967034,\"supportedMaximumThroughput\":681165656,\"defaultIopsTier\":\"igrxwburvjxxjn\",\"supportedIopsTiers\":[{},{}],\"status\":\"Default\",\"reason\":\"koen\"},{\"supportedIops\":232907016,\"supportedMaximumIops\":333094369,\"storageSizeMb\":316131865784554272,\"maximumStorageSizeMb\":5918766078843387031,\"supportedThroughput\":1340454664,\"supportedMaximumThroughput\":45967354,\"defaultIopsTier\":\"ngkpocipazy\",\"supportedIopsTiers\":[{},{},{}],\"status\":\"Disabled\",\"reason\":\"g\"}],\"status\":\"Visible\",\"reason\":\"ucgygevqz\"},{\"name\":\"yp\",\"defaultStorageSizeMb\":7669982417206267558,\"supportedStorageMb\":[{\"supportedIops\":2078386445,\"supportedMaximumIops\":1616487247,\"storageSizeMb\":8467461328750687020,\"maximumStorageSizeMb\":5607759174193347785,\"supportedThroughput\":1342514759,\"supportedMaximumThroughput\":1880549577,\"defaultIopsTier\":\"de\",\"supportedIopsTiers\":[{},{},{}],\"status\":\"Default\",\"reason\":\"w\"},{\"supportedIops\":764179455,\"supportedMaximumIops\":1909902819,\"storageSizeMb\":1558927295996088992,\"maximumStorageSizeMb\":7437509251632449086,\"supportedThroughput\":22083476,\"supportedMaximumThroughput\":643021552,\"defaultIopsTier\":\"hajdeyeamdpha\",\"supportedIopsTiers\":[{},{},{},{}],\"status\":\"Available\",\"reason\":\"xw\"},{\"supportedIops\":9013568,\"supportedMaximumIops\":1260987021,\"storageSizeMb\":8145480673542216699,\"maximumStorageSizeMb\":6256253136283246565,\"supportedThroughput\":1714142157,\"supportedMaximumThroughput\":1446067033,\"defaultIopsTier\":\"kix\",\"supportedIopsTiers\":[{},{}],\"status\":\"Default\",\"reason\":\"pu\"},{\"supportedIops\":885179399,\"supportedMaximumIops\":1846682482,\"storageSizeMb\":4290539980849845271,\"maximumStorageSizeMb\":4868014576917618697,\"supportedThroughput\":591392190,\"supportedMaximumThroughput\":1184256001,\"defaultIopsTier\":\"zrnkcqvyxlwh\",\"supportedIopsTiers\":[{},{},{},{}],\"status\":\"Available\",\"reason\":\"hoqqnwvlr\"}],\"status\":\"Disabled\",\"reason\":\"hheunmmqhgyx\"}],\"supportedServerSkus\":[{\"name\":\"ocukoklyax\",\"vCores\":891942589,\"supportedIops\":1520112594,\"supportedMemoryPerVcoreMb\":6577393684401905724,\"supportedZones\":[\"beypewrmjmw\",\"vjektcxsenh\"],\"supportedHaMode\":[\"ZoneRedundant\",\"SameZone\",\"SameZone\",\"SameZone\"],\"supportedFeatures\":[{\"name\":\"v\",\"status\":\"Disabled\"},{\"name\":\"gbiqylihkaet\",\"status\":\"Disabled\"}],\"securityProfile\":\"fcivfsnkym\",\"status\":\"Default\",\"reason\":\"hjfbebrjcxe\"},{\"name\":\"uwutttxfvjrbi\",\"vCores\":1236632858,\"supportedIops\":684290279,\"supportedMemoryPerVcoreMb\":427273766733730009,\"supportedZones\":[\"hfnljkyq\"],\"supportedHaMode\":[\"SameZone\",\"ZoneRedundant\"],\"supportedFeatures\":[{\"name\":\"idokgjlj\",\"status\":\"Enabled\"},{\"name\":\"vcltbgsncgh\",\"status\":\"Enabled\"},{\"name\":\"zz\",\"status\":\"Enabled\"}],\"securityProfile\":\"htxfvgxbfsmxnehm\",\"status\":\"Visible\",\"reason\":\"xgodebfqkkrbmp\"}],\"status\":\"Visible\",\"reason\":\"iw\"}") + "{\"name\":\"zuhbxvvyhgsopb\",\"defaultSkuName\":\"qufegxuvwzfbn\",\"supportedStorageEditions\":[{\"name\":\"tlpdn\",\"defaultStorageSizeMb\":4794040096268902871,\"supportedStorageMb\":[{\"supportedIops\":1991662633,\"supportedMaximumIops\":1181569803,\"storageSizeMb\":1216165678056093852,\"maximumStorageSizeMb\":8238533341671214084,\"supportedThroughput\":1630324691,\"supportedMaximumThroughput\":568576807,\"defaultIopsTier\":\"grhbpn\",\"supportedIopsTiers\":[{},{},{},{}],\"status\":\"Disabled\",\"reason\":\"cbdreaxhcexd\"},{\"supportedIops\":894068250,\"supportedMaximumIops\":1241067704,\"storageSizeMb\":4457997011490580036,\"maximumStorageSizeMb\":6806570404592010694,\"supportedThroughput\":1260916363,\"supportedMaximumThroughput\":2093348000,\"defaultIopsTier\":\"hyjsvfycx\",\"supportedIopsTiers\":[{},{}],\"status\":\"Available\",\"reason\":\"wvrvmtg\"},{\"supportedIops\":1756478264,\"supportedMaximumIops\":101961110,\"storageSizeMb\":916128690499850076,\"maximumStorageSizeMb\":1997162688114762581,\"supportedThroughput\":1176849986,\"supportedMaximumThroughput\":856785773,\"defaultIopsTier\":\"fipns\",\"supportedIopsTiers\":[{},{},{}],\"status\":\"Disabled\",\"reason\":\"ekrrjr\"},{\"supportedIops\":1616110653,\"supportedMaximumIops\":1864081954,\"storageSizeMb\":4681798164826134940,\"maximumStorageSizeMb\":7651451200051538230,\"supportedThroughput\":610202176,\"supportedMaximumThroughput\":2038815133,\"defaultIopsTier\":\"xwslolbqpv\",\"supportedIopsTiers\":[{}],\"status\":\"Disabled\",\"reason\":\"elfk\"}],\"status\":\"Disabled\",\"reason\":\"crpw\"},{\"name\":\"eznoig\",\"defaultStorageSizeMb\":7000492361910898538,\"supportedStorageMb\":[{\"supportedIops\":820542416,\"supportedMaximumIops\":1312335759,\"storageSizeMb\":2791971078148352021,\"maximumStorageSizeMb\":7475026912824042888,\"supportedThroughput\":1268634918,\"supportedMaximumThroughput\":247031885,\"defaultIopsTier\":\"gfhsxttaugzxn\",\"supportedIopsTiers\":[{},{},{},{}],\"status\":\"Default\",\"reason\":\"dtnkdmkq\"}],\"status\":\"Default\",\"reason\":\"uenvrkp\"},{\"name\":\"uaibrebqaaysj\",\"defaultStorageSizeMb\":5714792311990746279,\"supportedStorageMb\":[{\"supportedIops\":1555595528,\"supportedMaximumIops\":648427507,\"storageSizeMb\":6449215668695703827,\"maximumStorageSizeMb\":6879851489693220346,\"supportedThroughput\":1105838597,\"supportedMaximumThroughput\":1807860648,\"defaultIopsTier\":\"pqqmted\",\"supportedIopsTiers\":[{}],\"status\":\"Visible\",\"reason\":\"hyeozphvwau\"},{\"supportedIops\":1025592132,\"supportedMaximumIops\":1587371608,\"storageSizeMb\":1577307704371478753,\"maximumStorageSizeMb\":9207382017369514266,\"supportedThroughput\":587818822,\"supportedMaximumThroughput\":761086099,\"defaultIopsTier\":\"wx\",\"supportedIopsTiers\":[{},{}],\"status\":\"Default\",\"reason\":\"hfstotxhojujbyp\"}],\"status\":\"Visible\",\"reason\":\"uvhixbjxyfwn\"}],\"supportedServerSkus\":[{\"name\":\"ool\",\"vCores\":1240689127,\"supportedIops\":320221155,\"supportedMemoryPerVcoreMb\":670412733621668473,\"supportedZones\":[\"nujrywvtyl\",\"fpncurdo\",\"wiithtywub\",\"cbihwqk\"],\"supportedHaMode\":[\"ZoneRedundant\",\"ZoneRedundant\",\"ZoneRedundant\"],\"supportedFeatures\":[{\"name\":\"rdgoihxumw\",\"status\":\"Enabled\"},{\"name\":\"dzjlu\",\"status\":\"Enabled\"},{\"name\":\"lwg\",\"status\":\"Disabled\"},{\"name\":\"bwtovvtgseinqf\",\"status\":\"Disabled\"}],\"securityProfile\":\"qknp\",\"status\":\"Default\",\"reason\":\"epttwqmsniff\"}],\"status\":\"Disabled\",\"reason\":\"nrojlpijnkr\"}") .toObject(ServerEditionCapability.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerEditionCapability model = new ServerEditionCapability(); - model = BinaryData.fromObject(model).toObject(ServerEditionCapability.class); - } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuCapabilityTests.java index 7d6be6b12e5d..f29ceebcd736 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuCapabilityTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuCapabilityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,13 +11,7 @@ public final class ServerSkuCapabilityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServerSkuCapability model = BinaryData.fromString( - "{\"name\":\"ykvceoveil\",\"vCores\":1344905503,\"supportedIops\":2133356892,\"supportedMemoryPerVcoreMb\":1277468706791148582,\"supportedZones\":[\"njbkcnxdhbttkph\",\"wpn\",\"jtoqne\"],\"supportedHaMode\":[\"ZoneRedundant\"],\"supportedFeatures\":[{\"name\":\"phoxus\",\"status\":\"Enabled\"},{\"name\":\"bgyepsbj\",\"status\":\"Enabled\"}],\"securityProfile\":\"ugxywpmueef\",\"status\":\"Available\",\"reason\":\"qkqujidsu\"}") + "{\"name\":\"utpwoqhihejqgw\",\"vCores\":938622806,\"supportedIops\":1944953074,\"supportedMemoryPerVcoreMb\":4113630630290274938,\"supportedZones\":[\"sx\",\"vfoimwksli\"],\"supportedHaMode\":[\"SameZone\"],\"supportedFeatures\":[{\"name\":\"ydfce\",\"status\":\"Enabled\"},{\"name\":\"hvygdyftumr\",\"status\":\"Disabled\"},{\"name\":\"wjslbiwkojgcyzt\",\"status\":\"Disabled\"},{\"name\":\"nbaeqphchqn\",\"status\":\"Enabled\"}],\"securityProfile\":\"x\",\"status\":\"Disabled\",\"reason\":\"rykqgaifmvikl\"}") .toObject(ServerSkuCapability.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerSkuCapability model = new ServerSkuCapability(); - model = BinaryData.fromObject(model).toObject(ServerSkuCapability.class); - } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuTests.java index 804ae16be3aa..4dd08d52d6ca 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerSkuTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,16 +13,8 @@ public final class ServerSkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServerSku model - = BinaryData.fromString("{\"name\":\"ty\",\"tier\":\"MemoryOptimized\"}").toObject(ServerSku.class); - Assertions.assertEquals("ty", model.name()); - Assertions.assertEquals(SkuTier.MEMORY_OPTIMIZED, model.tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerSku model = new ServerSku().withName("ty").withTier(SkuTier.MEMORY_OPTIMIZED); - model = BinaryData.fromObject(model).toObject(ServerSku.class); - Assertions.assertEquals("ty", model.name()); - Assertions.assertEquals(SkuTier.MEMORY_OPTIMIZED, model.tier()); + = BinaryData.fromString("{\"name\":\"ohslkevlegg\",\"tier\":\"GeneralPurpose\"}").toObject(ServerSku.class); + Assertions.assertEquals("ohslkevlegg", model.name()); + Assertions.assertEquals(SkuTier.GENERAL_PURPOSE, model.tier()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateMockTests.java deleted file mode 100644 index 30661eca4524..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerThreatProtectionSettingsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,43 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.AdvancedThreatProtectionSettingsModel; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionName; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ThreatProtectionState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServerThreatProtectionSettingsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"state\":\"Enabled\",\"creationTime\":\"2021-01-18T07:47:20Z\"},\"id\":\"kdlpa\",\"name\":\"zrcxfailcfxwmdbo\",\"type\":\"dfgsftufqobrj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - AdvancedThreatProtectionSettingsModel response = manager.serverThreatProtectionSettings() - .define(ThreatProtectionName.DEFAULT) - .withExistingFlexibleServer("dmdqb", "pypqtgsfj") - .withState(ThreatProtectionState.DISABLED) - .create(); - - Assertions.assertEquals(ThreatProtectionState.ENABLED, response.state()); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerVersionCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerVersionCapabilityTests.java index 8d526b7160a4..997cdc4293d9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerVersionCapabilityTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServerVersionCapabilityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,13 +11,7 @@ public final class ServerVersionCapabilityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServerVersionCapability model = BinaryData.fromString( - "{\"name\":\"mgyudxytlmoyrxv\",\"supportedVersionsToUpgrade\":[\"dw\"],\"supportedFeatures\":[{\"name\":\"xhdzhlrqjbhckf\",\"status\":\"Enabled\"},{\"name\":\"xsbkyvpyca\",\"status\":\"Enabled\"},{\"name\":\"p\",\"status\":\"Enabled\"},{\"name\":\"kuwbcrnwb\",\"status\":\"Enabled\"}],\"status\":\"Available\",\"reason\":\"yvjusrtslhsp\"}") + "{\"name\":\"dznx\",\"supportedVersionsToUpgrade\":[\"srhnjivo\",\"v\"],\"supportedFeatures\":[{\"name\":\"qfzgemjdftul\",\"status\":\"Enabled\"},{\"name\":\"ucea\",\"status\":\"Enabled\"}],\"status\":\"Visible\",\"reason\":\"o\"}") .toObject(ServerVersionCapability.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerVersionCapability model = new ServerVersionCapability(); - model = BinaryData.fromObject(model).toObject(ServerVersionCapability.class); - } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersMigrateNetworkModeMockTests.java similarity index 63% rename from sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateMockTests.java rename to sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersMigrateNetworkModeMockTests.java index 93e01c30f16b..b624cb969b75 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/DatabasesCreateMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ServersMigrateNetworkModeMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -10,18 +10,18 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.Database; +import com.azure.resourcemanager.postgresqlflexibleserver.models.MigrateNetworkStatus; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class DatabasesCreateMockTests { +public final class ServersMigrateNetworkModeMockTests { @Test - public void testCreate() throws Exception { + public void testMigrateNetworkMode() throws Exception { String responseStr - = "{\"properties\":{\"charset\":\"lbnseqac\",\"collation\":\"vpilg\"},\"id\":\"oq\",\"name\":\"agmdit\",\"type\":\"ueio\"}"; + = "{\"subscriptionId\":\"unqndyfpchrqb\",\"resourceGroupName\":\"jrcg\",\"serverName\":\"ydcwboxjumv\",\"state\":\"Succeeded\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,14 +30,11 @@ public void testCreate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - Database response = manager.databases() - .define("cnwfepbnwgfmxjg") - .withExistingFlexibleServer("o", "gebx") - .withCharset("jbgdlfgtdysnaquf") - .withCollation("bctqhamzjrwd") - .create(); + MigrateNetworkStatus response + = manager.servers().migrateNetworkMode("yufmhruncuwmq", "pkcdqzhlct", com.azure.core.util.Context.NONE); - Assertions.assertEquals("lbnseqac", response.charset()); - Assertions.assertEquals("vpilg", response.collation()); + Assertions.assertEquals("unqndyfpchrqb", response.subscriptionId()); + Assertions.assertEquals("jrcg", response.resourceGroupName()); + Assertions.assertEquals("ydcwboxjumv", response.serverName()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuForPatchTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuForPatchTests.java index b182cc001ffc..8ea9d32de0eb 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuForPatchTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuForPatchTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,16 +13,16 @@ public final class SkuForPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuForPatch model - = BinaryData.fromString("{\"name\":\"j\",\"tier\":\"MemoryOptimized\"}").toObject(SkuForPatch.class); - Assertions.assertEquals("j", model.name()); + = BinaryData.fromString("{\"name\":\"fj\",\"tier\":\"MemoryOptimized\"}").toObject(SkuForPatch.class); + Assertions.assertEquals("fj", model.name()); Assertions.assertEquals(SkuTier.MEMORY_OPTIMIZED, model.tier()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SkuForPatch model = new SkuForPatch().withName("j").withTier(SkuTier.MEMORY_OPTIMIZED); + SkuForPatch model = new SkuForPatch().withName("fj").withTier(SkuTier.MEMORY_OPTIMIZED); model = BinaryData.fromObject(model).toObject(SkuForPatch.class); - Assertions.assertEquals("j", model.name()); + Assertions.assertEquals("fj", model.name()); Assertions.assertEquals(SkuTier.MEMORY_OPTIMIZED, model.tier()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuTests.java index 1e63fe910f81..90cb57b4c007 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SkuTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,16 +12,17 @@ public final class SkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Sku model = BinaryData.fromString("{\"name\":\"rk\",\"tier\":\"Burstable\"}").toObject(Sku.class); - Assertions.assertEquals("rk", model.name()); - Assertions.assertEquals(SkuTier.BURSTABLE, model.tier()); + Sku model + = BinaryData.fromString("{\"name\":\"muzyoxaepdk\",\"tier\":\"MemoryOptimized\"}").toObject(Sku.class); + Assertions.assertEquals("muzyoxaepdk", model.name()); + Assertions.assertEquals(SkuTier.MEMORY_OPTIMIZED, model.tier()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Sku model = new Sku().withName("rk").withTier(SkuTier.BURSTABLE); + Sku model = new Sku().withName("muzyoxaepdk").withTier(SkuTier.MEMORY_OPTIMIZED); model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("rk", model.name()); - Assertions.assertEquals(SkuTier.BURSTABLE, model.tier()); + Assertions.assertEquals("muzyoxaepdk", model.name()); + Assertions.assertEquals(SkuTier.MEMORY_OPTIMIZED, model.tier()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageEditionCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageEditionCapabilityTests.java index f65e54374f4a..5c844b64eca4 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageEditionCapabilityTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageEditionCapabilityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,13 +11,7 @@ public final class StorageEditionCapabilityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageEditionCapability model = BinaryData.fromString( - "{\"name\":\"zlfbxzpuzycispnq\",\"defaultStorageSizeMb\":276524201323621430,\"supportedStorageMb\":[{\"supportedIops\":318334591,\"supportedMaximumIops\":567432535,\"storageSizeMb\":7247932824726952770,\"maximumStorageSizeMb\":762877145565948123,\"supportedThroughput\":312010573,\"supportedMaximumThroughput\":486608625,\"defaultIopsTier\":\"ik\",\"supportedIopsTiers\":[{\"name\":\"vtq\",\"iops\":122034029,\"status\":\"Available\",\"reason\":\"nhijggmebfsi\"},{\"name\":\"butr\",\"iops\":1477198207,\"status\":\"Disabled\",\"reason\":\"zmhjrunmp\"}],\"status\":\"Default\",\"reason\":\"bh\"},{\"supportedIops\":826548714,\"supportedMaximumIops\":1474388654,\"storageSizeMb\":1322573122193945613,\"maximumStorageSizeMb\":8942368239178938465,\"supportedThroughput\":734884561,\"supportedMaximumThroughput\":1438226066,\"defaultIopsTier\":\"nbtkcxywnytnr\",\"supportedIopsTiers\":[{\"name\":\"qidybyx\",\"iops\":2121722850,\"status\":\"Default\",\"reason\":\"aaxdbabphlwrq\"},{\"name\":\"ktsthsucocmny\",\"iops\":533461500,\"status\":\"Visible\",\"reason\":\"twwrqp\"},{\"name\":\"dckzywbiexz\",\"iops\":1043765409,\"status\":\"Available\",\"reason\":\"xibxujwbhqwalm\"}],\"status\":\"Visible\",\"reason\":\"xaepdkzjancuxr\"},{\"supportedIops\":714190447,\"supportedMaximumIops\":1879785159,\"storageSizeMb\":8686302020366055834,\"maximumStorageSizeMb\":6669094246951991149,\"supportedThroughput\":485576970,\"supportedMaximumThroughput\":413176852,\"defaultIopsTier\":\"tsdbpgn\",\"supportedIopsTiers\":[{\"name\":\"hpzxbzpfzab\",\"iops\":687811406,\"status\":\"Visible\",\"reason\":\"wtctyqi\"}],\"status\":\"Disabled\",\"reason\":\"ovplw\"},{\"supportedIops\":869574502,\"supportedMaximumIops\":487628587,\"storageSizeMb\":151235075959718301,\"maximumStorageSizeMb\":4627558794387697712,\"supportedThroughput\":1732351990,\"supportedMaximumThroughput\":1013735837,\"defaultIopsTier\":\"sxqu\",\"supportedIopsTiers\":[{\"name\":\"l\",\"iops\":1362242180,\"status\":\"Default\",\"reason\":\"kjz\"}],\"status\":\"Visible\",\"reason\":\"lpvlopw\"}],\"status\":\"Available\",\"reason\":\"hxpkd\"}") + "{\"name\":\"rddh\",\"defaultStorageSizeMb\":4437955715395488909,\"supportedStorageMb\":[{\"supportedIops\":142407954,\"supportedMaximumIops\":852301245,\"storageSizeMb\":8214458814642000161,\"maximumStorageSizeMb\":2129912218823750294,\"supportedThroughput\":351015732,\"supportedMaximumThroughput\":1553856312,\"defaultIopsTier\":\"hftwesgog\",\"supportedIopsTiers\":[{\"name\":\"nnxk\",\"iops\":991388734,\"status\":\"Default\",\"reason\":\"mossxkkgthrrghxj\"},{\"name\":\"hqxvcxgfrpdsofbs\",\"iops\":160292090,\"status\":\"Available\",\"reason\":\"uswdv\"},{\"name\":\"ybycnunvj\",\"iops\":1037847235,\"status\":\"Visible\",\"reason\":\"wnopqgikyzirtx\"},{\"name\":\"uxzejntpsew\",\"iops\":354517921,\"status\":\"Visible\",\"reason\":\"ukry\"}],\"status\":\"Available\",\"reason\":\"mieoxorgguf\"},{\"supportedIops\":1933548472,\"supportedMaximumIops\":1518381361,\"storageSizeMb\":2866985325528678483,\"maximumStorageSizeMb\":7692661990763768834,\"supportedThroughput\":853650295,\"supportedMaximumThroughput\":982089275,\"defaultIopsTier\":\"ffovjzhpj\",\"supportedIopsTiers\":[{\"name\":\"jmfxumvf\",\"iops\":1213633794,\"status\":\"Disabled\",\"reason\":\"wxnb\"}],\"status\":\"Disabled\",\"reason\":\"zxscyhwzdgirujb\"}],\"status\":\"Available\",\"reason\":\"vzzbtdcq\"}") .toObject(StorageEditionCapability.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageEditionCapability model = new StorageEditionCapability(); - model = BinaryData.fromObject(model).toObject(StorageEditionCapability.class); - } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageMbCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageMbCapabilityTests.java index 6e902260d2e8..3f6e1d013f7e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageMbCapabilityTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageMbCapabilityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,13 +11,7 @@ public final class StorageMbCapabilityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageMbCapability model = BinaryData.fromString( - "{\"supportedIops\":1060544654,\"supportedMaximumIops\":413325201,\"storageSizeMb\":3085775452141512212,\"maximumStorageSizeMb\":574738342939177032,\"supportedThroughput\":1617320432,\"supportedMaximumThroughput\":635482352,\"defaultIopsTier\":\"ped\",\"supportedIopsTiers\":[{\"name\":\"a\",\"iops\":996509936,\"status\":\"Default\",\"reason\":\"txp\"}],\"status\":\"Default\",\"reason\":\"tfhvpesapskrdqmh\"}") + "{\"supportedIops\":1359383511,\"supportedMaximumIops\":1622829877,\"storageSizeMb\":2588743107415946739,\"maximumStorageSizeMb\":1193227487825924541,\"supportedThroughput\":812377845,\"supportedMaximumThroughput\":1871477437,\"defaultIopsTier\":\"ssnrbgye\",\"supportedIopsTiers\":[{\"name\":\"sgaojfmwncot\",\"iops\":1018101586,\"status\":\"Disabled\",\"reason\":\"ctymoxoftp\"},{\"name\":\"iwyczuh\",\"iops\":481120097,\"status\":\"Disabled\",\"reason\":\"lihhyuspskasdvlm\"},{\"name\":\"dgzxulucvpamrsr\",\"iops\":866301348,\"status\":\"Default\",\"reason\":\"risjnhnytxifqjz\"}],\"status\":\"Default\",\"reason\":\"hu\"}") .toObject(StorageMbCapability.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageMbCapability model = new StorageMbCapability(); - model = BinaryData.fromObject(model).toObject(StorageMbCapability.class); - } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTests.java index c5f32b6e2ab2..d881aa864df0 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -15,30 +15,30 @@ public final class StorageTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Storage model = BinaryData.fromString( - "{\"storageSizeGB\":1828523289,\"autoGrow\":\"Enabled\",\"tier\":\"P3\",\"iops\":836392203,\"throughput\":313242233,\"type\":\"Premium_LRS\"}") + "{\"storageSizeGB\":1125977089,\"autoGrow\":\"Disabled\",\"tier\":\"P3\",\"iops\":1773557410,\"throughput\":794855452,\"type\":\"PremiumV2_LRS\"}") .toObject(Storage.class); - Assertions.assertEquals(1828523289, model.storageSizeGB()); - Assertions.assertEquals(StorageAutoGrow.ENABLED, model.autoGrow()); + Assertions.assertEquals(1125977089, model.storageSizeGB()); + Assertions.assertEquals(StorageAutoGrow.DISABLED, model.autoGrow()); Assertions.assertEquals(AzureManagedDiskPerformanceTier.P3, model.tier()); - Assertions.assertEquals(836392203, model.iops()); - Assertions.assertEquals(313242233, model.throughput()); - Assertions.assertEquals(StorageType.PREMIUM_LRS, model.type()); + Assertions.assertEquals(1773557410, model.iops()); + Assertions.assertEquals(794855452, model.throughput()); + Assertions.assertEquals(StorageType.PREMIUM_V2_LRS, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Storage model = new Storage().withStorageSizeGB(1828523289) - .withAutoGrow(StorageAutoGrow.ENABLED) + Storage model = new Storage().withStorageSizeGB(1125977089) + .withAutoGrow(StorageAutoGrow.DISABLED) .withTier(AzureManagedDiskPerformanceTier.P3) - .withIops(836392203) - .withThroughput(313242233) - .withType(StorageType.PREMIUM_LRS); + .withIops(1773557410) + .withThroughput(794855452) + .withType(StorageType.PREMIUM_V2_LRS); model = BinaryData.fromObject(model).toObject(Storage.class); - Assertions.assertEquals(1828523289, model.storageSizeGB()); - Assertions.assertEquals(StorageAutoGrow.ENABLED, model.autoGrow()); + Assertions.assertEquals(1125977089, model.storageSizeGB()); + Assertions.assertEquals(StorageAutoGrow.DISABLED, model.autoGrow()); Assertions.assertEquals(AzureManagedDiskPerformanceTier.P3, model.tier()); - Assertions.assertEquals(836392203, model.iops()); - Assertions.assertEquals(313242233, model.throughput()); - Assertions.assertEquals(StorageType.PREMIUM_LRS, model.type()); + Assertions.assertEquals(1773557410, model.iops()); + Assertions.assertEquals(794855452, model.throughput()); + Assertions.assertEquals(StorageType.PREMIUM_V2_LRS, model.type()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTierCapabilityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTierCapabilityTests.java index 3df6574b3866..3530f20496b1 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTierCapabilityTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/StorageTierCapabilityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -10,14 +10,8 @@ public final class StorageTierCapabilityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - StorageTierCapability model = BinaryData - .fromString("{\"name\":\"dhtldwkyz\",\"iops\":1335454628,\"status\":\"Visible\",\"reason\":\"cwscwsvlx\"}") - .toObject(StorageTierCapability.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageTierCapability model = new StorageTierCapability(); - model = BinaryData.fromObject(model).toObject(StorageTierCapability.class); + StorageTierCapability model + = BinaryData.fromString("{\"name\":\"wp\",\"iops\":1928242324,\"status\":\"Disabled\",\"reason\":\"gjup\"}") + .toObject(StorageTierCapability.class); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SupportedFeatureTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SupportedFeatureTests.java index ba1803665412..a9ce85fcd7e5 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SupportedFeatureTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/SupportedFeatureTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,12 +11,6 @@ public final class SupportedFeatureTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SupportedFeature model - = BinaryData.fromString("{\"name\":\"nobglaocq\",\"status\":\"Enabled\"}").toObject(SupportedFeature.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedFeature model = new SupportedFeature(); - model = BinaryData.fromObject(model).toObject(SupportedFeature.class); + = BinaryData.fromString("{\"name\":\"dvk\",\"status\":\"Enabled\"}").toObject(SupportedFeature.class); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsInnerTests.java index b3a7f4fdb9fd..ad2cdcc01358 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,13 +11,7 @@ public final class TuningOptionsInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TuningOptionsInner model - = BinaryData.fromString("{\"id\":\"yhddvia\",\"name\":\"egfnmntfpmvmemfn\",\"type\":\"zdwvvbalxl\"}") + = BinaryData.fromString("{\"id\":\"bajlka\",\"name\":\"nwxyiop\",\"type\":\"dkqqfkuvscxkd\"}") .toObject(TuningOptionsInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TuningOptionsInner model = new TuningOptionsInner(); - model = BinaryData.fromObject(model).toObject(TuningOptionsInner.class); - } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListTests.java index d3fb62b57dce..aa408d5a243c 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsListTests.java @@ -1,30 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.TuningOptionsInner; -import com.azure.resourcemanager.postgresqlflexibleserver.models.TuningOptionsList; -import java.util.Arrays; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.TuningOptionsList; import org.junit.jupiter.api.Assertions; public final class TuningOptionsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TuningOptionsList model = BinaryData.fromString( - "{\"value\":[{\"id\":\"jcjbt\",\"name\":\"gaehvvibrxjjst\",\"type\":\"qbeitpkxztmoob\"},{\"id\":\"ft\",\"name\":\"dgfcwqmp\",\"type\":\"maqxzhemjyh\"},{\"id\":\"uj\",\"name\":\"wtwko\",\"type\":\"zwculkbawpfajnj\"}],\"nextLink\":\"tlwtjjguktalhsn\"}") + "{\"value\":[{\"id\":\"govibrxkpmloazu\",\"name\":\"u\",\"type\":\"cbgoor\"},{\"id\":\"eoybfhjxakvvjgs\",\"name\":\"ordilmywwtkgkxny\",\"type\":\"dabg\"},{\"id\":\"udtjuewbc\",\"name\":\"hxuuwhcjyxccybvp\",\"type\":\"yakk\"}],\"nextLink\":\"zp\"}") .toObject(TuningOptionsList.class); - Assertions.assertEquals("tlwtjjguktalhsn", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TuningOptionsList model = new TuningOptionsList() - .withValue(Arrays.asList(new TuningOptionsInner(), new TuningOptionsInner(), new TuningOptionsInner())) - .withNextLink("tlwtjjguktalhsn"); - model = BinaryData.fromObject(model).toObject(TuningOptionsList.class); - Assertions.assertEquals("tlwtjjguktalhsn", model.nextLink()); + Assertions.assertEquals("zp", model.nextLink()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsGetWithResponseMockTests.java index 12fb647b35c8..a72307a0a670 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -20,7 +20,7 @@ public final class TuningOptionsOperationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - String responseStr = "{\"id\":\"ghihpvecms\",\"name\":\"clbl\",\"type\":\"jxl\"}"; + String responseStr = "{\"id\":\"buew\",\"name\":\"rswnjlxuzrhwp\",\"type\":\"sxjb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); TuningOptions response = manager.tuningOptionsOperations() - .getWithResponse("ccxnafbwqroohtuo", "maonurj", TuningOptionParameterEnum.TABLE, + .getWithResponse("esfuught", "qfecjxeygtuhx", TuningOptionParameterEnum.INDEX, com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListByServerMockTests.java index 15dfbc7062e6..01c420f68da9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListByServerMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -20,7 +20,7 @@ public final class TuningOptionsOperationsListByServerMockTests { @Test public void testListByServer() throws Exception { - String responseStr = "{\"value\":[{\"id\":\"k\",\"name\":\"utvlxhr\",\"type\":\"qhvmblcouqe\"}]}"; + String responseStr = "{\"value\":[{\"id\":\"ncnwfepbnwgf\",\"name\":\"xjg\",\"type\":\"g\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -29,8 +29,8 @@ public void testListByServer() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.tuningOptionsOperations().listByServer("yskbruff", "l", com.azure.core.util.Context.NONE); + PagedIterable response = manager.tuningOptionsOperations() + .listByServer("qehgpd", "hzjqatucoige", com.azure.core.util.Context.NONE); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListRecommendationsMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListRecommendationsMockTests.java index b7dea5f701e3..59732041ebde 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListRecommendationsMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/TuningOptionsOperationsListRecommendationsMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -24,7 +24,7 @@ public final class TuningOptionsOperationsListRecommendationsMockTests { @Test public void testListRecommendations() throws Exception { String responseStr - = "{\"value\":[{\"kind\":\"rtceukdqkkyihzt\",\"properties\":{\"initialRecommendedTime\":\"2021-05-22T15:04:10Z\",\"lastRecommendedTime\":\"2021-04-01T19:50:36Z\",\"timesRecommended\":1149844590,\"improvedQueryIds\":[6059301836291431066,3026246036385723404],\"recommendationReason\":\"illcecfehu\",\"currentState\":\"oaguhic\",\"recommendationType\":\"DropIndex\",\"implementationDetails\":{\"method\":\"stacsjvhrweftkwq\",\"script\":\"pmvssehaep\"},\"analyzedWorkload\":{\"startTime\":\"2021-03-25T19:23:18Z\",\"endTime\":\"2021-08-18T20:43:29Z\",\"queryCount\":1805575440},\"estimatedImpact\":[{\"dimensionName\":\"euknijduyyes\",\"unit\":\"djfbocyv\",\"queryId\":2704241280285106932,\"absoluteValue\":37.16266942814275},{\"dimensionName\":\"ikdmhlakuflgbhga\",\"unit\":\"cdixmx\",\"queryId\":2007885947993273503,\"absoluteValue\":18.025093855472196},{\"dimensionName\":\"gdkfnoz\",\"unit\":\"oqbvjhvefgwbmqj\",\"queryId\":2962662676791309250,\"absoluteValue\":12.358462224037792},{\"dimensionName\":\"ymxbulpzealb\",\"unit\":\"kyojwyvfk\",\"queryId\":2743088131386651750,\"absoluteValue\":59.117992706724365}],\"details\":{\"databaseName\":\"gxjc\",\"schema\":\"zrrscub\",\"table\":\"sd\",\"indexType\":\"pxqwo\",\"indexName\":\"ffjxcjrmmuabwib\",\"indexColumns\":[\"gjonmcy\"],\"includedColumns\":[\"y\",\"bamwineo\",\"vfkakpold\",\"vevboclzh\"]}},\"id\":\"knyuxgvttxpn\",\"name\":\"upzaamrdixtre\",\"type\":\"ids\"}]}"; + = "{\"value\":[{\"kind\":\"wdkqzeqy\",\"properties\":{\"initialRecommendedTime\":\"2021-08-16T03:47:52Z\",\"lastRecommendedTime\":\"2021-01-22T07:52:30Z\",\"timesRecommended\":1622963422,\"improvedQueryIds\":[2337078994350343450,7427972208909281693,2534213093314961127],\"recommendationReason\":\"cegyamlbnseqacj\",\"currentState\":\"pilguooqjag\",\"recommendationType\":\"ReIndex\",\"implementationDetails\":{\"method\":\"ueio\",\"script\":\"jbsahrtdtpde\"},\"analyzedWorkload\":{\"startTime\":\"2021-06-21T16:34:40Z\",\"endTime\":\"2021-08-29T23:35:12Z\",\"queryCount\":566411301},\"estimatedImpact\":[{\"dimensionName\":\"bnfxofvc\",\"unit\":\"gdirazf\",\"queryId\":5876258781351504960,\"absoluteValue\":8.301377026277535}],\"details\":{\"databaseName\":\"ujtmvcopexcmjurb\",\"schema\":\"hlkyqltqsrog\",\"table\":\"wkffdjkt\",\"indexType\":\"sidfv\",\"indexName\":\"g\",\"indexColumns\":[\"fuijtkbus\"],\"includedColumns\":[\"sfikayiansharuj\",\"ji\",\"xfz\",\"j\"]}},\"id\":\"tvwkpqhjpenu\",\"name\":\"gbqe\",\"type\":\"qekewvnqvcd\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,9 +34,9 @@ public void testListRecommendations() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.tuningOptionsOperations() - .listRecommendations("bsjuscvsfx", "gctmgxuupbezq", TuningOptionParameterEnum.TABLE, + .listRecommendations("jbgdlfgtdysnaquf", "qbctqha", TuningOptionParameterEnum.TABLE, RecommendationTypeParameterEnum.DROP_INDEX, com.azure.core.util.Context.NONE); - Assertions.assertEquals("rtceukdqkkyihzt", response.iterator().next().kind()); + Assertions.assertEquals("wdkqzeqy", response.iterator().next().kind()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserAssignedIdentityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserAssignedIdentityTests.java index 89ffb608594c..f6094062cc7d 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserAssignedIdentityTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserAssignedIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -16,28 +16,28 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserAssignedIdentity model = BinaryData.fromString( - "{\"userAssignedIdentities\":{\"ox\":{\"principalId\":\"jhhgdnhxmsi\",\"clientId\":\"omi\"},\"fgdo\":{\"principalId\":\"dufiq\",\"clientId\":\"ieuzaofjchvcyyy\"},\"shqvcimpev\":{\"principalId\":\"ubiipuipwoqonma\",\"clientId\":\"ekni\"}},\"principalId\":\"mblrrilbywd\",\"type\":\"SystemAssigned\",\"tenantId\":\"icc\"}") + "{\"userAssignedIdentities\":{\"bavxbniwdjswzt\":{\"principalId\":\"ux\",\"clientId\":\"d\"},\"xbzpfzab\":{\"principalId\":\"bpg\",\"clientId\":\"ytxhp\"},\"iklbbovpl\":{\"principalId\":\"cuh\",\"clientId\":\"tcty\"}},\"principalId\":\"bhvgy\",\"type\":\"None\",\"tenantId\":\"osvmk\"}") .toObject(UserAssignedIdentity.class); - Assertions.assertEquals("jhhgdnhxmsi", model.userAssignedIdentities().get("ox").principalId()); - Assertions.assertEquals("omi", model.userAssignedIdentities().get("ox").clientId()); - Assertions.assertEquals("mblrrilbywd", model.principalId()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals("ux", model.userAssignedIdentities().get("bavxbniwdjswzt").principalId()); + Assertions.assertEquals("d", model.userAssignedIdentities().get("bavxbniwdjswzt").clientId()); + Assertions.assertEquals("bhvgy", model.principalId()); + Assertions.assertEquals(IdentityType.NONE, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UserAssignedIdentity model = new UserAssignedIdentity() .withUserAssignedIdentities( - mapOf("ox", new UserIdentity().withPrincipalId("jhhgdnhxmsi").withClientId("omi"), "fgdo", - new UserIdentity().withPrincipalId("dufiq").withClientId("ieuzaofjchvcyyy"), "shqvcimpev", - new UserIdentity().withPrincipalId("ubiipuipwoqonma").withClientId("ekni"))) - .withPrincipalId("mblrrilbywd") - .withType(IdentityType.SYSTEM_ASSIGNED); + mapOf("bavxbniwdjswzt", new UserIdentity().withPrincipalId("ux").withClientId("d"), "xbzpfzab", + new UserIdentity().withPrincipalId("bpg").withClientId("ytxhp"), "iklbbovpl", + new UserIdentity().withPrincipalId("cuh").withClientId("tcty"))) + .withPrincipalId("bhvgy") + .withType(IdentityType.NONE); model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - Assertions.assertEquals("jhhgdnhxmsi", model.userAssignedIdentities().get("ox").principalId()); - Assertions.assertEquals("omi", model.userAssignedIdentities().get("ox").clientId()); - Assertions.assertEquals("mblrrilbywd", model.principalId()); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals("ux", model.userAssignedIdentities().get("bavxbniwdjswzt").principalId()); + Assertions.assertEquals("d", model.userAssignedIdentities().get("bavxbniwdjswzt").clientId()); + Assertions.assertEquals("bhvgy", model.principalId()); + Assertions.assertEquals(IdentityType.NONE, model.type()); } // Use "Map.of" if available diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserIdentityTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserIdentityTests.java index 10e85a8f531f..008631b61ec9 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserIdentityTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/UserIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,17 +11,17 @@ public final class UserIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserIdentity model = BinaryData.fromString("{\"principalId\":\"wfscjfn\",\"clientId\":\"szqujizdvoq\"}") - .toObject(UserIdentity.class); - Assertions.assertEquals("wfscjfn", model.principalId()); - Assertions.assertEquals("szqujizdvoq", model.clientId()); + UserIdentity model + = BinaryData.fromString("{\"principalId\":\"sxqu\",\"clientId\":\"fpl\"}").toObject(UserIdentity.class); + Assertions.assertEquals("sxqu", model.principalId()); + Assertions.assertEquals("fpl", model.clientId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UserIdentity model = new UserIdentity().withPrincipalId("wfscjfn").withClientId("szqujizdvoq"); + UserIdentity model = new UserIdentity().withPrincipalId("sxqu").withClientId("fpl"); model = BinaryData.fromObject(model).toObject(UserIdentity.class); - Assertions.assertEquals("wfscjfn", model.principalId()); - Assertions.assertEquals("szqujizdvoq", model.clientId()); + Assertions.assertEquals("sxqu", model.principalId()); + Assertions.assertEquals("fpl", model.clientId()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationDetailsTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationDetailsTests.java index d744a0c3ef3e..5f33380c80fb 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationDetailsTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationDetailsTests.java @@ -1,114 +1,36 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.models.DbLevelValidationStatus; import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationDetails; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage; import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationState; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationSummaryItem; import java.time.OffsetDateTime; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ValidationDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidationDetails model = BinaryData.fromString( - "{\"status\":\"Succeeded\",\"validationStartTimeInUtc\":\"2021-08-28T01:51:20Z\",\"validationEndTimeInUtc\":\"2021-09-06T22:54:10Z\",\"serverLevelValidationDetails\":[{\"type\":\"saznqntoruds\",\"state\":\"Failed\",\"messages\":[{\"state\":\"Warning\",\"message\":\"grauwjuetaebur\"},{\"state\":\"Warning\",\"message\":\"ovsm\"}]},{\"type\":\"xwabmqoe\",\"state\":\"Succeeded\",\"messages\":[{\"state\":\"Failed\",\"message\":\"u\"}]},{\"type\":\"jmqlgkfb\",\"state\":\"Warning\",\"messages\":[{\"state\":\"Succeeded\",\"message\":\"bjcntujitc\"},{\"state\":\"Succeeded\",\"message\":\"twwaezkojvdcpzf\"}]},{\"type\":\"ouicybxarzgszu\",\"state\":\"Failed\",\"messages\":[{\"state\":\"Warning\",\"message\":\"idoamciodhkha\"},{\"state\":\"Succeeded\",\"message\":\"nz\"},{\"state\":\"Succeeded\",\"message\":\"wntoegokdwbwh\"},{\"state\":\"Failed\",\"message\":\"cmrvexzt\"}]}],\"dbLevelValidationDetails\":[{\"databaseName\":\"gsfraoyzkoow\",\"startedOn\":\"2021-01-01T04:06:13Z\",\"endedOn\":\"2021-11-23T22:05:35Z\",\"summary\":[{\"type\":\"wqaldsyu\",\"state\":\"Warning\",\"messages\":[{}]},{\"type\":\"qfobwyz\",\"state\":\"Succeeded\",\"messages\":[{},{}]},{\"type\":\"t\",\"state\":\"Failed\",\"messages\":[{},{},{}]},{\"type\":\"gmhrskdsnfdsdoak\",\"state\":\"Warning\",\"messages\":[{},{},{}]}]}]}") + "{\"status\":\"Failed\",\"validationStartTimeInUtc\":\"2021-03-31T13:31:51Z\",\"validationEndTimeInUtc\":\"2021-01-18T23:17:52Z\",\"serverLevelValidationDetails\":[{\"type\":\"qvudwxdndnvowgu\",\"state\":\"Warning\",\"messages\":[{\"state\":\"Succeeded\",\"message\":\"glhslazj\"},{\"state\":\"Warning\",\"message\":\"dtjixhb\"},{\"state\":\"Warning\",\"message\":\"qweykhmenev\"}]},{\"type\":\"exfwhy\",\"state\":\"Warning\",\"messages\":[{\"state\":\"Succeeded\",\"message\":\"c\"},{\"state\":\"Succeeded\",\"message\":\"nnaamdectehfiqsc\"}]}],\"dbLevelValidationDetails\":[{\"databaseName\":\"vhezrkgqhcj\",\"startedOn\":\"2021-10-26T01:10:04Z\",\"endedOn\":\"2021-04-13T21:01:09Z\",\"summary\":[{\"type\":\"sle\",\"state\":\"Failed\",\"messages\":[{},{},{}]},{\"type\":\"jpkcattpng\",\"state\":\"Succeeded\",\"messages\":[{},{},{}]},{\"type\":\"sqpjhvmdajvn\",\"state\":\"Succeeded\",\"messages\":[{},{},{}]}]},{\"databaseName\":\"e\",\"startedOn\":\"2021-08-26T21:26:20Z\",\"endedOn\":\"2021-04-17T02:43:52Z\",\"summary\":[{\"type\":\"fhyhltrpmopjmcma\",\"state\":\"Succeeded\",\"messages\":[{},{},{},{}]}]},{\"databaseName\":\"fu\",\"startedOn\":\"2021-05-27T00:11:36Z\",\"endedOn\":\"2021-05-15T07:44:06Z\",\"summary\":[{\"type\":\"pk\",\"state\":\"Succeeded\",\"messages\":[{},{},{}]}]}]}") .toObject(ValidationDetails.class); - Assertions.assertEquals(ValidationState.SUCCEEDED, model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-28T01:51:20Z"), model.validationStartTimeInUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T22:54:10Z"), model.validationEndTimeInUtc()); - Assertions.assertEquals("saznqntoruds", model.serverLevelValidationDetails().get(0).type()); - Assertions.assertEquals(ValidationState.FAILED, model.serverLevelValidationDetails().get(0).state()); - Assertions.assertEquals(ValidationState.WARNING, + Assertions.assertEquals(ValidationState.FAILED, model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T13:31:51Z"), model.validationStartTimeInUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T23:17:52Z"), model.validationEndTimeInUtc()); + Assertions.assertEquals("qvudwxdndnvowgu", model.serverLevelValidationDetails().get(0).type()); + Assertions.assertEquals(ValidationState.WARNING, model.serverLevelValidationDetails().get(0).state()); + Assertions.assertEquals(ValidationState.SUCCEEDED, model.serverLevelValidationDetails().get(0).messages().get(0).state()); - Assertions.assertEquals("grauwjuetaebur", - model.serverLevelValidationDetails().get(0).messages().get(0).message()); - Assertions.assertEquals("gsfraoyzkoow", model.dbLevelValidationDetails().get(0).databaseName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T04:06:13Z"), + Assertions.assertEquals("glhslazj", model.serverLevelValidationDetails().get(0).messages().get(0).message()); + Assertions.assertEquals("vhezrkgqhcj", model.dbLevelValidationDetails().get(0).databaseName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-26T01:10:04Z"), model.dbLevelValidationDetails().get(0).startedOn()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-23T22:05:35Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-04-13T21:01:09Z"), model.dbLevelValidationDetails().get(0).endedOn()); - Assertions.assertEquals("wqaldsyu", model.dbLevelValidationDetails().get(0).summary().get(0).type()); - Assertions.assertEquals(ValidationState.WARNING, - model.dbLevelValidationDetails().get(0).summary().get(0).state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ValidationDetails model - = new ValidationDetails().withStatus(ValidationState.SUCCEEDED) - .withValidationStartTimeInUtc(OffsetDateTime.parse("2021-08-28T01:51:20Z")) - .withValidationEndTimeInUtc(OffsetDateTime.parse("2021-09-06T22:54:10Z")) - .withServerLevelValidationDetails( - Arrays.asList( - new ValidationSummaryItem() - .withType("saznqntoruds") - .withState(ValidationState.FAILED) - .withMessages(Arrays.asList( - new ValidationMessage().withState(ValidationState.WARNING) - .withMessage("grauwjuetaebur"), - new ValidationMessage().withState(ValidationState.WARNING).withMessage("ovsm"))), - new ValidationSummaryItem() - .withType("xwabmqoe") - .withState(ValidationState.SUCCEEDED) - .withMessages(Arrays - .asList(new ValidationMessage().withState(ValidationState.FAILED).withMessage("u"))), - new ValidationSummaryItem().withType("jmqlgkfb") - .withState(ValidationState.WARNING) - .withMessages(Arrays.asList( - new ValidationMessage().withState(ValidationState.SUCCEEDED).withMessage("bjcntujitc"), - new ValidationMessage().withState(ValidationState.SUCCEEDED) - .withMessage("twwaezkojvdcpzf"))), - new ValidationSummaryItem().withType("ouicybxarzgszu") - .withState(ValidationState.FAILED) - .withMessages(Arrays.asList( - new ValidationMessage().withState(ValidationState.WARNING).withMessage("idoamciodhkha"), - new ValidationMessage().withState(ValidationState.SUCCEEDED).withMessage("nz"), - new ValidationMessage().withState(ValidationState.SUCCEEDED) - .withMessage("wntoegokdwbwh"), - new ValidationMessage().withState(ValidationState.FAILED).withMessage("cmrvexzt"))))) - .withDbLevelValidationDetails( - Arrays.asList(new DbLevelValidationStatus().withDatabaseName("gsfraoyzkoow") - .withStartedOn(OffsetDateTime.parse("2021-01-01T04:06:13Z")) - .withEndedOn(OffsetDateTime.parse("2021-11-23T22:05:35Z")) - .withSummary(Arrays.asList( - new ValidationSummaryItem().withType("wqaldsyu") - .withState(ValidationState.WARNING) - .withMessages(Arrays.asList(new ValidationMessage())), - new ValidationSummaryItem().withType("qfobwyz") - .withState(ValidationState.SUCCEEDED) - .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage())), - new ValidationSummaryItem().withType("t") - .withState(ValidationState.FAILED) - .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), - new ValidationMessage())), - new ValidationSummaryItem().withType("gmhrskdsnfdsdoak") - .withState(ValidationState.WARNING) - .withMessages(Arrays.asList(new ValidationMessage(), new ValidationMessage(), - new ValidationMessage())))))); - model = BinaryData.fromObject(model).toObject(ValidationDetails.class); - Assertions.assertEquals(ValidationState.SUCCEEDED, model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-28T01:51:20Z"), model.validationStartTimeInUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T22:54:10Z"), model.validationEndTimeInUtc()); - Assertions.assertEquals("saznqntoruds", model.serverLevelValidationDetails().get(0).type()); - Assertions.assertEquals(ValidationState.FAILED, model.serverLevelValidationDetails().get(0).state()); - Assertions.assertEquals(ValidationState.WARNING, - model.serverLevelValidationDetails().get(0).messages().get(0).state()); - Assertions.assertEquals("grauwjuetaebur", - model.serverLevelValidationDetails().get(0).messages().get(0).message()); - Assertions.assertEquals("gsfraoyzkoow", model.dbLevelValidationDetails().get(0).databaseName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T04:06:13Z"), - model.dbLevelValidationDetails().get(0).startedOn()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-23T22:05:35Z"), - model.dbLevelValidationDetails().get(0).endedOn()); - Assertions.assertEquals("wqaldsyu", model.dbLevelValidationDetails().get(0).summary().get(0).type()); - Assertions.assertEquals(ValidationState.WARNING, + Assertions.assertEquals("sle", model.dbLevelValidationDetails().get(0).summary().get(0).type()); + Assertions.assertEquals(ValidationState.FAILED, model.dbLevelValidationDetails().get(0).summary().get(0).state()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationMessageTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationMessageTests.java index d86bef56a4b8..df1a66fbbc14 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationMessageTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationMessageTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -12,18 +12,9 @@ public final class ValidationMessageTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ValidationMessage model = BinaryData.fromString("{\"state\":\"Warning\",\"message\":\"uzkopbminrfd\"}") - .toObject(ValidationMessage.class); - Assertions.assertEquals(ValidationState.WARNING, model.state()); - Assertions.assertEquals("uzkopbminrfd", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { ValidationMessage model - = new ValidationMessage().withState(ValidationState.WARNING).withMessage("uzkopbminrfd"); - model = BinaryData.fromObject(model).toObject(ValidationMessage.class); - Assertions.assertEquals(ValidationState.WARNING, model.state()); - Assertions.assertEquals("uzkopbminrfd", model.message()); + = BinaryData.fromString("{\"state\":\"Succeeded\",\"message\":\"exim\"}").toObject(ValidationMessage.class); + Assertions.assertEquals(ValidationState.SUCCEEDED, model.state()); + Assertions.assertEquals("exim", model.message()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationSummaryItemTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationSummaryItemTests.java index dc39dc689145..b66b93797a6f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationSummaryItemTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/ValidationSummaryItemTests.java @@ -1,40 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationMessage; import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationState; import com.azure.resourcemanager.postgresqlflexibleserver.models.ValidationSummaryItem; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ValidationSummaryItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidationSummaryItem model = BinaryData.fromString( - "{\"type\":\"kzevdlhewpusds\",\"state\":\"Warning\",\"messages\":[{\"state\":\"Warning\",\"message\":\"bejdcn\"},{\"state\":\"Failed\",\"message\":\"oakufgm\"},{\"state\":\"Failed\",\"message\":\"rdgrtw\"}]}") + "{\"type\":\"ozmyzydagfu\",\"state\":\"Succeeded\",\"messages\":[{\"state\":\"Failed\",\"message\":\"okktwhrdxw\"},{\"state\":\"Succeeded\",\"message\":\"sm\"}]}") .toObject(ValidationSummaryItem.class); - Assertions.assertEquals("kzevdlhewpusds", model.type()); - Assertions.assertEquals(ValidationState.WARNING, model.state()); - Assertions.assertEquals(ValidationState.WARNING, model.messages().get(0).state()); - Assertions.assertEquals("bejdcn", model.messages().get(0).message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ValidationSummaryItem model = new ValidationSummaryItem().withType("kzevdlhewpusds") - .withState(ValidationState.WARNING) - .withMessages( - Arrays.asList(new ValidationMessage().withState(ValidationState.WARNING).withMessage("bejdcn"), - new ValidationMessage().withState(ValidationState.FAILED).withMessage("oakufgm"), - new ValidationMessage().withState(ValidationState.FAILED).withMessage("rdgrtw"))); - model = BinaryData.fromObject(model).toObject(ValidationSummaryItem.class); - Assertions.assertEquals("kzevdlhewpusds", model.type()); - Assertions.assertEquals(ValidationState.WARNING, model.state()); - Assertions.assertEquals(ValidationState.WARNING, model.messages().get(0).state()); - Assertions.assertEquals("bejdcn", model.messages().get(0).message()); + Assertions.assertEquals("ozmyzydagfu", model.type()); + Assertions.assertEquals(ValidationState.SUCCEEDED, model.state()); + Assertions.assertEquals(ValidationState.FAILED, model.messages().get(0).state()); + Assertions.assertEquals("okktwhrdxw", model.messages().get(0).message()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointInnerTests.java index 2d9195d23c20..9a23bad1c6e3 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -14,18 +14,18 @@ public final class VirtualEndpointInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualEndpointInner model = BinaryData.fromString( - "{\"id\":\"cdmxzrpoaiml\",\"name\":\"iaaomylweazul\",\"type\":\"ethwwnpjhlfz\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"hfbousnfepgfew\",\"twly\"],\"virtualEndpoints\":[\"cxy\",\"xhdjhl\",\"mmbcxfhbcp\",\"rxvxcjzh\"]}}") + "{\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"pajqgxysm\"],\"virtualEndpoints\":[\"bq\",\"qvmkcxo\"]},\"id\":\"pvhelxprg\",\"name\":\"yat\",\"type\":\"dckcbc\"}") .toObject(VirtualEndpointInner.class); Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); - Assertions.assertEquals("hfbousnfepgfew", model.members().get(0)); + Assertions.assertEquals("pajqgxysm", model.members().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualEndpointInner model = new VirtualEndpointInner().withEndpointType(VirtualEndpointType.READ_WRITE) - .withMembers(Arrays.asList("hfbousnfepgfew", "twly")); + .withMembers(Arrays.asList("pajqgxysm")); model = BinaryData.fromObject(model).toObject(VirtualEndpointInner.class); Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); - Assertions.assertEquals("hfbousnfepgfew", model.members().get(0)); + Assertions.assertEquals("pajqgxysm", model.members().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourceForPatchTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourceForPatchTests.java index 64eee632762d..3235863ed06e 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourceForPatchTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourceForPatchTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -14,19 +14,19 @@ public final class VirtualEndpointResourceForPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualEndpointResourceForPatch model = BinaryData.fromString( - "{\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"xtgqscjavftjuh\",\"qaz\",\"mtggu\"],\"virtualEndpoints\":[\"jrajcivm\"]}}") + "{\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"szdtmhrkwof\",\"yvoqa\",\"piexpbtgiw\"],\"virtualEndpoints\":[\"enwash\",\"tdtkcn\"]}}") .toObject(VirtualEndpointResourceForPatch.class); Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); - Assertions.assertEquals("xtgqscjavftjuh", model.members().get(0)); + Assertions.assertEquals("szdtmhrkwof", model.members().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualEndpointResourceForPatch model = new VirtualEndpointResourceForPatch().withEndpointType(VirtualEndpointType.READ_WRITE) - .withMembers(Arrays.asList("xtgqscjavftjuh", "qaz", "mtggu")); + .withMembers(Arrays.asList("szdtmhrkwof", "yvoqa", "piexpbtgiw")); model = BinaryData.fromObject(model).toObject(VirtualEndpointResourceForPatch.class); Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); - Assertions.assertEquals("xtgqscjavftjuh", model.members().get(0)); + Assertions.assertEquals("szdtmhrkwof", model.members().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourcePropertiesTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourcePropertiesTests.java index 0a1c5e0872ff..a9499aa8c724 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourcePropertiesTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointResourcePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -13,21 +13,20 @@ public final class VirtualEndpointResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualEndpointResourceProperties model = BinaryData - .fromString( - "{\"endpointType\":\"ReadWrite\",\"members\":[\"fiwrxgkn\"],\"virtualEndpoints\":[\"yinzqodfvpgs\"]}") + VirtualEndpointResourceProperties model = BinaryData.fromString( + "{\"endpointType\":\"ReadWrite\",\"members\":[\"xgc\",\"qibrhosxsdqrhzoy\",\"i\"],\"virtualEndpoints\":[\"qyib\"]}") .toObject(VirtualEndpointResourceProperties.class); Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); - Assertions.assertEquals("fiwrxgkn", model.members().get(0)); + Assertions.assertEquals("xgc", model.members().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualEndpointResourceProperties model = new VirtualEndpointResourceProperties().withEndpointType(VirtualEndpointType.READ_WRITE) - .withMembers(Arrays.asList("fiwrxgkn")); + .withMembers(Arrays.asList("xgc", "qibrhosxsdqrhzoy", "i")); model = BinaryData.fromObject(model).toObject(VirtualEndpointResourceProperties.class); Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.endpointType()); - Assertions.assertEquals("fiwrxgkn", model.members().get(0)); + Assertions.assertEquals("xgc", model.members().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateMockTests.java deleted file mode 100644 index 49812ea6f50d..000000000000 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsCreateMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpoint; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VirtualEndpointsCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"id\":\"jszlb\",\"name\":\"mnlzijiufehgmvf\",\"type\":\"wyvq\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"iylylyfw\",\"zutgqztwhghmupg\"],\"virtualEndpoints\":[\"tcdxabbujftaben\",\"bklqpxz\",\"cafeddw\",\"nlzafwxudgnh\"]}}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - PostgreSqlManager manager = PostgreSqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - VirtualEndpoint response = manager.virtualEndpoints() - .define("pt") - .withExistingFlexibleServer("abzoghktdpyczhco", "ocnhzqrottjzcfyj") - .withEndpointType(VirtualEndpointType.READ_WRITE) - .withMembers(Arrays.asList("psjoqcjenk", "hf")) - .create(); - - Assertions.assertEquals(VirtualEndpointType.READ_WRITE, response.endpointType()); - Assertions.assertEquals("iylylyfw", response.members().get(0)); - } -} diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetWithResponseMockTests.java index 363d69e8d94e..3fe596a70a20 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -22,7 +22,7 @@ public final class VirtualEndpointsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"id\":\"rmkfqlwxldykals\",\"name\":\"aolnjpnnbmjk\",\"type\":\"bjgsjjxxahmrn\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"xyivpinbm\",\"wbjijkgq\",\"nhmbkez\"],\"virtualEndpoints\":[\"ujvaannggi\",\"cwkdtaaw\"]}}"; + = "{\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"nh\",\"vsqltnzoibgsxg\",\"xfyqonmpqoxwdo\",\"dbxiqx\"],\"virtualEndpoints\":[\"qbi\"]},\"id\":\"tmwwi\",\"name\":\"h\",\"type\":\"hfqpofv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VirtualEndpoint response = manager.virtualEndpoints() - .getWithResponse("bhbcdszir", "randoypmb", "t", com.azure.core.util.Context.NONE) + .getWithResponse("vwf", "tayx", "nsup", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(VirtualEndpointType.READ_WRITE, response.endpointType()); - Assertions.assertEquals("xyivpinbm", response.members().get(0)); + Assertions.assertEquals("nh", response.members().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerMockTests.java index 7541aaccdfba..1a6e4ed5006b 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListByServerMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -23,7 +23,7 @@ public final class VirtualEndpointsListByServerMockTests { @Test public void testListByServer() throws Exception { String responseStr - = "{\"value\":[{\"id\":\"nxwbjsidbirkfp\",\"name\":\"okdgoge\",\"type\":\"jymrhbg\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"wnf\"],\"virtualEndpoints\":[\"hhqosmffjku\",\"ycyarnroohg\"]}}]}"; + = "{\"value\":[{\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"tswbzuwfmd\",\"ragegi\",\"vcjfelisdjubggb\",\"igkxkbsazga\"],\"virtualEndpoints\":[\"cyrcmjdmspo\"]},\"id\":\"pv\",\"name\":\"hryl\",\"type\":\"iofrzgbzjedmstk\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,9 +33,9 @@ public void testListByServer() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.virtualEndpoints().listByServer("wfekaumrrqmb", "mqkra", com.azure.core.util.Context.NONE); + = manager.virtualEndpoints().listByServer("bcblemb", "kbwvqvxkdiv", com.azure.core.util.Context.NONE); Assertions.assertEquals(VirtualEndpointType.READ_WRITE, response.iterator().next().endpointType()); - Assertions.assertEquals("wnf", response.iterator().next().members().get(0)); + Assertions.assertEquals("tswbzuwfmd", response.iterator().next().members().get(0)); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListTests.java index 4465c682b37f..17c4faa4f79f 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualEndpointsListTests.java @@ -1,36 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualEndpointInner; +import com.azure.resourcemanager.postgresqlflexibleserver.implementation.models.VirtualEndpointsList; import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointType; -import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualEndpointsList; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class VirtualEndpointsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualEndpointsList model = BinaryData.fromString( - "{\"value\":[{\"id\":\"sgbpfgzdjtx\",\"name\":\"flbqvgaq\",\"type\":\"gafcqu\",\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"wsdtutnwl\",\"uycvuzhyrmewip\",\"vekdxukuqgsjjxu\",\"dxgketwzhhzjhfj\"],\"virtualEndpoints\":[\"vmuvgpmu\"]}}],\"nextLink\":\"qsxvmhf\"}") + "{\"value\":[{\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"ulpiuj\",\"aasipqi\",\"obyu\"],\"virtualEndpoints\":[\"pqlpq\",\"cciuqgbdbutau\"]},\"id\":\"btkuwhh\",\"name\":\"hykojoxafnndlpic\",\"type\":\"koymkcd\"},{\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"pwdreqnovvqf\"],\"virtualEndpoints\":[\"jxywsuws\",\"rsndsytgadgvra\"]},\"id\":\"en\",\"name\":\"qnzarrwl\",\"type\":\"uu\"},{\"properties\":{\"endpointType\":\"ReadWrite\",\"members\":[\"cewiipfpub\",\"ibwwiftohqkv\",\"uvksgplsaknynfsy\",\"ljphuopxodl\"],\"virtualEndpoints\":[\"ntorzihleosjswsr\"]},\"id\":\"lyzrpzbchckqqzqi\",\"name\":\"xiy\",\"type\":\"uiizynke\"}],\"nextLink\":\"atrwyhqmibzyh\"}") .toObject(VirtualEndpointsList.class); Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.value().get(0).endpointType()); - Assertions.assertEquals("wsdtutnwl", model.value().get(0).members().get(0)); - Assertions.assertEquals("qsxvmhf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualEndpointsList model = new VirtualEndpointsList() - .withValue(Arrays.asList(new VirtualEndpointInner().withEndpointType(VirtualEndpointType.READ_WRITE) - .withMembers(Arrays.asList("wsdtutnwl", "uycvuzhyrmewip", "vekdxukuqgsjjxu", "dxgketwzhhzjhfj")))) - .withNextLink("qsxvmhf"); - model = BinaryData.fromObject(model).toObject(VirtualEndpointsList.class); - Assertions.assertEquals(VirtualEndpointType.READ_WRITE, model.value().get(0).endpointType()); - Assertions.assertEquals("wsdtutnwl", model.value().get(0).members().get(0)); - Assertions.assertEquals("qsxvmhf", model.nextLink()); + Assertions.assertEquals("ulpiuj", model.value().get(0).members().get(0)); + Assertions.assertEquals("atrwyhqmibzyh", model.nextLink()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageModelInnerTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageModelInnerTests.java index 61cc3c4d01bf..27cfe2565d97 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageModelInnerTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageModelInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,13 +11,7 @@ public final class VirtualNetworkSubnetUsageModelInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualNetworkSubnetUsageModelInner model = BinaryData.fromString( - "{\"delegatedSubnetsUsage\":[{\"subnetName\":\"bhu\",\"usage\":7040334631304760179}],\"location\":\"yue\",\"subscriptionId\":\"lynsqyrpf\"}") + "{\"delegatedSubnetsUsage\":[{\"subnetName\":\"oxfrkenxpmyyefr\",\"usage\":8816520573357586838}],\"location\":\"qqs\",\"subscriptionId\":\"waoqvmmb\"}") .toObject(VirtualNetworkSubnetUsageModelInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualNetworkSubnetUsageModelInner model = new VirtualNetworkSubnetUsageModelInner(); - model = BinaryData.fromObject(model).toObject(VirtualNetworkSubnetUsageModelInner.class); - } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageParameterTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageParameterTests.java index ae77a8f84c82..5a9b37ca55de 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageParameterTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsageParameterTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -11,16 +11,16 @@ public final class VirtualNetworkSubnetUsageParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualNetworkSubnetUsageParameter model = BinaryData.fromString("{\"virtualNetworkArmResourceId\":\"zjyi\"}") + VirtualNetworkSubnetUsageParameter model = BinaryData.fromString("{\"virtualNetworkArmResourceId\":\"rc\"}") .toObject(VirtualNetworkSubnetUsageParameter.class); - Assertions.assertEquals("zjyi", model.virtualNetworkArmResourceId()); + Assertions.assertEquals("rc", model.virtualNetworkArmResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualNetworkSubnetUsageParameter model - = new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId("zjyi"); + = new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId("rc"); model = BinaryData.fromObject(model).toObject(VirtualNetworkSubnetUsageParameter.class); - Assertions.assertEquals("zjyi", model.virtualNetworkArmResourceId()); + Assertions.assertEquals("rc", model.virtualNetworkArmResourceId()); } } diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsagesListWithResponseMockTests.java b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsagesListWithResponseMockTests.java index b75b7cb4cf3f..078f7a892265 100644 --- a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsagesListWithResponseMockTests.java +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/test/java/com/azure/resourcemanager/postgresqlflexibleserver/generated/VirtualNetworkSubnetUsagesListWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.postgresqlflexibleserver.generated; @@ -21,7 +21,7 @@ public final class VirtualNetworkSubnetUsagesListWithResponseMockTests { @Test public void testListWithResponse() throws Exception { String responseStr - = "{\"delegatedSubnetsUsage\":[{\"subnetName\":\"yrdnqod\",\"usage\":5546827774753159814},{\"subnetName\":\"hqfaqnvz\",\"usage\":6550733116742453800},{\"subnetName\":\"pem\",\"usage\":1397083088436358597},{\"subnetName\":\"sczuejdtxptlghwz\",\"usage\":4250319032943911677}],\"location\":\"jjstliuhqawmo\",\"subscriptionId\":\"ancz\"}"; + = "{\"delegatedSubnetsUsage\":[{\"subnetName\":\"wpg\",\"usage\":7111618905085369192},{\"subnetName\":\"awzovgkk\",\"usage\":1860576085434847248},{\"subnetName\":\"jcjcazt\",\"usage\":4085382650792832645},{\"subnetName\":\"qowxwcom\",\"usage\":8003971911185538300}],\"location\":\"wvczcswkacve\",\"subscriptionId\":\"fdv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,8 +31,7 @@ public void testListWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VirtualNetworkSubnetUsageModel response = manager.virtualNetworkSubnetUsages() - .listWithResponse("ookrtalvnbw", - new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId("bemeluclvd"), + .listWithResponse("vfb", new VirtualNetworkSubnetUsageParameter().withVirtualNetworkArmResourceId("y"), com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/tsp-location.yaml b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/tsp-location.yaml new file mode 100644 index 000000000000..bd26bc89e2ea --- /dev/null +++ b/sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/postgresql/DBforPostgreSQL.Management +commit: 74fd6c09ef3546c7997e174cb67002b5b273f381 +repo: Azure/azure-rest-api-specs +additionalDirectories: